of 24

• date post

22-Feb-2016
• Category

## Documents

• view

56

3

Embed Size (px)

description

CHAPTER 6 Statistical Inference & Hypothesis Testing . 6.1 - One Sample Mean μ , Variance σ 2 , Proportion π 6.2 - Two Samples Means, Variances, Proportions μ 1 vs. μ 2 σ 1 2 vs. σ 2 2 π 1 vs. π 2 6.3 - Multiple Samples Means, Variances, Proportions - PowerPoint PPT Presentation

### Transcript of CHAPTER 6 Statistical Inference & Hypothesis Testing

Slide 1

6.1 - One Sample Mean , Variance 2, Proportion

6.2 - Two Samples Means, Variances, Proportions 1 vs. 2 12 vs. 22 1 vs. 2

6.3 - Multiple Samples Means, Variances, Proportions 1, , k 12, , k2 1, , kCHAPTER 6 Statistical Inference & Hypothesis Testing 1 6.1 - One Sample Mean , Variance 2, Proportion

6.2 - Two Samples Means, Variances, Proportions 1 vs. 2 12 vs. 22 1 vs. 2

6.3 - Multiple Samples Means, Variances, Proportions 1, , k 12, , k2 1, , kCHAPTER 6 Statistical Inference & Hypothesis Testing 2

Consider two independent populations Null Hypothesis H0: 1 = 2, i.e., 1 2 = 0 (No mean difference") Test at signif level POPULATION 1and a random variable X, normally distributed in each. POPULATION 2Classic Example: Randomized Clinical Trial Pop 1 = Treatment, Pop 2 = ControlX2 ~ N(2, 2)

11

22X1 ~ N(1, 1)Random Sample, size n1Random Sample, size n2Sampling Distribution =?

0

3

Consider two independent populations Null Hypothesis H0: 1 = 2, i.e., 1 2 = 0 (No mean difference") Test at signif level POPULATION 1and a random variable X, normally distributed in each. POPULATION 2Classic Example: Randomized Clinical Trial Pop 1 = Treatment, Pop 2 = ControlX2 ~ N(2, 2)

11

22X1 ~ N(1, 1)Random Sample, size n1Random Sample, size n2Sampling Distribution =?

0

4Mean(X Y) = Mean(X) Mean(Y)

Consider two independent populations Null Hypothesis H0: 1 = 2, i.e., 1 2 = 0 (No mean difference") Test at signif level POPULATION 1and a random variable X, normally distributed in each. POPULATION 2Classic Example: Randomized Clinical Trial Pop 1 = Treatment, Pop 2 = ControlX2 ~ N(2, 2)

11

22X1 ~ N(1, 1)Random Sample, size n1Random Sample, size n2Sampling Distribution =?

Recall from section 4.1 (Discrete Models):and if X and Y are independentVar(X Y) = Var(X) + Var(Y) 0

5

Consider two independent populations Null Hypothesis H0: 1 = 2, i.e., 1 2 = 0 (No mean difference") Test at signif level POPULATION 1and a random variable X, normally distributed in each. POPULATION 2Classic Example: Randomized Clinical Trial Pop 1 = Treatment, Pop 2 = ControlX2 ~ N(2, 2)

11

22X1 ~ N(1, 1)Random Sample, size n1Random Sample, size n2Sampling Distribution =?

Recall from section 4.1 (Discrete Models):Mean(X Y) = Mean(X) Mean(Y)and if X and Y are independentVar(X Y) = Var(X) + Var(Y) 0

6

Consider two independent populations Null Hypothesis H0: 1 = 2, i.e., 1 2 = 0 (No mean difference") Test at signif level POPULATION 1and a random variable X, normally distributed in each. POPULATION 2Classic Example: Randomized Clinical Trial Pop 1 = Treatment, Pop 2 = ControlX2 ~ N(2, 2)

11

22X1 ~ N(1, 1)Random Sample, size n1Random Sample, size n2Sampling Distribution =?

Recall from section 4.1 (Discrete Models):Mean(X Y) = Mean(X) Mean(Y)and if X and Y are independentVar(X Y) = Var(X) + Var(Y) 0

7

Consider two independent populations Null Hypothesis H0: 1 = 2, i.e., 1 2 = 0 (No mean difference") Test at signif level POPULATION 1and a random variable X, normally distributed in each. POPULATION 2Classic Example: Randomized Clinical Trial Pop 1 = Treatment, Pop 2 = ControlX2 ~ N(2, 2)

11

22X1 ~ N(1, 1)Random Sample, size n1Random Sample, size n2Sampling Distribution =?

Recall from section 4.1 (Discrete Models):Mean(X Y) = Mean(X) Mean(Y)and if X and Y are independentVar(X Y) = Var(X) + Var(Y) 0

8

Consider two independent populations Null Hypothesis H0: 1 = 2, i.e., 1 2 = 0 (No mean difference") Test at signif level POPULATION 1and a random variable X, normally distributed in each. POPULATION 2Classic Example: Randomized Clinical Trial Pop 1 = Treatment, Pop 2 = ControlX2 ~ N(2, 2)

11

22X1 ~ N(1, 1)Random Sample, size n1Random Sample, size n2Sampling Distribution =?

Recall from section 4.1 (Discrete Models):Mean(X Y) = Mean(X) Mean(Y)and if X and Y are independentVar(X Y) = Var(X) + Var(Y) 0

9

Consider two independent populations Null Hypothesis H0: 1 = 2, i.e., 1 2 = 0 (No mean difference") Test at signif level POPULATION 1and a random variable X, normally distributed in each. POPULATION 2Classic Example: Randomized Clinical Trial Pop 1 = Treatment, Pop 2 = ControlX2 ~ N(2, 2)

11

22X1 ~ N(1, 1)Random Sample, size n1Random Sample, size n2Sampling Distribution =?

Recall from section 4.1 (Discrete Models):Mean(X Y) = Mean(X) Mean(Y)and if X and Y are independentVar(X Y) = Var(X) + Var(Y) 0

10

Consider two independent populations Null Hypothesis H0: 1 = 2, i.e., 1 2 = 0 (No mean difference") Test at signif level POPULATION 1and a random variable X, normally distributed in each. POPULATION 2Classic Example: Randomized Clinical Trial Pop 1 = Treatment, Pop 2 = ControlX2 ~ N(2, 2)

11

22X1 ~ N(1, 1)Random Sample, size n1Random Sample, size n2Sampling Distribution =?

Recall from section 4.1 (Discrete Models):Mean(X Y) = Mean(X) Mean(Y)and if X and Y are independentVar(X Y) = Var(X) + Var(Y) 0

= 0 under H011

Consider two independent populations Null Hypothesis H0: 1 = 2, i.e., 1 2 = 0 (No mean difference") Test at signif level POPULATION 1and a random variable X, normally distributed in each. POPULATION 2X2 ~ N(2, 2)

11

22X1 ~ N(1, 1)Null Distribution

0s.e.But what if 12 and 22 are unknown?

Then use sample estimates s12 and s22 with Z- or t-test, if n1 and n2 are large.12

Consider two independent populations Null Hypothesis H0: 1 = 2, i.e., 1 2 = 0 (No mean difference") Test at signif level POPULATION 1and a random variable X, normally distributed in each. POPULATION 2X2 ~ N(2, 2)

11

22X1 ~ N(1, 1)Null Distribution

0s.e.But what if 12 and 22 are unknown?

Then use sample estimates s12 and s22 with Z- or t-test, if n1 and n2 are large.(But what if n1 and n2 are small?)

Later13

Example: X = \$ Cost of a certain medical service Data Sample 1: n1 = 137

NOTE:> 0Assume X is known to be normally distributed at each of k = 2 health care facilities (groups).Clinic: X2 ~ N(2, 2)

Hospital: X1 ~ N(1, 1)

Null Hypothesis H0: 1 = 2, i.e., 1 2 = 0 (No difference exists.")

2-sided test at significance level = .05

Sample 2: n2 = 140

Null Distribution

0

4.295% Confidence Interval for 1 2:95% Margin of Error = (1.96)(4.2) = 8.232 (84 8.232, 84 + 8.232) = (75.768, 92.232) does not contain 0 Z-score =

= 20 >> 1.96 p 2 * (1 - pt(3.5, 6))[1] 0.01282634Reject H0 at = .05stat signif, Hosp > Clinic

Data: Sample 1 = {667, 653, 614, 612, 604}; n1 = 5 Sample 2 = {593, 525, 520}; n2 = 3

Analysis via T-test (if equivariance holds): Point estimates

NOTE:> 0Group Means

The pooled variance is a weighted average of the group variances, using the degrees of freedom as the weights.

Group VariancesPooled Variance

SS = 6480

22R code:

> y1 = c(667, 653, 614, 612, 604)> y2 = c(593, 525, 520)> > t.test(y1, y2, var.equal = T)

Two Sample t-test

data: y1 and y2 t = 3.5, df = 6, p-value = 0.01283alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: 25.27412 142.72588 sample estimates:mean of x mean of y 630 546 p-value < = .05Reject H0 at this level.The samples provide evidence that the difference between mean costs is (moderately) statistically significant, at the 5% level, with the hospital being higher than the clinic (by an average of \$84).Formal ConclusionInterpretationNEXT UP

PAIRED MEANSpage 6.2-7, etc.