31
One Sample Hypothesis Tests z-Test and t-Test

One-Sample Hypothesis Tests

Embed Size (px)

DESCRIPTION

Slides to accompany lecture in a statistics class

Citation preview

Page 1: One-Sample Hypothesis Tests

One Sample Hypothesis Testsz-Test and t-Test

Page 2: One-Sample Hypothesis Tests

Basic experimental situation for one-sample hypothesis test

H0 : μ after treatment = μ before treatment

HA : μ after treatment μ before treatment

Page 3: One-Sample Hypothesis Tests

The problem

• A researcher is testing the effectiveness of a new herbal supplement that claims to improve physical fitness. A sample of n = 25 college students is obtained and each student takes the supplement daily for six weeks. At the end of the 6-week period, each student is given the Marine Physical Fitness Test and the average score for the sample is M = 38.68. For the general population of college students, the distribution of scores on the Marine Physical Fitness test is normal with a mean of µ = 35 and a standard deviation of σ = 10. Do students taking the supplement have significantly better fitness scores? Use a two tailed test with α = .05. ‑

Page 4: One-Sample Hypothesis Tests

Gather information from the problem in an organized way as you read.

• n = 25 college students• M = 38.68• μ = 35• = 10

• Compute the Standard ErrorM = 10/25 = 10/5 = 2

Page 5: One-Sample Hypothesis Tests

Step 1: State the Hypotheses

• Write the Null and Alternate Hypotheses as sentences

Page 6: One-Sample Hypothesis Tests

Step 1: State the Hypotheses• College students who take the herbal supplement

will have the same average score on the Marine Physical Fitness Test as the general population of students, or 35 points.

• College students who take the herbal supplement will have a different average Marine Physical Fitness score than the general population of students.

• Two-tailed: “different average...score”• One-tailed: “higher average…” or “lower average”

Page 7: One-Sample Hypothesis Tests

Step 1: State the Hypotheses

• Write the Null and Alternate Hypotheses as equations

Page 8: One-Sample Hypothesis Tests

State the Hypotheses as Equations

• H0: M – μ = 0 or H0: M = 35

• HA: M – μ 0 or HA: M 35

• For a one-tailed test, you would need < and > signs that, taken together, cover all possibilities

• H0: M – μ 0

• HA: M – μ > 0

Page 9: One-Sample Hypothesis Tests

Step Two: Locate the critical regionStep Two: Locate the critical region on the graph to match the requirements stated in the problem. Be sure to write in the Critical Value of the test statistic, and shade in the critical region.

Page 10: One-Sample Hypothesis Tests

Step Two: Locate the critical regionStep Two: Locate the critical region on the graph to match the requirements stated in the problem. Be sure to write in the Critical Value of the test statistic, and shade in the critical region.

Page 11: One-Sample Hypothesis Tests

Step Three: Compute the z test statistic for this problem.

Use the numbers you collected or computed while reading problem• n = 25 students• M = 38.68• μ = 35• = 10• Standard Error

M = 10/25 = 2

m

Mz

2

3568.38 z

84.12

68.3z

Page 12: One-Sample Hypothesis Tests

Step Four: Make a decisionReject H0 if z is in the rejection region

(i.e., if z > 1.96 or z < -1.96)Otherwise, retain H0

z = 1.84X

Page 13: One-Sample Hypothesis Tests

Recipe for writing up test results• Sandwich: narrative outside, statistics inside• Opening sentence that states the experiment’s

question and hypothesis.• Sentence(s) that include

the descriptive statistics (means, standard deviations)

• Statement of your decision: results are significant (reject H0) or not significant

(retain H0) including test statistic and alpha-level• Closing sentence(s) that answer the question

Page 14: One-Sample Hypothesis Tests

Write up the results in a narrativeA researcher was interested to find out whether an herbal supplement had an impact on physical fitness as measured by the Marine Physical Fitness Test. The average level of physical fitness (M = 38.68) of 25 college students who took the herbal supplement in the study was tested. This mean was found to be (choose the appropriate one of the following options)SIGNIFICANTLY HIGHER / NOT SIGNIFICANTLY DIFFERENT / SIGNIFICANTLY LOWER than the national college student mean of μ = 35 (put test results in parentheses) ( z = 1.84, p > .05) . [Write closing narrative sentence to summarize the findings]There is not enough evidence in this sample to conclude that taking the herbal supplement has any effect on general fitness level; the higher average fitness score for this small sample of students might have due to chance.

Page 15: One-Sample Hypothesis Tests

WHEN WE DO NOT KNOW THE POPULATION STANDARD DEVIATION:T-TESTS

Page 16: One-Sample Hypothesis Tests

Basic experimental situation for one-sample hypothesis test

H0 : μ after treatment = μ before treatment

HA : μ after treatment μ before treatment

Page 17: One-Sample Hypothesis Tests

Compute Estimated Standard Error

Use s2 to estimate σ2

Estimated standard error:

Estimated standard error is used as estimate of the real standard error when the value of σm is unknown.

n

sor

2

n

ssm

Page 18: One-Sample Hypothesis Tests

The t-Statistic

The t-statistic uses the estimated standard error in place of σm

The t statistic is used to test hypotheses about a hypothesized (unknown) or known population mean μ when the value of σ is unknown

ms

Mt

Page 19: One-Sample Hypothesis Tests

Distributions of the t statistic

Page 20: One-Sample Hypothesis Tests

The t Distribution

Family of distributions, one for each value of degrees of freedom.

Approximates the shape of the normal distribution• Flatter than the normal distribution• More spread out than the normal distribution• More variability (“fatter tails”) in t distribution

Use t values instead of Normal Curve Values

Page 21: One-Sample Hypothesis Tests

Degrees of freedom

To compute the standard deviation (variance) we computed the mean first.• Only n-1 scores in a sample are independent• Researchers call n-1 the degrees of freedom

Degrees of freedom• Noted as df• df = n-1 for a one-sample test

Page 22: One-Sample Hypothesis Tests

Four steps for t test

1. State the null and alternative hypotheses

2. Select an alpha level Locate the critical region using the t distribution and df

3. Calculate the t test statistic4. Make a decision regarding H0

Page 23: One-Sample Hypothesis Tests

Critical region in the t distribution for α = .05 and df = 24.

df = 24

-2.064 2.064

Page 24: One-Sample Hypothesis Tests

One Sample Tests

z-test One sample Population mean μ is

known or hypothesized Population standard

deviation σ is known

t-test One sample Population mean μ is

known or hypothesized

Population standard deviation σ is NOT known

nnm

2

or

m

Mz

n

sor

2

n

ssm

1 ,

ndfs

Mt

m

Page 25: One-Sample Hypothesis Tests

SPSS will do the work for us Also: Cronk 6.2 and Atomic Learning

videos

Page 26: One-Sample Hypothesis Tests

Select variable Enter test value Click OK

Page 27: One-Sample Hypothesis Tests

Results

Page 28: One-Sample Hypothesis Tests

SPSS computes a p-value= the area beyond actual t

Rejection region defined by alpha is colored in.

In this test, p-value is less area than the rejection region, sowe would reject H0 because the probability of getting a result this extreme or more is less than

Page 29: One-Sample Hypothesis Tests

How to decide (reject or retain?)

Computing by hand

Find the limits of the rejection region from a table or calculator for t

If the t-statistic you compute is more extreme(larger in magnitude), thenREJECT H0

Otherwise, RETAIN H0

Computing with SPSS

Use the alpha level (often .05) for comparison.

If the p-value that SPSS computes is less than the alpha, REJECT H0

Otherwise, retain H0.

Page 30: One-Sample Hypothesis Tests

Write up the results in a narrative

A researcher was interested to find out whether an herbal supplement had an impact on physical fitness as measured by the Marine Physical Fitness Test. The average level of physical fitness (M = 38.68, s = 9.017) of 25 college students who took the herbal supplement in the study was tested. This mean was found to be (choose the appropriate one of the following options)SIGNIFICANTLY HIGHER / NOT SIGNIFICANTLY DIFFERENT / SIGNIFICANTLY LOWER than the national college student mean of μ = 35 (put test results in parentheses) ( t = 2.041, p = .052) . [Write closing narrative sentence to summarize the findings]There is not enough evidence in this sample to conclude that taking the herbal supplement has any effect on general fitness level; the higher average fitness score for this small sample of students might have due to chance.

Page 31: One-Sample Hypothesis Tests

What if we had a different sample?

Try the analysis again with Sample 2. How are the results the same or

different? How would we handle writing up the

different results? [Hint: Cronk has two types of write-up in each section of his book]