Google returned that the function is BINOMDIST:
Binomial Probabilities in Excel
In a particular city, it is believed that 30% of people who are eligible to vote there, support the Liberal Democrat party. If 31 people (who are eligible to vote there) are selected at random, what is the probability that the following number will support the Liberal Democrats? Giving your answers to 4 decimal places, use Excel to find the following: (a) more than 10 (b) Fewer than 6 (c) exactly 9 (d) What is the expected number of people to support the Liberal Democrats? (e) Assuming all members of the sample support a political party, how many are expected to support another party? Can someone please go answers with me/how to do it in excel. I would be extremely grateful.
The example is shown at the bottom of the link:
To find the probability in the binomial P(X = x) for n trials, p - probability of ai success, and a given x we use
For a probability P(X < x) with same definitions above we use:
I'll provide an example for the first question:
More than 10.
Cumulative = true
Note: when I said P(X < x) i should have said P(X <= x) instead.
So since P(X > x) = 1 - P(X <=x) then
P(X > 10) is in excel
Note that you may have to use algebraic expressions of the function. I have used 1 - P(X > 10) in this example (it won't always be simply =binomdist(whatever)).
For d) you will need to calculate P(X=x) for all values of x using binomdist.
So in excel if you have a spreadsheet with a free column, then do the following:
=binomdist(x,31,0.3,false) for all values of x (do fill down)
in other column do a fill down for the values of x
In another column calculated the product of the two adjoining cells for each row.
Then for this last column add up all the values to get your expectation.
For your last question you have to estimate the parameter p from the sample.
The typical way to estimate given a large enough sample is to use p_hat = number_of_successes/number_of_trials and p_var = SQRT(p_hat*(1-p_hat)/number_of_trials where number_of_trials is the sample size.
Relative to this sample, if it is an unbiased sample (and that is a big assumption), then use the above to calculate a confidence interval.
Since you haven't given a sample, your question can't be answered until you do.