Fix man functions
This commit is contained in:
parent
e69cb47c62
commit
43efbd1a8a
@ -2,7 +2,7 @@
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="Pipenv (Calculator)" jdkType="Python SDK" />
|
||||
<orderEntry type="jdk" jdkName="Pipenv (casio-calculator)" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
@ -7,5 +7,5 @@
|
||||
<option name="show" value="ASK" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Pipenv (Calculator)" project-jdk-type="Python SDK" />
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Pipenv (casio-calculator)" project-jdk-type="Python SDK" />
|
||||
</project>
|
@ -1,5 +1,4 @@
|
||||
import math
|
||||
from utils import *
|
||||
|
||||
|
||||
def bnd(x, n, p):
|
||||
@ -251,4 +250,32 @@ def pd_from(x, l):
|
||||
return 1 - pd_upto(x - 1, l)
|
||||
|
||||
|
||||
man(man)
|
||||
def man():
|
||||
print("This module contains functions for computing the total probability of events.")
|
||||
print("The functions are:")
|
||||
print("bnd(x, n, p) - The binomial distribution")
|
||||
print("bnd_mean(n, p) - The mean of the binomial distribution")
|
||||
print("bnd_var(n, p) - The variance of the binomial distribution")
|
||||
print("bnd_std(n, p) - The standard deviation of the binomial distribution")
|
||||
print("bnd_upto(x, n, p) - The cumulative probability of getting upto x successes in n trials")
|
||||
print("bnd_from(x, n, p) - The cumulative probability of getting from x successes in n trials")
|
||||
print("gd(x, p, q) - The geometric distribution")
|
||||
print("gd_mean(p) - The mean of the geometric distribution")
|
||||
print("gd_var(p) - The variance of the geometric distribution")
|
||||
print("gd_std(p) - The standard deviation of the geometric distribution")
|
||||
print("gd_upto(x, p) - The cumulative probability of getting upto x trials until the first success")
|
||||
print("gd_from(x, p) - The cumulative probability of getting from x trials until the first success")
|
||||
print("hgd(x, N, n, k) - The hyper geometric distribution")
|
||||
print("hgd_mean(N, n, k) - The mean of the hyper geometric distribution")
|
||||
print("hgd_var(N, n, k) - The variance of the hyper geometric distribution")
|
||||
print("hgd_std(N, n, k) - The standard deviation of the hyper geometric distribution")
|
||||
print(
|
||||
"hgd_upto(x, N, n, k) - The cumulative probability of getting upto x successes in n draws from a population of size N with k successes")
|
||||
print(
|
||||
"hgd_from(x, N, n, k) - The cumulative probability of getting from x successes in n draws from a population of size N with k successes")
|
||||
print("pd(x, l) - The poisson distribution")
|
||||
print("pd_mean(l) - The mean of the poisson distribution")
|
||||
print("pd_var(l) - The variance of the poisson distribution")
|
||||
print("pd_std(l) - The standard deviation of the poisson distribution")
|
||||
print("pd_upto(x, l) - The cumulative probability of getting upto x occurrences")
|
||||
print("pd_from(x, l) - The cumulative probability of getting from x occurrences")
|
||||
|
@ -1,5 +1,3 @@
|
||||
from utils import *
|
||||
|
||||
def i(A, B):
|
||||
"""
|
||||
:param A: First probability
|
||||
@ -34,4 +32,11 @@ def n(A):
|
||||
"""
|
||||
return 1 - A
|
||||
|
||||
man(man)
|
||||
|
||||
def man():
|
||||
print("This module contains functions for computing the total probability of events.")
|
||||
print("The functions are:")
|
||||
print("i(A, B) - The intersection of A and B")
|
||||
print("u(A, B) - The union of A and B")
|
||||
print("g(A, B) - The conditional probability of A given B")
|
||||
print("n(A) - The negation of A")
|
||||
|
Loading…
Reference in New Issue
Block a user