Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need help with Part 2 Exercise 2. Just that part only Simulation of the Binomial

ID: 3706600 • Letter: N

Question

Need help with Part 2 Exercise 2. Just that part only

Simulation of the Binomial Distribution Introduction: It is possible to calculate the probability of a specific result of a random variable that is binomially distributed. The formula P(xxCxpnis used to calculate the desired probability. The question arises how can a binomially distributed random variable be simulated? Arguably this question motivates considering the Bernoulli trials that make up the binomial experiment. In this project there will be a comparison of theoretical results with the results of simulations. Part 1 Let us consider a simple binomial distribution experiment. Let there be five trials. In each trial the probability of success is 0.7. What is the probability of exactly three successes? Exercise 1. Calculate the probability using the formula above. Simulation 1. Write a Python program to simulate the specific problem above. In this program import and use the Python random number generator. You, arguably, need to consider the finite number of Bernoulli trials in the problem and the number of successes in the finite number of Bernoulli trials. Part 2 Consider the same simple binomial distribution experiment as above with five trials and in each trial the probability of success is 0.7. What is the expected (average) value? Exercise 2. Calculate using the formula unp. Simulation 2. Augment the program from simulation 1 to calculate the expected value of the binomial .v

Explanation / Answer

In the exercise 2 of the Part 2, we have been simply asked to calculate the mean of the binomial distribution experiment.

In the given problem, we have be told following:

"Binomial idstribution experiment as above with five trials and in each trial, the probability of success is 0.7"

From the above statement, we can extract the values of the variables to be used in answering the problem

These variables are :

Number of trials = n = 5

Probability of success = p = 0.7

Expected value of a simple binomial distribution is given by n*p,

Hence Average = 5*0.7 = 3.5

Here, don't get confused with the value obtained, it need not be less than 1. It is the expected value of random variable, it is not probability. So, it's value can be greater than 1.