Test about a Population Proportion

advertisement

Test about a Population Proportion

Summary for large-sample tests for population proportion p

Null hypothesis: H

0

Test statistic value:

: p = p z =

0

√ p

0

ˆ − p

0

(1 − p

0

) / n

Alternative Hypothesis

H a

: p > p

0

H a

: p < p

0

H a

: p = p

0

Rejection Region z ≥ z

α

(upper-tailed) z ≤ − z

α either z ≥ z

α/ 2 or

(lower-tailed) z ≤ − z

α/ 2

(two-tailed)

Remark: These test procedures are valid provided that np

0 and n (1 − p

0

) ≥ 10.

≥ 10

Test about a Population Proportion

Type II Error β for large-sample tests

Alternative Hypothesis β ( p

0

)

H a

: p > p

0

Φ p

0

− p

0

√ z

α p

0

√ p

0

(1 − p

0

) / n

(1 − p

0

) / n

H

H a a

: p < p

: p > p

0

0

1 − Φ p

0

− p

0

√ z

α p

0

√ p

0

(1 − p

0

(1 − p

0

) / n

) / n

Φ

Φ p

0

− p

0

+ z

√ α/ 2 p

0

√ p

0

(1 − p

0

) / n

(1 − p

0 p

0

− p

0

− z

√ α/ 2 p 0

) / n p

0

(1 − p

0

) / n

(1 − p 0 ) / n

Test about a Population Proportion

Small-Sample Tests

When the sample size n is small ( n ≤ 30), we test the hypotheses based directly on the binomial distribution.

For example, if the null hypothesis is H

0 alternative hypothesis is H a

: p > p

0

: p = p

0 and the

, then the rejection region is of the form X ≥ c , where X ∼ Bin ( n , p ).

P (type I error) = P (reject H

0

| H

0

) = P ( X ≥ c | p = p

0

)

= 1 − P ( X < c | p = p

0

) = 1 − P ( X ≤ c − 1 | p = p

0

)

= 1 − B ( c − 1; n , p

0

)

And

P (type II error) = P (fail to reject H

0

| p = p

0

) = P ( X < c | p = p

= P ( X ≤ c − 1 | p = p

0

) = B ( c − 1; n , p

0

)

0

)

Test about a Population Proportion

Small-Sample Tests

When the sample size n is small ( n ≤ 30), we test the hypotheses based directly on the binomial distribution.

For example, if the null hypothesis is H

0 alternative hypothesis is H a

: p > p

0

: p = p

0 and the

, then the rejection region is of the form X ≥ c , where X ∼ Bin ( n , p ).

P (type I error) = P (reject H

0

| H

0

) = P ( X ≥ c | p = p

0

)

= 1 − P ( X < c | p = p

0

) = 1 − P ( X ≤ c − 1 | p = p

0

)

= 1 − B ( c − 1; n , p

0

)

And

P (type II error) = P (fail to reject H

0

| p = p

0

) = P ( X < c | p = p

= P ( X ≤ c − 1 | p = p

0

) = B ( c − 1; n , p

0

)

0

)

Test about a Population Proportion

Small-Sample Tests

When the sample size n is small ( n ≤ 30), we test the hypotheses based directly on the binomial distribution.

For example, if the null hypothesis is H

0 alternative hypothesis is H a

: p > p

0

: p = p

0 and the

, then the rejection region is of the form X ≥ c , where X ∼ Bin ( n , p ).

P (type I error) = P (reject H

0

| H

0

) = P ( X ≥ c | p = p

0

)

= 1 − P ( X < c | p = p

0

) = 1 − P ( X ≤ c − 1 | p = p

0

)

= 1 − B ( c − 1; n , p

0

)

And

P (type II error) = P (fail to reject H

0

| p = p

0

) = P ( X < c | p = p

= P ( X ≤ c − 1 | p = p

0

) = B ( c − 1; n , p

0

)

0

)

Test about a Population Proportion

Small-Sample Tests

When the sample size n is small ( n ≤ 30), we test the hypotheses based directly on the binomial distribution.

For example, if the null hypothesis is H

0 alternative hypothesis is H a

: p > p

0

: p = p

0 and the

, then the rejection region is of the form X ≥ c , where X ∼ Bin ( n , p ).

P (type I error) = P (reject H

0

| H

0

) = P ( X ≥ c | p = p

0

)

= 1 − P ( X < c | p = p

0

) = 1 − P ( X ≤ c − 1 | p = p

0

)

= 1 − B ( c − 1; n , p

0

)

And

P (type II error) = P (fail to reject H

0

| p = p

0

) = P ( X < c | p = p

= P ( X ≤ c − 1 | p = p

0

) = B ( c − 1; n , p

0

)

0

)

Test about a Population Proportion

Small-Sample Tests

Remark: in the samll-sample case, it is usually not possible to find a vale c for which P (type I error) is exactly the desired significance level α . Therefore we choose the largest rejection region which statisfying

P (type I error) < α.

P-value

Definition

The P-value (or observed significance level ) is the smallest level of significance at which H

0 would be rejected when a specified test procedure is used on a given data set. Once the P -value has been determined, the conclusion at any partivular level α results from comparing the P -value to α :

1.

P -value ≤ α ⇒ reject H

0 at level α .

2.

P -value > α ⇒ fail to reject H

0 at level α .

Convention: it is customary to call the data significant when H

0 is rejected and not significant otherwise.

P-value

P -value for z Tests

P =

1 − Φ( z )

Φ( z ) for an upper-tailed test for a lower-tailed test

 2[1 − Φ( | z | )] for a two-tailed test where Φ( z ) is the cdf for standard normal rv.

Statistical Inference Based on Two Samples

Basic Assumptions

1.

X

1

, X

2

, . . . , X m is a random sample from a population with mean µ

1 and variance σ 2

1

.

2.

Y

1

, Y

2

, . . . , Y m is a random sample from a population with mean µ

2 and variance σ 2

2

.

3. The two samples are independent of one another.

Proposition

The expected value of deviation of

¯ −

¯ − ¯

µ

1

− µ

2 and the standard

σ

¯

− Y

= r

σ 2

1 m

+

σ 2

2 n

Samples from Normal Populations with Known Variances

If the the two samples X

1

, X

2

, . . . , X m and Y

1

, Y

2

, . . . , Y m are from normal populations, then we have

¯

¯

∼ N ( µ

1

− µ

2

,

σ 2

1 m

+

σ 2

2 ) n

Therefore,

Z =

( ¯ −

¯

) − ( µ

1

− µ

2

) q

σ

2

1 m

+

σ

2

2 n is a standard normal rv.

Samples from Normal Populations with Known Variances

If the population variances are known to be σ 2

1 and σ 2

2

, then the two-sided confidence interval for the difference of the population means µ

1

− µ

2 with confidence level 1 − α is

¯ − ¯ − z

α/ 2 r σ 2

1 m

+

σ 2

2 , n

¯ − ¯

+ z

α/ 2 r σ 2

1 m

+

σ 2

2

!

n

Samples from Normal Populations with Known Variances

In case of known population variances, the procedures for hypothesis testing for the difference of the population means

µ

1

− µ

2 is similar to the one sample test for the population mean:

Null hypothesis H

0

: µ

1

− µ

2

= ∆

0

Test statistic value z =

( ¯ − q

σ

2

1 m

¯

) − ∆

0

+

σ

2

2 n

Alternative Hypothesis Rejection Region for Level α Test

H a

: µ

H

H a a

: µ

: µ

1

1

1

− µ

2

− µ

2

− µ

2

> ∆

< ∆

= ∆

0

0

0 z ≥ z z ≥ z

α z ≤ − z

α

α/ 2

(upper-tailed)

(lower-tailed) or z ≤ − z

α/ 2

(two-tailed)

Samples from Normal Populations with Known Variances

The type II error when µ

1

− µ

2

= ∆

0 is calculated similarly as the one sample case:

Alternative Hypothesis Type II Error Probability β (∆

0

) for Level α Test

H a

: µ

H a

: µ

1

1

− µ

− µ

2

2

> ∆

< ∆

0

0

Φ z

α/ 2

+

Φ z

α

+

1 − Φ − z

α

0

σ

0

+

0

− ∆

0

σ

0

− ∆

0

σ

− Φ − z

α/ 2

0

− ∆

0

σ

H a

: µ

1

− µ

2

= ∆

0 where

σ = σ

¯ − Y

= q

( σ

2

1

/ m ) + ( σ

2

2

/ n ) .

Large Size Samples

Example 9.1

Analysis of a random sample consisting of m = 20 specimens of cold-rolled steel to determine yield strengths resulted in a sample average strength of ¯ = 29 .

8 ksi. A second random sample of n = 25 two-sided galvanized steel specimens gave a sample average strength of ¯ = 34 .

7 ksi. Assuming that the two yield-strengh distributions are normal with σ

1

= 4 .

0 and σ

2

= 5 .

0 , does the data indicate that the corresoponding true average yield strengths µ

1 and µ

2 are different?

Large Size Samples

When the sample size is large, both ¯ Y are approximately normally distributed, and

Z =

( ¯ − ¯

) − ( µ

1

− µ

2

) q

S

2

1 m

+

S

2

2 n is approximately a standard normal rv.

Large Size Samples

In case both m and n are large ( m , n > 30), the procedure for constructing confidence interval and testing hypotheses for the difference of two population means are similar to the one sample case.

The two-sided confidence interval for the difference of the population means µ

1

− µ

2 with confidence level 1 − α is

¯ − ¯ − z

α/ 2 s

S

1

2 m

+

S

2

2

, n

¯ − ¯

+ z

α/ 2 s

S

1

2 m

+

S

2

2

 n

Large Size Samples

In case both m and n are large ( m , n > 30), the procedures for hypothesis testing for the difference of the population means

µ

1

− µ

2 is :

Null hypothesis H

0

: µ

1

− µ

2

= ∆

0

Test statistic value z =

( ¯ − q

S

2

1 m

¯

) − ∆

0

+

S

2

2 n

Alternative Hypothesis Rejection Region for Level α Test

H a

: µ

H

H a a

: µ

: µ

1

1

1

− µ

2

− µ

2

− µ

2

> ∆

< ∆

= ∆

0

0

0 z ≥ z z ≥ z

α z ≤ − z

α

α/ 2

(upper-tailed)

(lower-tailed) or z ≤ − z

α/ 2

(two-tailed)

Samples from Normal Populations with Known Variances

Example Problem 7

Are male college stuents more easily bored than their female counterparts? This question was examined in the article “Boredom in Young Adults – Gender and Cultural Comparisons” (J. of

Cross-Cultural Psych., 1991: 209-223). The authors administered a scale called the Boredom Proneness Scale to 97 male and 148 female U.S. college students. Does the accompanying data support the research hypothesis that the mean Boredom Proneness Rating is highter for men than for women?

Gender Sample Size Sample Mean Sample SD

Male

Female

97

148

10.40

9.26

4..83

4..68

Two-Sample t Test and C.I.

Assumptions:

Both populations are normal , so that X

1

, X

2

, . . . , X m is a random sample from a normal distribution and so is Y

1

, Y

2

, . . . , Y n

(with the X ’s and Y ’s independent of one another).

The plausibility of these assumptions can be judged by constructing a normal probability plot of the x i s and another of y i s.

Two-Sample t Test and C.I.

Assumptions:

Both populations are normal , so that X

1

, X

2

, . . . , X m is a random sample from a normal distribution and so is Y

1

, Y

2

, . . . , Y n

(with the X ’s and Y ’s independent of one another). The plausibility of these assumptions can be judged by constructing a normal probability plot of the x i s and another of y i s.

Two-Sample t Test and C.I.

Theorem

When the population distributions are both normal, the standardized variable

T =

( ¯ − ¯

) − ( µ

X q

S 2

X m

+

S 2

Y n

− µ

Y

) has approximately a t distribution with df ν estimated from the data by s

2

X m

+ s

2

Y n

2

ν =

( s 2

X

/ m m − 1

) 2

+

( s 2

Y

/ n n − 1

) 2

(round ν down to the nearest integer.)

Two-Sample t Test and C.I.

Remark: the df of r.v.

T can also be estimated from the sample data by

ν =

[( se

X

)

2

( se

X

) m − 1

4

+ ( se

Y

+

)

2

( se

Y

) n − 1

4

]

2 where se

X

= s

√ X m

, se

Y

= s

√ Y n

(round ν down to the nearest integer.)

Two-Sample t Test and C.I.

The two-sample t confidence interval for µ

X confidence level 100(1 − α )% is given by

− µ

Y with

(¯ − ¯ ) − t

α/ 2 ,ν s s

X

2 m

+ s

Y

2 n

, (¯ − ¯ ) + t

α/ 2 ,ν s s

X

2 m

+ s

Y

2 n

A one-sided confidence bound can be obtained by replacing t

α/ 2 ,ν with t

α,ν

.

Two-Sample t Test and C.I.

The two-sample t test for testing H

0

: µ

X follows:

= ∆

(¯ − ¯ ) − ∆

0

0 is as

Test statistic value: t =

− µ

Y q s

2

X m

+ s

2

Y n

Alternative Hypothesis Rejection Region for Approximate Level α Test

H a

: µ

X

H a

: µ

X

H a

: µ

X

− µ

Y

− µ

Y

− µ

Y

> ∆

0 t ≥ t

α,ν

(upper-tailed)

< ∆

0 t ≤ t

α,ν

= ∆

0 t ≥ t

α/ 2 ,ν

(lower-tailed) or t ≤ t

α/ 2 ,ν

(two-tailed)

Two-Sample t Test and C.I.

Example: (Problem 23)

Fusible interlinings are being used with increasing frequency to support outer fabrics and improve the shape and drape of various pieces of clothing. The article “Compatibility of Outer and Fusible Interlining

Fabrics in Tailored Garments” (Textile Res. J. 1997: 137-142) gave the accompanying data on extensibility (%) at 100 gm/cm for both high-quality fabric (H) and poor-quality fabric (P) specimens.

H 1.2

0.9

0.7

1.0

1.7

1.7

1.1

0.9

1.7

1.9

1.3

2.1

1.6

1.8

1.4

1.3

1.9

1.6

0.8

2.0

1.7

1.6

2.3

2.0

P 1.6

1.5

1.1

2.1

1.5

1.3

1.0

2.6

The sample mean and standard deviation for the high-quality sample are

1.508 and 0.444, respectively, and those for the poor-quality sample are

1.588 and 0.530.

Construct a 95% C.I. for the difference of the true average extensibility between high-quality fabric and poor-quality fabric. Decide whether the true average extensibility differs for the two types.

Two-Sample t Test and C.I.

Example: (Problem 23)

Fusible interlinings are being used with increasing frequency to support outer fabrics and improve the shape and drape of various pieces of clothing. The article “Compatibility of Outer and Fusible Interlining

Fabrics in Tailored Garments” (Textile Res. J. 1997: 137-142) gave the accompanying data on extensibility (%) at 100 gm/cm for both high-quality fabric (H) and poor-quality fabric (P) specimens.

H 1.2

0.9

0.7

1.0

1.7

1.7

1.1

0.9

1.7

1.9

1.3

2.1

1.6

1.8

1.4

1.3

1.9

1.6

0.8

2.0

1.7

1.6

2.3

2.0

P 1.6

1.5

1.1

2.1

1.5

1.3

1.0

2.6

The sample mean and standard deviation for the high-quality sample are

1.508 and 0.444, respectively, and those for the poor-quality sample are

1.588 and 0.530.

Construct a 95% C.I. for the difference of the true average extensibility between high-quality fabric and poor-quality fabric. Decide whether the true average extensibility differs for the two types.

Two-Sample t Test and C.I.

The Quantile-Quantile plot for sample H is

Two-Sample t Test and C.I.

The Quantile-Quantile plot for sample P is

Two-Sample t Test and C.I.

Degrees of freedom calculated from the samples:

ν =

(0 .

444

2

/ 24 + 0 .

530

2

/ 8)

2

(0 .

444 2 / 24) 2

24 − 1

+

(0 .

530 2 / 8) 2

8 − 1

= 10 .

5 ≈ 10

α = 0 .

05 , t

α/ 2 ,ν

= t

0 .

025 , 10

= 2 .

228 .

Therefore the 95% C.I. for the difference of the true average extensibility for the two types of fabric is given by

(1 .

508 − 1 .

588) ∓ 2 .

228 · r

0 .

444 2

24

+

0 .

530 2

8 which is ( − 0 .

544 , 0 .

384)

Two-Sample t Test and C.I.

Degrees of freedom calculated from the samples:

ν =

(0 .

444

2

/ 24 + 0 .

530

2

/ 8)

2

(0 .

444 2 / 24) 2

24 − 1

+

(0 .

530 2 / 8) 2

8 − 1

= 10 .

5 ≈ 10

α = 0 .

05 , t

α/ 2 ,ν

= t

0 .

025 , 10

= 2 .

228 .

Therefore the 95% C.I. for the difference of the true average extensibility for the two types of fabric is given by

(1 .

508 − 1 .

588) ∓ 2 .

228 · r

0 .

444 2

24

+

0 .

530 2

8 which is ( − 0 .

544 , 0 .

384)

Two-Sample t Test and C.I.

1. Let µ

1 be the true average extensibility for the high-quality fabric and µ

2 for the poor-quality fabric.

2. Hypotheses: H

0

: µ

1

− µ

2

= 0 v.s.

H a

: µ

1

− µ

2

< 0

3. Test statistic:

T =

( ¯ q

S

2

1 m

¯

) − 0

,

+

S

2

2 n and the value of the test statistic is t =

(1 .

508 − 1 .

588) q

0 .

444 2

24

+

0 .

530 2

8

= − 1 .

846 , and df is 10.

4. The P -value for a lower-tailed t test in this case is 0.051

5. Using significance level 0.01, we will not reject H

0

Two-Sample t Test and C.I.

1. Let µ

1 be the true average extensibility for the high-quality fabric and µ

2 for the poor-quality fabric.

2. Hypotheses: H

0

: µ

1

− µ

2

= 0 v.s.

H a

: µ

1

− µ

2

< 0

3. Test statistic:

T =

( ¯ q

S

2

1 m

¯

) − 0

,

+

S

2

2 n and the value of the test statistic is t =

(1 .

508 − 1 .

588) q

0 .

444 2

24

+

0 .

530 2

8

= − 1 .

846 , and df is 10.

4. The P -value for a lower-tailed t test in this case is 0.051

5. Using significance level 0.01, we will not reject H

0

Two-Sample t Test and C.I.

1. Let µ

1 be the true average extensibility for the high-quality fabric and µ

2 for the poor-quality fabric.

2. Hypotheses: H

0

: µ

1

− µ

2

= 0 v.s.

H a

: µ

1

− µ

2

< 0

3. Test statistic:

T =

( ¯ q

S

2

1 m

¯

) − 0

,

+

S

2

2 n and the value of the test statistic is t =

(1 .

508 − 1 .

588) q

0 .

444 2

24

+

0 .

530 2

8

= − 1 .

846 , and df is 10.

4. The P -value for a lower-tailed t test in this case is 0.051

5. Using significance level 0.01, we will not reject H

0

Two-Sample t Test and C.I.

1. Let µ

1 be the true average extensibility for the high-quality fabric and µ

2 for the poor-quality fabric.

2. Hypotheses: H

0

: µ

1

− µ

2

= 0 v.s.

H a

: µ

1

− µ

2

< 0

3. Test statistic:

T =

( ¯ q

S

2

1 m

¯

) − 0

,

+

S

2

2 n and the value of the test statistic is t =

(1 .

508 − 1 .

588) q

0 .

444 2

24

+

0 .

530 2

8

= − 1 .

846 , and df is 10.

4. The P -value for a lower-tailed t test in this case is 0.051

5. Using significance level 0.01, we will not reject H

0

Two-Sample t Test and C.I.

1. Let µ

1 be the true average extensibility for the high-quality fabric and µ

2 for the poor-quality fabric.

2. Hypotheses: H

0

: µ

1

− µ

2

= 0 v.s.

H a

: µ

1

− µ

2

< 0

3. Test statistic:

T =

( ¯ q

S

2

1 m

¯

) − 0

,

+

S

2

2 n and the value of the test statistic is t =

(1 .

508 − 1 .

588) q

0 .

444 2

24

+

0 .

530 2

8

= − 1 .

846 , and df is 10.

4. The P -value for a lower-tailed t test in this case is 0.051

5. Using significance level 0.01, we will not reject H

0

Two-Sample t Test and C.I.

1. Let µ

1 be the true average extensibility for the high-quality fabric and µ

2 for the poor-quality fabric.

2. Hypotheses: H

0

: µ

1

− µ

2

= 0 v.s.

H a

: µ

1

− µ

2

< 0

3. Test statistic:

T =

( ¯ q

S

2

1 m

¯

) − 0

,

+

S

2

2 n and the value of the test statistic is t =

(1 .

508 − 1 .

588) q

0 .

444 2

24

+

0 .

530 2

8

= − 1 .

846 , and df is 10.

4. The P -value for a lower-tailed t test in this case is 0.051

5. Using significance level 0.01, we will not reject H

0

Two-Sample t Test and C.I.

1. Let µ

1 be the true average extensibility for the high-quality fabric and µ

2 for the poor-quality fabric.

2. Hypotheses: H

0

: µ

1

− µ

2

= 0 v.s.

H a

: µ

1

− µ

2

< 0

3. Test statistic:

T =

( ¯ q

S

2

1 m

¯

) − 0

,

+

S

2

2 n and the value of the test statistic is t =

(1 .

508 − 1 .

588) q

0 .

444 2

24

+

0 .

530 2

8

= − 1 .

846 , and df is 10.

4. The P -value for a lower-tailed t test in this case is 0.051

5. Using significance level 0.01, we will not reject H

0

Download