Home /
Expert Answers /
Computer Science /
im-stuck-on-part-3-use-python-methods-to-calculate-the-following-probabilities-for-a-binomial-dist-pa136
(Solved):
im stuck on part 3
Use Python methods to calculate the following probabilities for a binomial dist ...
im stuck on part 3
Use Python methods to calculate the following probabilities for a binomial distribution with variables \( \mathrm{n} \) and \( \mathrm{pi} \). - \( P(X=28) \) - \( P(X \leq 28) \) - \( P(X>28) \) The code provided loads the packages and functions, reads variables \( \mathrm{n} \) and \( \mathrm{pi} \) from input, and prints the calculated probabilities. Two functions are available in scipy.stats for calculating binomial probabilities: - binom. pmf( ) calculates the probability that a binomial random variable is equal to a given value, \( \mathrm{k} \). - binom. \( c d f() \) calculates the probability that a binomial random variable is less than or equal to a given value, \( k \). The complement rule \( P( \) not \( A)=1-P(A) \) should be used to find the probability that a binomial random variable is greater than a given value. Not all tests passed.