Math 1710 Class 26 Inference Coffee Machine Dr. Allen Back Using - - PowerPoint PPT Presentation

math 1710 class 26
SMART_READER_LITE
LIVE PREVIEW

Math 1710 Class 26 Inference Coffee Machine Dr. Allen Back Using - - PowerPoint PPT Presentation

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Math 1710 Class 26 Inference Coffee Machine Dr. Allen Back Using Table T t-CIs and HTs A Sample Size Problem Oct. 26, 2016 t-Conditions Robustness Chicken Contamination


slide-1
SLIDE 1

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Math 1710 Class 26

  • Dr. Allen Back
  • Oct. 26, 2016
slide-2
SLIDE 2

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

Suppose:

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

slide-3
SLIDE 3

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Questions:

1 Purdue safer than Store Brand? 2 Tyson safer than Store Brand? 3 Tyson different in safety than Store Brand? 4 Confidence interval for difference in safety between Store

Brand and Tyson?

slide-4
SLIDE 4

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Question: Purdue safer than Store Brand?

slide-5
SLIDE 5

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Question: Purdue safer than Store Brand? Notation: Let p1 denote the proportion of Purdue which are contaminated and p2 the proportion for Store Brand.

slide-6
SLIDE 6

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Question: Purdue safer than Store Brand? Notation: Let p1 denote the proportion of Purdue which are contaminated and p2 the proportion for Store Brand. Hypotheses: H0: p1 = p2 (or p1 ≥ p2) Ha: p1 < p2

slide-7
SLIDE 7

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Hypotheses: H0: p1 = p2 (or p1 ≥ p2) Ha: p1 < p2 ˆ ppooled = .33 · 75 + .45 · 75 75 + 75 = .39

slide-8
SLIDE 8

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Hypotheses: H0: p1 = p2 (or p1 ≥ p2) Ha: p1 < p2 ˆ ppooled = .33 · 75 + .45 · 75 75 + 75 = .39 SEpooled( ˆ p1 − ˆ p2) =

  • .39 · .61

1 75 + 1 75

  • = .0796.
slide-9
SLIDE 9

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Hypotheses: H0: p1 = p2 (or p1 ≥ p2) Ha: p1 < p2 z = ˆ p1 − ˆ p2 SEpooled = −.12 .0796 = −1.51.

slide-10
SLIDE 10

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

z = ˆ p1 − ˆ p2 SEpooled = −.12 .0796 = −1.51. N(0,1)

slide-11
SLIDE 11

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Hypotheses: H0: p1 = p2 (or p1 ≥ p2) Ha: p1 < p2 z = ˆ p1 − ˆ p2 SEpooled = −.12 .0796 = −1.51. P-value = tail probability = P(Z < −1.51) = .0655. At a level of α = .05, we’d retain H0. Purdue might not be safer.

slide-12
SLIDE 12

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Question: Tyson safer than Store Brand?

slide-13
SLIDE 13

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Question: Tyson safer than Store Brand? Notation: Let p2 denote the proportion of Store Brand which are contaminated and p3 the proportion for Tyson.

slide-14
SLIDE 14

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Question: Tyson safer than Store Brand? Notation: Let p2 denote the proportion of Store Brand which are contaminated and p3 the proportion for Tyson. Hypotheses: H0: p3 = p2 (or p3 ≥ p2) Ha: p3 < p2

slide-15
SLIDE 15

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

ˆ ppooled = .45 · 75 + .56 · 75 75 + 75 = .505

slide-16
SLIDE 16

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

ˆ ppooled = .45 · 75 + .56 · 75 75 + 75 = .505 SEpooled( ˆ p2 − ˆ p3) =

  • .505 · .495

1 75 + 1 75

  • = .0816.
slide-17
SLIDE 17

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

z = ˆ p2 − ˆ p3 SEpooled = −.11 .0816 = −1.35.

slide-18
SLIDE 18

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

z = ˆ p2 − ˆ p3 SEpooled = −.11 .0816 = −1.35. Which side provides as much or more support for Ha of p3 < p2?

slide-19
SLIDE 19

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

z = ˆ p2 − ˆ p3 SEpooled = −.11 .0816 = −1.35. Which side provides as much or more support for p3 < p2?

slide-20
SLIDE 20

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Our statistic provides no support for Ha so we immediately retain H0. It is a matter of convention whether we’d view the p-value as .5 or even larger.

slide-21
SLIDE 21

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Question: Tyson different in safety than Store Brand?

slide-22
SLIDE 22

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Question: Tyson different in safety than Store Brand? Notation: Let p2 denote the proportion of Store Brand which are contaminated and p3 the proportion for Yson.

slide-23
SLIDE 23

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Question: Tyson different in safety than Store Brand? Notation: Let p2 denote the proportion of Store Brand which are contaminated and p3 the proportion for Yson. Hypotheses: H0: p2 = p3 Ha: p2 = p3

slide-24
SLIDE 24

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Question: Tyson different in safety than Store Brand? Still ˆ ppooled = .505, SEpooled( ˆ p2 − ˆ p3) = .0816, z = −1.35.

slide-25
SLIDE 25

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Question: Tyson different in safety than Store Brand?

slide-26
SLIDE 26

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

tail probability = P(Z < −1.35) = .0885. P-value = 2(tail probability)=2(.0885)=.177 At a level of α = .05, we’d retain H0. Tyson might not have a different level of safety than Store Brand.

slide-27
SLIDE 27

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Confidence interval for difference in safety between Store Brand and Tyson?

slide-28
SLIDE 28

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Confidence interval for difference in safety between Store Brand and Tyson? SEpooled =

  • .45 · .55

75 + .56 · .44 75 = .0812

slide-29
SLIDE 29

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Confidence interval for difference in safety between Store Brand and Tyson? SEpooled =

  • .45 · .55

75 + .56 · .44 75 = .0812 A 95% CI for p2 − p3 would be −.11 ± 1.96 · .0812 = −.11 ± .159 = (−.269, .049)

slide-30
SLIDE 30

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Chicken Contamination

1 33% of 75 Perdue chickens contaminated. 2 45% of 75 Store Brand chickens contaminated. 3 56% of 75 Tyson chickens contaminated.

Confidence interval for difference in safety between Store Brand and Tyson? SEpooled =

  • .45 · .55

75 + .56 · .44 75 = .0812 A 95% CI for p2 − p3 would be −.11 ± 1.96 · .0812 = −.11 ± .159 = (−.269, .049) The fact that this CI contains 0 is another way of doing the last 2 HT’s.

slide-31
SLIDE 31

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Approximate (e.g. Large Sample) CI’s and HT’s

The basic approach to CI’s and HT’s for means is again based

  • n the sampling distribution of the relevant statistic, namely ¯

x. Under favorable circumstances (e.g. n large), it will be approximately N(µ, σ √n) where µ and σ are the unknown population parameters.

slide-32
SLIDE 32

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Approximate (e.g. Large Sample) CI’s and HT’s

Three ways to deal with the usually unknown σ : Approximate σ by s (Just a preliminary try: Chapter 4 of your text and problems 4.24, 4.26.) Z CI or HT for Means The usual terminology in the unusual case you somehow know or believe you know σ. T CI or HT for Means The main technique which we will shortly study.

slide-33
SLIDE 33

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Approximate (e.g. Large Sample) CI’s and HT’s

The basic logic is similar to the proportion case. For approximate Z CI’s we have ¯ x ± z∗SE(¯ x), SE(¯ x) = s √n. For HT’s, our hypotheses (2-sided case) might be H0 :µ = µ0 Ha :µ = µ0 and our Z-statistic Z = ¯ x − µ0 SE(¯ x) .

slide-34
SLIDE 34

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Approximate (e.g. Large Sample) CI’s and HT’s

4.23 Nutrition labels. The nutrition label on a bag of potato chips says that a one ounce (28 gram) serving of potato chips has 130 calories and contains ten grams of fat, with three grams of saturated fat. A random sample of 35 bags yielded a sample mean of 134 calories with a standard deviation of 17

  • calories. Is there evidence that the nutrition label does not

provide an accurate measure of calories in the bags of potato chips? We have verified the independence, sample size, and skew conditions are satisfied.

slide-35
SLIDE 35

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Approximate (e.g. Large Sample) CI’s and HT’s

Chapter 4 Conditions for Inference on Means: Independence (e.g. Simple Random Sample, 10% condition) Sample Size “Large” n ≥ 30. No Strong Skew

slide-36
SLIDE 36

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Coffee Machine

A coffee vending machine dispenses coffee into a paper cup. You’re supposed to get 10 ounces of coffee., but the amount varies slightly from cup to cup. The amounts measured in a random sample of 20 cups have summary statistics as given

  • below. Is there evidence that the machine is shortchanging

customers? ¯ x = 9.845 s = .1986.

slide-37
SLIDE 37

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Coffee Machine

Notation: Let µ denote the mean amount of coffee in a dispensed cup. Hypotheses: H0: µ = 10 (or µ ≥ 10) Ha: µ < 10

slide-38
SLIDE 38

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Coffee Machine

As usual with HT’s, we are interested in whether the observed statistic of ¯ x = 9.845 is reasonably consistent with the sampling distribution assuming H0 is true.

slide-39
SLIDE 39

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Coffee Machine

If s = σ, we’d look at a Z-statistic Z = ¯ x − µ0

σ √n

= 9.845 − 10

.1986 √ 20

where we’ve written H0 more abstractly as µ = µ0, µ0 being the hypothesized value, 10 in this case.

slide-40
SLIDE 40

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Coffee Machine

Because s will not exactly match σ, we actually get a bit of extra error here. This is compensated for by viewing t = ¯ x − µ0

s √n

= 9.845 − 10

.1986 √ 20

= −.155 .0444 = −3.49. as a t-Statistic.

slide-41
SLIDE 41

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Coffee Machine

Since the error in approximating σ by s varies with the sample size, there is a different t-distribution for each sample size. These are labeled by the “degrees of freedom” which for a 1-sample t-test is: df = n − 1.

slide-42
SLIDE 42

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Using Table T

These are all critical values t∗. For example P(t > 1.328) = .10 for the t distribution with 19 df.

slide-43
SLIDE 43

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Using Table T

Our t-statistic of -3.49 is more extreme than any on the df=19 row of the table. The picture shows what the critical value t∗ = 2.861 for a tail prob. of .005 means.

slide-44
SLIDE 44

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Using Table T

So by symmetry P(T < −2.861) = .005 as well.

slide-45
SLIDE 45

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Using Table T

So our tail probability and p-value are both less than .005 and we reject the null. The machine does appear to be shortchanging.

slide-46
SLIDE 46

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Using Table T

  • Sps. our t-statistic had been -2.00 with the same 1-sided

hypotheses H0: µ = 10 (or µ ≥ 10) Ha: µ < 10 What P-value would we report?

slide-47
SLIDE 47

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Using Table T

  • Sps. our t-statistic had been -2.00 with the same 1-sided

hypotheses H0: µ = 10 (or µ ≥ 10) Ha: µ < 10 What P-value would we report? Answer: A tail probability and P-value of between .025 and .05.

slide-48
SLIDE 48

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Using Table T

  • Sps. instead our t-statistic had been 2.00 with 2-sided

hypotheses H0: µ = 10 Ha: µ = 10 What P-value would we report?

slide-49
SLIDE 49

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Using Table T

  • Sps. instead our t-statistic had been 2.00 with 2-sided

hypotheses H0: µ = 10 Ha: µ = 10 What P-value would we report? Answer: Our tail probability is still between .025 and .05 but

  • ur P-value is now between .05 and .10.
slide-50
SLIDE 50

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Using Table T

  • Sps. instead our t-statistic had been 2.00 with 2-sided

hypotheses H0: µ = 10 Ha: µ = 10 What P-value would we report? In using the table, always be conservative. If you want df=138 and there is a df=120 as well as a df=140 row, the principle of being conservative means to use the df=120 row. When you say “I am 95% confident . . . ” or ”I reject H0”, you’ll be delivering what you promised; with better tables you’d just be able to report your level of confidence as somewhat higher.

slide-51
SLIDE 51

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

By Calculator

TI 83/84: 2nd − → distr − → tcdf(-100,-2,19) to find P(T < −2) for a t-distribution with df = 19.

slide-52
SLIDE 52

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

By Calculator

TI 83/84: 2nd − → distr − → tcdf(-100,-2,19) to find P(T < −2) for a t-distribution with df = 19. TI 89: catalog − → F3 − → 2nd-alpha t . . . tcdf(-100,-2,19) to find P(T < −2) for a t-distribution with df = 19.

slide-53
SLIDE 53

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-CI’s and HT’s

A t-hypothesis test with H0 : µ = µ0 is resolved using a t-statistic of t = ¯ x − µ0

s √n

.

slide-54
SLIDE 54

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-CI’s and HT’s

A t-hypothesis test with H0 : µ = µ0 is resolved using a t-statistic of t = ¯ x − µ0

s √n

. Ha can be any of the three

1 µ = µ0 2 µ > µ0 3 µ < µ0

slide-55
SLIDE 55

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-CI’s and HT’s

A t confidence interval for µ is ¯ x ± t∗ s √n for the same reason as the corresponding formula in the proportion case:

slide-56
SLIDE 56

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-CI’s and HT’s

The two sampling distributions at the border of the CI. The blue lines delimit central regions on the sampling distributions. The CI is between the green lines on the horizontal axis.

slide-57
SLIDE 57

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-CI’s and HT’s

In the coffee machine example, this gives a 95% CI for µ of 9.845 ± 2.093(.0444) = 9.845 ± .093 = (9.752, 9.938) (since n = 20 and SE(¯ x) = s √n = .1986 √ 20 = .0444 here.) You did expect it to not include 10, didn’t you?

slide-58
SLIDE 58

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-Distributions

Let X0, X1, . . . Xd be d + 1 independent standard normal random variables.

slide-59
SLIDE 59

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-Distributions

Let X0, X1, . . . Xd be d + 1 independent standard normal random variables. The t-distribution with d degrees of freedom is defined to be the random variable X0

  • X 2

1 + X 2 2 + . . . + X 2 d

.

slide-60
SLIDE 60

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-Distributions

The t-distribution with d degrees of freedom is defined to be the random variable X0

  • X 2

1 + X 2 2 + . . . + X 2 d

. Think of this as keeping track of the t-statistic ¯ x − µ0

s √n

=

¯ x−µ0

σ √n

s σ

with the top X0 keeping track of the numerator and the denominator

  • X 2

1 + X 2 2 + . . . + X 2 d keeping track of the ratio

  • f s to σ.
slide-61
SLIDE 61

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-Distributions

Just as the normal distribution has the density formula f (x) = e

−(x−µ)2 2σ2

√ 2πσ

slide-62
SLIDE 62

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-Distributions

Methods of calculus show that the density formula for the t-distribution with d degrees of freedom is f (x) = Γ(d+1

2 )

Γ(d

2 )

1 √ dπ 1 (1 + x2

d )

d+1 2

where d is the number of degrees of freedom and Γ(n) = ∞ tn−1e−t dt is the gamma function, a generalized factorial.

slide-63
SLIDE 63

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-Distributions

It will be important when we think about 2-sample tests to realize that the degrees of freedom is just a parameter in the above formula.

slide-64
SLIDE 64

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-Distributions

A little more probability in the tails

slide-65
SLIDE 65

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-Distributions

Cumulative Dist. Fcn (Graphical Form of Table Z)

slide-66
SLIDE 66

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-Distributions

This picture shows why t∗ can be very different from z∗.

slide-67
SLIDE 67

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

t-Distributions

slide-68
SLIDE 68

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

A Sample Size Problem

Suppose we used a pilot sample of size 25 and came up with ¯ x = 815 and s = 1 assuming that all the conditions for t-inference were met. How large a sample size should we choose for a larger sample to achieve a 95% CI with a margin

  • f error of approximately .1?
slide-69
SLIDE 69

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

A Sample Size Problem

Suppose we used a pilot sample of size 25 and came up with ¯ x = 815 and s = 1 assuming that all the conditions for t-inference were met. How large a sample size should we choose for a larger sample to achieve a 95% CI with a margin

  • f error of approximately .1?

Remember the margin of error MOE is half the width of the CI. So MOE = t∗ s √n. There are two complications in using the formula: t∗ depends non-linearly on n s varies from sample to sample

slide-70
SLIDE 70

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

A Sample Size Problem

Suppose we used a pilot sample of size 25 and came up with ¯ x = 815 and s = 1 assuming that all the conditions for t-inference were met. How large a sample size should we choose for a larger sample to achieve a 95% CI with a margin

  • f error of approximately .1?

So MOE = t∗ s √n. There are two complications in using the formula: t∗ depends non-linearly on n s varies from sample to sample The second factor could be kept track of using the Chi Square distribution which we will use (for other purposes) in chapter 26. The textbook treatment is to just make believe s will likely not change much in the next sample.

slide-71
SLIDE 71

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

A Sample Size Problem

Suppose we used a pilot sample of size 25 and came up with ¯ x = 815 and s = 1 assuming that all the conditions for t-inference were met. How large a sample size should we choose for a larger sample to achieve a 95% CI with a margin

  • f error of approximately .1?

So MOE = t∗ s √n. There are two complications in using the formula: t∗ depends non-linearly on n s varies from sample to sample Assuming s does not change, n = t∗s MOE 2

slide-72
SLIDE 72

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

A Sample Size Problem

Suppose we used a pilot sample of size 25 and came up with ¯ x = 815 and s = 1 assuming that all the conditions for t-inference were met. How large a sample size should we choose for a larger sample to achieve a 95% CI with a margin

  • f error of approximately .1?

Assuming s does not change, n = t∗s MOE 2 To deal with t∗, two possibilities: Use z∗ as a rough estimate of t∗. (too low) Or use the t∗ from our sample of size 25 as a too high estimate.

slide-73
SLIDE 73

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

A Sample Size Problem

Suppose we used a pilot sample of size 25 and came up with ¯ x = 815 and s = 1 assuming that all the conditions for t-inference were met. How large a sample size should we choose for a larger sample to achieve a 95% CI with a margin

  • f error of approximately .1?

Assuming s does not change, n = t∗s MOE 2 The first method using z∗ = 1.96 gives n = 1.96 · 1 .1 2 = 19.62 = 384.16.

slide-74
SLIDE 74

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

A Sample Size Problem

Suppose we used a pilot sample of size 25 and came up with ¯ x = 815 and s = 1 assuming that all the conditions for t-inference were met. How large a sample size should we choose for a larger sample to achieve a 95% CI with a margin

  • f error of approximately .1?

Assuming s does not change, n = t∗s MOE 2 For the n = 25 of our pilot study, df = 24 and t∗ = 2.064. So the second method gives n = 2.064 · 1 .1 2 = 20.642 = 426.

slide-75
SLIDE 75

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

A Sample Size Problem

Suppose we used a pilot sample of size 25 and came up with ¯ x = 815 and s = 1 assuming that all the conditions for t-inference were met. How large a sample size should we choose for a larger sample to achieve a 95% CI with a margin

  • f error of approximately .1?

Either of these would be a reasonable approximate answer. Your textbook points out we could use either of the above as a rough estimate of n, determine t∗, and get a better approx. of

  • n. This effect is much smaller than the variation in s from

sample to sample and should be viewed as entirely optional.

slide-76
SLIDE 76

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

A Sample Size Problem

Suppose we used a pilot sample of size 25 and came up with ¯ x = 815 and s = 1 assuming that all the conditions for t-inference were met. How large a sample size should we choose for a larger sample to achieve a 95% CI with a margin

  • f error of approximately .1?

Assuming s does not change, n = t∗s MOE 2 n = 384 means use the df = 250 line and t∗ = 1.969. n = 426 means use the df = 400 line and t∗ = 1.966. Being conservative . . .

slide-77
SLIDE 77

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

A Sample Size Problem

Suppose we used a pilot sample of size 25 and came up with ¯ x = 815 and s = 1 assuming that all the conditions for t-inference were met. How large a sample size should we choose for a larger sample to achieve a 95% CI with a margin

  • f error of approximately .1?

Assuming s does not change, n = t∗s MOE 2 Using t∗ = 1.969, n = 1.969 · 1s .1 2 = 19.692 = 387.7. (19.662 = 386.52.)

slide-78
SLIDE 78

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Conditions for t Tests

random sampling 10% condition nearly normal condition n < 15 unimodal and symmetric or only slight skew 15 <= n < 30 avoid strong (maybe even moderate) skewness and outliers (unimodal and sym best) 30 ≤ n < 60 moderate skewness ok n ≥ 60 pretty much (not really always) ok even with strong skew

slide-79
SLIDE 79

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Conditions for t Tests

random sampling 10% condition nearly normal condition n < 15 unimodal and symmetric or only slight skew 15 <= n < 30 avoid strong (maybe even moderate) skewness and outliers (unimodal and sym best) 30 ≤ n < 60 moderate skewness ok n ≥ 60 pretty much (not really always) ok even with strong skew What Happens if Not Satisfied: random sampling - could be critical; might be ok if ”representative” representative hard/impossible to define

slide-80
SLIDE 80

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Conditions for t Tests

random sampling 10% condition nearly normal condition n < 15 unimodal and symmetric or only slight skew 15 <= n < 30 avoid strong (maybe even moderate) skewness and outliers (unimodal and sym best) 30 ≤ n < 60 moderate skewness ok n ≥ 60 pretty much (not really always) ok even with strong skew What Happens if Not Satisfied: 10% condition - results in overestimation of samp. dist. st dev gradual breakdown in formulas, not method

slide-81
SLIDE 81

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Conditions for t Tests

random sampling 10% condition nearly normal condition n < 15 unimodal and symmetric or only slight skew 15 <= n < 30 avoid strong (maybe even moderate) skewness and outliers (unimodal and sym best) 30 ≤ n < 60 moderate skewness ok n ≥ 60 pretty much (not really always) ok even with strong skew What Happens if Not Satisfied: nearly normal - no guarantee progressive reduction of accuracy

slide-82
SLIDE 82

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Conditions for t Tests

random sampling 10% condition nearly normal condition n < 15 unimodal and symmetric or only slight skew 15 <= n < 30 avoid strong (maybe even moderate) skewness and outliers (unimodal and sym best) 30 ≤ n < 60 moderate skewness ok n ≥ 60 pretty much (not really always) ok even with strong skew What Happens if Not Satisfied:

slide-83
SLIDE 83

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Conditions for t Tests

For 2-sample inference, we add the independence groups assumption. The chance of an individual in one of the groups assuming a certain value should be independent of the values assumed by any of the individuals in the other group.

slide-84
SLIDE 84

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Robustness

Formulas for t-inference and regression inference are based on assumptions of normality of the data. Yet most distributions are not normal. (Although the CLT makes averages of lots normal.) So it is perhaps remarkable that t-inference methods for moderate size data sets without outliers are typically pretty

  • good. Why is this?
slide-85
SLIDE 85

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Robustness

Formulas for t-inference and regression inference are based on assumptions of normality of the data. Yet most distributions are not normal. (Although the CLT makes averages of lots normal.) So it is perhaps remarkable that t-inference methods for moderate size data sets without outliers are typically pretty

  • good. Why is this?

One answer is robustness against non-normality.

slide-86
SLIDE 86

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Robustness

Actual confidence level vs kurtosis for some symmetric n = 25 test distributions in a 1975 Biometrika paper of Pearson and Please. (kurtosis=3 in the normal case.)

slide-87
SLIDE 87

Math 1710 Class 26 V2c 2-Sample Examples Approx Mean Inference Coffee Machine Using Table T t-CI’s and HT’s A Sample Size Problem t-Conditions Robustness

Robustness

Actual confidence level vs kurtosis for some skewed n = 25 test distributions in a 1975 Biometrika paper of Pearson and Please.