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
STATA command to execute code and return error messageHello, I have written a script to automatically run several do files in a folder and print either s…
CMP model with interaction between endogenous and exogenous variablesDear all, I am having an endogenous variable X1 and an exogenous variable X2 and instruments Z1 and…
The Monty Hall problem through permutations: can somebody translate the Stata code below to R code?Good morning, I have written a paper on how one can use the Monty Hall problem (with the 3 doors an…
Count Number of Unique Values Across VariablesHello, I am trying to figure out how I can count the number of unique values across several variable…
comparing difference in average marginal effects (AME) between stratified samplesHi Statalists, I was wondering how to conduct a significance test to compare the difference in aver…
Subscribe to:
Post Comments (Atom)
0 Response to Probability distribution histogram - binomial
Post a Comment