Hello,
In case of binomial probability, where n = 100 and p= 0.6. I would like to compute binomial probability when x = 0, 1, ...., 100 and plot the histogram.
I use the following command:
set obs 100
forvalue i=1/100 {
scalar prob`i' = binomialp(100,`i',0.6)
}
How can I combine the prob1,..., prob100 into one variable to plot the binomial distribution?
Thank You
Related Posts with Probability distribution histogram - binomial
Help for data with multiple quarterly observationsHello and sorry if this question is obvious or incorrect, I have quarterly data from 2007q1 to 2010…
Reshape and group data by highest value of variablesHi Statalisters I am working on a somewhat intricate reshape of my data set. I have done some resea…
Creating spells of 3 months.Dear All, I am using prescription drug claims data and want to identify spells of 3 months of contin…
Question on looping over files in a directory using local and foreachDear Statalists, Recently I am attempting to deal with some .dta files in a local directory on the …
Question on Implementation of First-Difference Regression and InterpretationDear All, I am trying to estimate the effect of tariffs changes on employment within firms. Thus, I…
Subscribe to:
Post Comments (Atom)
0 Response to Probability distribution histogram - binomial
Post a Comment