Cumulative Distribution Function (CDF) 1/2
What is it?
This function calculates the probability that the random variable X will take the value less than or equal to x. Example:
Calculate the probability that we will have success with the fair coin (the chance of getting head or tail is 50%) in at least in 4 out of 15 trials. We assume that success means getting a head.
Python realization:
1234567891011121314# 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.cdf(x, n, p) print("The probability is", probability * 100, "%")
¡Gracias por tus comentarios!
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Resumir este capítulo
Explicar el código en file
Explicar por qué file no resuelve la tarea
Awesome!
Completion rate improved to 3.7
Cumulative Distribution Function (CDF) 1/2
Desliza para mostrar el menú
What is it?
This function calculates the probability that the random variable X will take the value less than or equal to x. Example:
Calculate the probability that we will have success with the fair coin (the chance of getting head or tail is 50%) in at least in 4 out of 15 trials. We assume that success means getting a head.
Python realization:
1234567891011121314# 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.cdf(x, n, p) print("The probability is", probability * 100, "%")
¡Gracias por tus comentarios!
Awesome!
Completion rate improved to 3.7single