Analysing proportions Flashcards
Binomial distribution and assumptions
The probability distribution for the number of ‘successes’ in a fixed number of independent trials, when the probability of success is the same in each trial
Its assumptions are:
o The number of trials (n) is fixed
o Each trial is independent
o The P(success) is the same in each trial
The binomial formula
This formula gives the probability ox X successes in n trials, where the outcome of any trial is a success or a failure
P[X successes]=(n/x) p^x (1-p)^n-x
Sampling distribution of the proportion
The sample proportion (p hat) is an unbiased estimator of population proportion.
Proportion of success can be plotted against proability to create a sampling distribution.
Standard error of the sampling distirbution
SEp = square root p(1-p)/n
The binomial test
The binomial test compares the observed number of successes in a data set to that expected under a null hypothesis.
The null distribution of the number of successes under H0 is the binomial distribution, and so the binomial formula can be used to calculate the P-value for the test.
The binomial test is used when
1) a variable in a population has two possible states
2) We wish to test whether the relative frequency of success in population (p) matches the null expectation (p0)
Tests tend to be two tailed so multiply probaility obtained from repeated the binomial equation by 2.
Can only do if P is close to 0.5 or sampling size is large.
Approximations of binomial test
The binomial test is not alwas possible if n is large.
Instead you can estimate the proportion (p hat) and work out the standard error and CI to see if the null proportion is within the CI
Methods to calculate standard error for proportions
Agresti-Coull method:
p’= (X+2)/(n+4)
p’-1.96 sqrt p’(1-p’)/n+4 <p< p’+1.96 sqrt p’(1-p’)/n+4
The Wald method:
p- 1.96SE <p< p+ 1.96SE