-
Notifications
You must be signed in to change notification settings - Fork 0
Probability Distribution
medasmarathon edited this page May 30, 2022
·
4 revisions
Simulate the Probability distribution from user-function provided.
In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment.[1][2] It is a mathematical description of a random phenomenon in terms of its sample space and the probabilities of events (subsets of the sample space).[3]
Probability distribution definition - Wiki
from probnode import ProbabilityDistribution
Constructor | Description | Link |
---|---|---|
ProbabilityDistribution( prob_function: Callable ) |
Initialize Probability distribution with input function. | basic |
Method | Description | Link |
---|---|---|
probability_distribution(event) |
Returns the probability of the Event passed in | basic |
Recommended to use ProbabilityDistribution
in a more succinct fashion
@ProbabilityDistribution
def my_custom_distribution_function(event):
...
# Then using the declared function
my_custom_distribution_function(event) # Directly
RandomVariable(my_custom_distribution_function, sample_space) # Or inside RandomVariable constructor