Confidence intervals, P values, Error and Power Flashcards
What is the purpose of confidence intervals?
When we take a sample, the mean is an estimation of the population mean but we have some randomness. Confidence intervals are an attempt to quantify that randomness, giving us a range via an upper and lower bound in which If we would repeat the experiment, in __% of the time, the true pop. mean ( ) will fall within the constructed interval.
For example the classic 95% confidence interval:
95%CI : P(x −1.96 ∗SE ≤μ≤+ x + 1.96 ∗SE)
α= 0.05
left border: x ̄ −1.96 ∗SE
right border: x ̄ + 1.96 ∗SE
Where does this value of 1.96 come from?
1.96 standard deviations either direction of a normal distribution constitutes a range which contains 95% of the values in the distribution
How can you show this (1.96) using R functions? (2)
qnorm(.025, 0, 1) # left border in standard normal distribution ## [1] -1.959964
pnorm(-1.96) ## [1] 0.0249979
If we simulated data with 100 samples of 30 and 100 samples of 300:
Would there be less CI that don’t include the true mean?
Does the width of the CI change?
since sd/sqrt(N) is affected by the sample mean in:
P(x −1.96 ∗ sd/sqrt(N) ≤μ≤+ x + 1.96 ∗ sd/sqrt(N))
the width of the CI does change and become smaller with higher numbers.
However we are still collecting 95% confidence intervals so the frequency does not change. Instead the CI’s become more informative as the range is smaller