How to plot the binomial distribution for p = 0.3, p = 0.5 and p = 0.7 and the total number of trials n = 60 as a function of k the number of successful trials. For each value of p, determine 1st Quartile, median, mean, standard deviation and the 3rd Quartile. Present those values as a vertical box plot with the probability p on the horizontal axis.
-
3$\begingroup$ Welcome to the site, @RamKotes. This is just a reiteration of your homework problem. What have you done so far, & where are you stuck? $\endgroup$– gung - Reinstate MonicaCommented Feb 20, 2013 at 0:34
-
1$\begingroup$ Do you mean 'how do I compute the probabilities to plot?' or do you mean 'how do I get some package to draw this plot?' or something else? $\endgroup$– Glen_bCommented Feb 20, 2013 at 0:54
1 Answer
You could program the probability density function in Excel, for each $p$. The function is given on wikipedia: https://en.wikipedia.org/wiki/Binomial_distribution
For the quartiles, compute the points at which you get 25%, 50% and 75% of the area under the curve, again for each $p$. You can use the Excel function binom.inv
. Then the boxplots are easy to find.
The mean and standard deviations are computable analytically (there are closed form formulas). Also see the wikipedia page.
If this is a homework question, you should tag it so?