Inference and Confidence Intervals

13
Inference and Confidence Intervals

description

Inference and Confidence Intervals. Outline. Inferring a population mean : Constructing confidence intervals Examining the difference between two means for the same p erson Confidence intervals for the difference between groups Confidence intervals for medians Summary. - PowerPoint PPT Presentation

Transcript of Inference and Confidence Intervals

Page 1: Inference and Confidence Intervals

Inference and Confidence Intervals

Page 2: Inference and Confidence Intervals

Outline

• Inferring a population mean: Constructing confidence intervals

• Examining the difference between two means for the same person

• Confidence intervals for the difference between groups• Confidence intervals for medians• Summary

Page 3: Inference and Confidence Intervals

Constructing Confidence Intervals

• Population μ (pronounced mu) • Estimate with sample mean ( ), the plug-in principle• But with sampling error. Estimating the region which will

usually include the population mean.

• t0.05 is usually about 2, but you need to look it up the t table.• Need to know df. df = n - 1 for this test. Here 94 - 1 = 93.

nsdtxCI 05.0%95

Page 4: Inference and Confidence Intervals

Example: Newton's (1998) Hostility Data

• The mean on arrival for the 94 prisoners was 28.3 with a standard deviation of 8.0.

• df = n-1 so 93, or about 90 for the t table

setxnsdtxCI 05.005.0%95

29.9 to26.7or 6.13.28

)825(.99.13.28940.899.13.28%95

CI

Page 5: Inference and Confidence Intervals

6.13.28940.899.13.28%95 CI

Page 6: Inference and Confidence Intervals

t distribution with df = 93 and 2.5% in each tail

Page 7: Inference and Confidence Intervals

What does having 95% CI of 28.3 ± 1.6 mean?

We expect that about 95% of the time when a confidence interval is made that the population mean (μ) will be within the interval created. This allows us to be fairly confident that the confidence interval we calculate contains the population mean.

It is not that there is a 95% probability that μ is within the interval. This is a tricky concept.

Confidence intervals are a fundamental tool for the frequentist statistician. In the long run, you should be right (i.e., μ with the interval) about 95% of the time.

Page 8: Inference and Confidence Intervals

Plotting the precision of the estimate (confidence intervals) and the spread of the distribution (standard deviations).Both are in units of the original variable (here in years).

Years in prison

Freq

uenc

y

0 10 20 30

010

2030

40

x sd

95% CI: x t0.05sdn

Page 9: Inference and Confidence Intervals

Examining the Difference between Two Means for the Same Person

• Difference in means ± t0.05 times standard error• Standard error of difference using estimate of the standard

deviation of the difference.

• Just calculate a variable for the difference, and perform the calculations as you did before.

n

sdtdiff

n

sdtxxCI diffdiff

ii 05.005.0%95 21

Page 10: Inference and Confidence Intervals
Page 11: Inference and Confidence Intervals

Brewed Awakeningshttp://mybrewedawakening.com/

• • Table 5.1 Data from 10 participants comparing how much they like two different types of coffee. • • FRESHi INSTANTi DIFFi DIFFi - (DIFFi - ) 2• 5 3 2 1 1• 4 3 1 0 0• 6 5 1 0 0• 3 4 -1 -2 4• 4 4 0 -1 1• 5 3 2 1 1• 6 3 3 2 4• 3 3 0 -1 1• 5 3 2 1 1• 4 4 0 -1 1• Sum 45 35 10 0 14• Mean 4.5 3.5 1.0 0 1.56*• * This 1.56 is not the actual mean. It is the variance of the variable DIFFi, the sum of squares divided by the number of

cases minus one (14/9). We calculated it this way because it can be used in later calculations.• ________________________________________________________________________• •

Page 12: Inference and Confidence Intervals
Page 13: Inference and Confidence Intervals