Contenido del Curso
Probability Theory Update
Probability Theory Update
Probability Mass Function (PMF) 1/2
What is it? The function calculates the probability that a discrete random variable equals the exact value. Example:
Calculate the probability that we will have success with the fair coin (the chance of getting head or tail is 50%) in 4 out of 15 trials. We assume that success means getting a head.
Python realization:
# Import required library import scipy.stats as stats # The desired number of success trial x = 4 # The number of attempts n = 15 # The probability of getting a success p = 0.5 # The resulting probability probability = stats.binom.pmf(x, n, p) print("The probability is", probability * 100, "%")
¡Gracias por tus comentarios!
Probability Mass Function (PMF) 1/2
What is it? The function calculates the probability that a discrete random variable equals the exact value. Example:
Calculate the probability that we will have success with the fair coin (the chance of getting head or tail is 50%) in 4 out of 15 trials. We assume that success means getting a head.
Python realization:
# Import required library import scipy.stats as stats # The desired number of success trial x = 4 # The number of attempts n = 15 # The probability of getting a success p = 0.5 # The resulting probability probability = stats.binom.pmf(x, n, p) print("The probability is", probability * 100, "%")
¡Gracias por tus comentarios!
Probability Mass Function (PMF) 1/2
What is it? The function calculates the probability that a discrete random variable equals the exact value. Example:
Calculate the probability that we will have success with the fair coin (the chance of getting head or tail is 50%) in 4 out of 15 trials. We assume that success means getting a head.
Python realization:
# Import required library import scipy.stats as stats # The desired number of success trial x = 4 # The number of attempts n = 15 # The probability of getting a success p = 0.5 # The resulting probability probability = stats.binom.pmf(x, n, p) print("The probability is", probability * 100, "%")
¡Gracias por tus comentarios!
What is it? The function calculates the probability that a discrete random variable equals the exact value. Example:
Calculate the probability that we will have success with the fair coin (the chance of getting head or tail is 50%) in 4 out of 15 trials. We assume that success means getting a head.
Python realization:
# Import required library import scipy.stats as stats # The desired number of success trial x = 4 # The number of attempts n = 15 # The probability of getting a success p = 0.5 # The resulting probability probability = stats.binom.pmf(x, n, p) print("The probability is", probability * 100, "%")