REVIEW Hypothesis Tests of Means

Post on 04-Jan-2016

35 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

REVIEW Hypothesis Tests of Means. 5 Steps for Hypothesis Testing Test Value Method. Develop null and alternative hypotheses Specify the level of significance,  Use the level of significance to determine the critical values for the test statistic and state the rejection rule for H 0 - PowerPoint PPT Presentation

Transcript

REVIEWREVIEW

Hypothesis Tests of MeansHypothesis Tests of Means

5 Steps for Hypothesis Testing5 Steps for Hypothesis TestingTest Value MethodTest Value Method

1. Develop null and alternative hypotheses2. Specify the level of significance, 3. Use the level of significance to

determine the critical values for the test statistic and state the rejection rule for H0

4. Collect sample data and compute the value of test statistic

5. Use the value of test statistic and the rejection rule to determine whether to reject H0

When to use z and When to use tWhen to use z and When to use tz and t distributions are used in hypothesis testing.

_ These are determined by the distribution of X.

USEUSE zz

• Large n or sampling from a normal distributionLarge n or sampling from a normal distribution• σσ is is knownknown

: when)nσ/σ(with X

USEUSE tt

• Large n or sampling from a normal distributionLarge n or sampling from a normal distribution• σσ is is unknownunknown

: when)ns/s(with X

General Form ofGeneral Form ofTest Statistics for Hypothesis TestsTest Statistics for Hypothesis Tests• A test statistic is nothing more than a

measurement of how far away the observed value from your sample is from some hypothesized value, vv.– It is measured in terms of standard errors– σ known = z-statisticz-statistic with standard error =– σ unknown = t-statistict-statistic with standard error =

• The general form of a test statistic is:n

sn

σ

n

sor

n

σ

vx

Error Standard

Value) zed(Hypothesi - Estimate)(Point

t

or

z

Depending on whether or not σ is known

ExampleExampleThe average cost of all required texts for introductory college English courses seems to have gone up substantially as the professors are assigning several texts.– A sample of 41 courses was taken– The average cost of texts for these 41 courses is $86.15

Can we conclude the average cost:1. Exceeds $80?2. Is less than $90?3. Differs from last year’s average of $95?4. Differs from two year’s ago average of $78?

Assume the standard deviation is $22.

• Because the sample size > 30, it is not necessary to assume that the costs follow a normal distribution to determine the z-statistic.

• In this case because it is assumed that σ is known (to be $22), these will be z-tests.

CASE 1: z-tests for CASE 1: z-tests for σσ Known Known

Example 1: Can we conclude µ > 80?Example 1: Can we conclude µ > 80?

H0: µ = 80

HA: µ > 80

Select α = .05

TEST: Reject H0 (Accept HA) if z > z.05 = 1.645

z calculation:

Conclusion: 1.790 > 1.645

There is enough evidence to conclude µ > 80.

1

2

3

4

790.1

41

228015.86

n

80-x z

5

Example 2: Can we conclude µ < 90?Example 2: Can we conclude µ < 90?

H0: µ = 90

HA: µ < 90

Select α = .05

TEST: Reject H0 (Accept HA) if z <-z.05= -1.645

z calculation:

Conclusion: -1.121 > -1.645

There is not enough evidence to conclude µ < 90.

1

2

3

4

121.1

41

229015.86

n

90-x z

5

Example 3: Can we conclude µ ≠ 95?Example 3: Can we conclude µ ≠ 95? H0: µ = 95

HA: µ ≠ 95

Select α = .05

TEST: Reject H0 (Accept HA) if z <-z.025= -1.96 or if z > z.025 = 1.96

z calculation:

Conclusion: -2.578 < -1.96

There is enough evidence to conclude µ ≠ 95.

1

2

3

4

578.2

41

229515.86

n

95-x z

5

Example 4: Can we conclude µ ≠ 78?Example 4: Can we conclude µ ≠ 78? H0: µ = 78

HA: µ ≠ 78

Select α = .05

TEST: Reject H0 (Accept HA) if z <-z.025= -1.96 or if z > z.025 = 1.96

z calculation:

Conclusion: 2.372 > 1.96

There is enough evidence to conclude µ ≠ 78.

1

2

3

4

372.2

41

227815.86

n

78-x z

5

• P-values are a very important concept in hypothesis testing.

• A p-valuep-value is a measure of how sure you are that the alternate hypothesis HA, is true.

– The lower the p-value, the more sure you are that the alternate hypothesis, the thing you are trying to show, is true. So

– A p-valuep-value is compared to αα. • If the p-value < α; accept HA – you proved your conjecture• If the p-value > α; do not accept HA – you failed to prove your

conjecture

P-valuesP-values

Low p-values Are Good!

5 Steps for Hypothesis Testing5 Steps for Hypothesis TestingP-value MethodP-value Method

1. Develop null and alternative hypotheses

2. Specify the level of significance, 3. Collect sample data and compute the

value of test statistic

4. Calculate p-value: Determine the probability for the test statistic

5. Compare p-value and :

Reject H0 (Accept HA), if p-value <

Calculating p-valuesCalculating p-values• A p-valuep-value is the probability that, if H0 were really

true, you would have gotten a value • as least as great as the sample value for “>” tests• at most as great as the sample value for “<” tests• at least as far away from the sample value for “≠” tests

• First calculate the z-value z-value for the test. • The p-valuep-value is calculated as follows:

TESTTEST P-valueP-value EXCELEXCEL“>” P(Z>z) – Area to the right of z =1-NORMSDIST(z)

“<” P(Z<z) – Area to the left of z =NORMSDIST(z)

“≠” For z < 0:For z < 0: 2*(Area to the left of z)

For z > 0: For z > 0: 2*(Area to the right of z)

=2*NORMSDIST(z)

=2*(1-NORMSDIST(z))

0 Z

v

P-Value for “≠” Test, With z>0

X

0 Z

v

P-Value for “≠” Test, With z<0

X

z

x

0 Z

v

P-Value for “>” Test

X

z

x

P-value

v

P-Value for “<” Test

X

0 Zz

x

P-value

P-value =

2*areaP-value =

2*area

z

x

Examples – p-ValuesExamples – p-Values• Example 1: Can we conclude µ >> 80?

• z = 1.79• P-valueP-value = 1 - .9633 = .0367.0367 (< α = .05).

CanCan conclude µ > 80.• Example 2: Can we conclude µ << 90?

• z = -1.12• P-valueP-value = .1314.1314 (> α = .05).

CannotCannot conclude µ < 90.• Example 3: Can we conclude µ ≠ ≠ 95?

• z = -2.58• P-valueP-value = 2(.0049) = .0098.0098 (< α = .05).

CanCan conclude µ ≠ 95.• Example 4: Can we conclude µ ≠ ≠ 78?

• z = 2.37• P-valueP-value = 2(1-.9911) = .0178.0178 (< α = .05).

CanCan conclude µ ≠ 78.

=AVERAGE(A2:A42)

=(D4-D7)/(D1/SQRT(D2))

=1-NORMSDIST(D8)

=(D4-D12)/(D1/SQRT(D2))

=NORMSDIST(D13)

=(D4-D17)/(D1/SQRT(D2))

=2*NORMSDIST(D18)

=(D4-D22)/(D1/SQRT(D2))

=2*(1-NORMSDIST(D23))

• Because the sample size > 30, it is not necessary to assume that the costs follow a normal distribution to determine the t-statistic.

• In this case because it is assumed that σ is unknown, these will be t-tests with 41-1 = 40 degrees of freedom.

Assume s = 24.77.

CASE 2: t-tests for CASE 2: t-tests for σσ Unknown Unknown

Example 1: Can we conclude µ > 80?Example 1: Can we conclude µ > 80?

H0: µ = 80

HA: µ > 80

Select α = .05

TEST: Reject H0 (Accept HA) if t >t.05,40 = 1.684

t calculation:

Conclusion: 1.590 < 1.684

Cannot conclude µ > 80.

1

2

3

4

590.1

41

77.248015.86

n

s80-x

t

5

Example 2: Can we conclude µ < 90?Example 2: Can we conclude µ < 90?

H0: µ = 90

HA: µ < 90

Select α = .05

TEST: Reject H0(Accept HA) if t<-t.05,40= -1.684

t calculation:

Conclusion: -0.995 > -1.684

Cannot conclude µ < 90.

1

2

3

4

995.0

41

77.249015.86

n

s90-x

t

5

Example 3: Can we conclude µ ≠ 95?Example 3: Can we conclude µ ≠ 95? H0: µ = 95

HA: µ ≠ 95

Select α = .05

TEST: Reject H0 (Accept HA) if t <-t.025,40= -2.021 or if t > t.025,40 = 2.021

t calculation:

Conclusion: -2.288 < -2.021

Can conclude µ ≠ 95.

1

2

3

4

288.2

41

77.249515.86

n

s95-x

t

5

Example 4: Can we conclude µ ≠ 78?Example 4: Can we conclude µ ≠ 78? H0: µ = 78

HA: µ ≠ 78

Select α = .05

TEST: Reject H0 (Accept HA) if t <-t.025,40= -2.021 or if t > t.025,40 = 2.021

t calculation:

Conclusion: 2.107 > 2.012

Can conclude µ ≠ 78.

1

2

3

4

107.2

41

77.247815.86

n

s78-x

t

5

The TDIST Function in ExcelThe TDIST Function in Excel• TDIST(t,degrees of freedom,1)TDIST(t,degrees of freedom,1) gives the area to the

right of a positive value of t.– 1-TDIST(t,degrees of freedom,1) gives the area to the left

of a positive value of t.– Excel does not work for negative vales of t.– But the t-distribution is symmetric. Thus,

• The area to the left of a negative value of t = area to the right of the corresponding positive value of t.

• TDIST(-t,degrees of freedom,1) gives the area to the left of a negative value of t.

• 1-TDIST(-t,degrees of freedom,1) gives the area to the right of a negative value of t.

• TDIST(t,degrees of freedom,2)TDIST(t,degrees of freedom,2) gives twice the area to the right of a positive value of t.– TDIST(-t,degrees of freedom,2)TDIST(-t,degrees of freedom,2) gives twice the area to

the right of a negative value of t.

p-Values for t-Tests Using Excelp-Values for t-Tests Using Excel

P-values for t-tests are calculated as follows:

HHAA

TESTTESTSign Sign of tof t

EXCELEXCEL

P-valueP-value“>” >0>0

<0<0

=TDIST(t,degrees of freedom,1) Usual caseUsual case

=1-TDIST(-t,degrees of freedom,1)

“<” <0<0

>0>0

=TDIST(-t,degrees of freedom,1) Usual caseUsual case

=1-TDIST(t,degrees of freedom,1)

“≠” <0<0

>0>0

=TDIST(-t,degrees of freedom,2)

=TDIST(t,degrees of freedom,2)

=(D3-G2)/D4

=TDIST(G3,40,1)

=(D3-G7)/D4

=TDIST(-G8,40,1)

=(D3-G12)/D4

=TDIST(-G13,40,2)

=(D3-G17)/D4

=TDIST(G18,40,2)

Test Value vs P-ValueTest Value vs P-Value• Example of one-tailed, positive test value

is known is unknown

Test Value

Compare ztest with zcritical

Accept HA if ztest > zcritical

Compare ttest with tcritical

Accept HA if ttest > tcritical

P-value

Compare p-value (based on normal distribution) with α

Accept HA if p-value < α

Compare p-value (based on t distribution) with α

Accept HA if p-value < α

ReviewReview

• When to use z and when to use t in hypothesis testing– σ known – z– σ unknown – t

• z and t statistics measure how many standard errors the observed value is from the hypothesized value

• Form of the z or t statistic• Meaning of a p-value• z-tests and t-tests– By hand– Excel

top related