In: Statistics and Probability
Using R-studio
2. Consider an experiment where we flip a fair coin six times in a row, and i is the number of heads tossed:
a. Calculate the probability mass function for i = 0. . . 6 using the equation from Ross section 2.8 for Binomial Random Variables
b. Conduct a simulation of this experiment in R, with T trials of the experiment – pick several values of T from 10 to 10,000.
c. Create a plot of the theoretical result vs. your simulation at T = 100 and T = 10,000. Show that they converge as T increases.
c)actuals plot for T=100
theoretical plot for T=100
actuals plot for T=10,000
Theoretical at T=10000 (If you cannot understand which plot it is then look at the Y axis and you will get it is for which T value)
R code for the above plots
As we can rightly observe that the plots start to converge as T increases from 100 to 100000 as the actuals vs theoretical difference starts becoming small in the later plots which is the tendency of Central Limit Theorem as well
Hope the above answer has helped you in understanding the problem. Please upvote the ans if it has really helped you. Good Luck!!