Question: Using R, set the R variable val=0. Next, generate 25 values from a binomial distribution where the possible number of successes is 0, 1, .

Using R, set the R variable val=0. Next, generate 25 values from a binomial distribution where the possible number of successes is 0, 1, . . ., 6 and the probability of success is 0.9. This can be accomplished with the command rbinom(20,6, 0.9).

The resulting observations will have values between 0 and 6 inclusive. Compute the median and store it in the R variable val. Repeat this process 5000 times.

You can use the R command for(i in 1:5000) val[i]=median(rbinom(20,6, 0.9)). Speculate about what the plot of the resulting values will look like and check your answer using the R command splot(val).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Probability Statistics Questions!