30
Hypothesis Testing Hypothesis Testing For For With With Known Known

Hypothesis Testing For With Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

  • View
    219

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

Hypothesis Testing For Hypothesis Testing For With With Known Known

Page 2: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

HYPOTHESIS TESTING

• Basic idea: You want to see whether or not your data supports a statement about a parameter of the population.– The statement might be: The average age of night

students is greater than 25 ( >25)

• To do this you take a sample and compute x

Page 3: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

• If < 25 – You did not prove >25.

• If >>25– You are probably satisfied that >25.

• If is slightly > 25– You are probably not convinced that >25.

(although there is some evidence to support this)

x

Results x

x

x

Page 4: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

Being Convinced• Hypothesis testing is like serving on a jury.serving on a jury.

– The prosecution is presenting evidence (the data) to show that a defendant is guilty (a hypothesis is true).

– But even though the evidence may indicate that the defendant might be guilty (the data may indicate that the hypothesis might be true), you must be convinced beyond a “reasonable doubt”.“reasonable doubt”.

• Otherwise you find the defendant “not guilty”– this does not mean he was innocent, (there is not enough evidence to support the hypothesis – this does not mean that the hypothesis is not true, just that there was not enough evidence to say it was true beyond a reasonable doubt).

Page 5: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

When Can You Conclude > 25?

• You are convinced >25 if you get an that is “a lot greater”“a lot greater” than 25.

• How much is “a lot”“a lot” ?– This is hypothesis testing.

x

25 above is valuexyour ),X of deviations standard -- n

(

errors standardmany howin liesanswer The

aboveabove

Page 6: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

“<” Tests

• Can you conclude that the average age of night students is less than 27? ( < 27)

27 below is valuexyour ),X of deviations standard -- n

(

errors standardmany howin liesanswer The

belowbelow

Page 7: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

“” Tests

• Can we conclude that the average age of students is different from 26? ( 26)

26 below)or (above fromaway is value

xyour ),X of deviations standard -- n

(

errors standardmany howin liesanswer The

away fromaway from

Page 8: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

Hypothesis Testing

• Five Step Procedure1. Define Opposing Hypotheses.

2. Choose a level of risk (()) for making the mistake of concluding something is true when its not.

3. Set up test (Define Rejection Region).

4. Take a random samplerandom sample.

5. Calculate statistics and draw a conclusion.

Page 9: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

STEP 1: Defining Hypotheses

• H0 (null hypothesis -- status quo)

• HA (alternate hypothesis -- what you are trying to show)

Can we conclude that the Can we conclude that the average age exceeds 25?average age exceeds 25?

H0: 25

HA: > 25

Page 10: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

Test H0 “At the break point” = 25• Test the hypothesis at the point that would give

us the most problem in deciding if >25. – If really were 1515, it would be very unlikelyvery unlikely that we would

draw a sample of students that would lead us to the falsefalse conclusion that >25.

– If really were 2222, it is more likelymore likely that we would draw a sample with a large enough sample mean to lead us to the falsefalse conclusion that >25; if really were 2424, it would be even more likelymore likely, 24.924.9 even more likely.

= 25= 25 is the “most likely” value in H0 of generating a sample mean that would lead us to the falsefalse conclusion that >25.

So H0 is tested “at the breakpoint”, = 25

Page 11: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

STEP 2: Choosing a Measure of Risk(Selecting )

= P(concluding HA is true when it is not)

• Typical values are .10, .05, .01, but can be anything.– Values of are often specified by professional

organizations (e.g. audit sampling normally uses values of .05 or .10).

Page 12: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

STEP 3: How to Set Up the TestDefining the “Rejection Region”

• Depends on whether HA is a >, <, or hypothesis.

• The “> Case”– Suppose we are hypothesizing > 25. > 25.– When a random sample of size n is taken:

• If really = 25, then there is only a probability = that we would get an value that is more than z standard errors above 25.

• Thus if we get an value that is greater thangreater than z standard errors above 25, we are willing to conclude > 25.

– We call this critical value xxcritcrit.

x

x

n

σz 25 x αcrit

Page 13: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

Rejecting H0 (Accepting HA)

00 ZZX

n

σσX

2525

=25if H0 is true

REJECTIONREGION

critx

Reject H0 (Accept HA) if we get

)z(z xx αcrit

zz

Page 14: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

How many standard errors away is ?

• This is called the test statistictest statistic, z

x

error standard eappropriat

value)zed(hypothesi - estimate)point (z

25 - xz

Page 15: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

A ONE-TAILED “>” TEST

• Reject H0 (Accept HA) if:

z > z

• Values of z

z

.10 1.282

.05 1.645

.01 2.326

Page 16: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

A ONE-TAILED “<“ TEST

• If HA were, HA: < 27• The test would be: Reject H0 (Accept HA) if:

z < -z

• Values of -z

-z

.10 -1.282

.05 -1.645

.01 -2.326

Page 17: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

A TWO-TAILED “” TEST

• If HA were, HA: 26

• The test would be: Reject H0 (Accept HA) if:

z < -z/2 or z > z/2

• Values of -z

-z/2 z/2

.10 -1.645 1.645

.05 -1.96 1.96

.01 -2.576 2.576

Page 18: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

STEP 4: TAKE SAMPLE

• After designing the test, we would take the sample according to a randomrandom sampling procedure.

Page 19: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

STEP 5: CALCULATE STATISTISTICS

• From the sample we would calculate

• Then calculate:

x

25 - xz

Page 20: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

DRAWING CONCLUSIONSOne Tail Tests

• ““>” TEST>” TEST: HHAA: : > 25 > 25

If z > zz > z -- Conclude HA is true (Reject H(Reject H00))

If z < zz < z -- Cannot conclude HA is true

(Do not reject H(Do not reject H00))

• ““<” TEST:<” TEST: HHAA: : < 27 < 27

If z < -zz < -z -- Conclude HA is true (Reject H0)

If z > -zz > -z -- Cannot conclude HA is true

(Do not reject H(Do not reject H00))

Page 21: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

DRAWING CONCLUSIONSTwo Tail Tests

HHAA: : 26 26

• Case 1 -- When z > 0Case 1 -- When z > 0: compare z to zz to z/2/2

If z > zz > z/2/2 -- Conclude HA is true (Reject H0)

If z < zz < z/2/2 -- Cannot conclude HA is true (Do not reject H(Do not reject H00))

• Case 2 -- When z < 0Case 2 -- When z < 0: compare z to -z/2

If z < -zz < -z/2/2 -- Conclude HA is true (Reject H0)

If z > -zz > -z/2/2 -- Cannot conclude HA is true (Do not reject H(Do not reject H00))

Page 22: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

DRAWING CONCLUSIONSTwo Tail Tests (Alternative)

HHAA: : 26 26

• Cases 1 and 2 can be combined by simply looking at |z|. The test becomes:

Compare |z| to zCompare |z| to zαα/2/2

If |z| > z|z| > z/2/2 -- Conclude HA is true (Reject H0)

If |z|< z |z|< z/2/2 -- Cannot conclude HA is true

(Do not reject H(Do not reject H00))

Page 23: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

Examples

• Suppose– We know from long experience that = 4.2 – We take a sample of n = 49 students– We are willing to take an = .05 chance of concluding

that HA is true when it is not (Note: z.05 = 1.645)

• Because our sample is large, a normal distribution approximates the distribution of X

Page 24: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

Example 1: Can we conclude > 25?

1. H0: = 25

HA: > 25

2. = .05

3. Reject H0 (Accept HA) if:

4. Take sample 25,21,… 33.

1.645 z

492.4

25 - x z .05

25. age average that theconclude toevidenceenough is There 1.645. 2.05

05.2

494.2

25)-(26.23 z 26.23x .5

Page 25: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

Example 2: Can we conclude < 27?1. H0: = 27

HA: < 27

2. = .05

3. Reject H0 (Accept HA) if:

4. Take sample 22,28,… 33.

1.645- z

492.4

27 - x z .05

.)27μ THAT CONCLUDE NOT DO (WE 27. age average hat the t

conclude toevidenceenough not is There 1.645. - not is 1.2833-

2833.1

494.2

27)-(26.23 z 26.23x .5

NOTE!

Page 26: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

Example 3: Can we conclude 26?1. H0: = 26

HA: 26 (This is a two-tail test)

2. = .05

3. Reject H0 (Accept HA) if:

4. Take sample 25,21,… 33.

1.96 z

492.4

26 - x |z| .025

)26.μ THAT CONCLUDE NOT DO (WE 26. from differs age average

that theconclude toevidenceenough not is There .96.1not is .383

383.

494.2

26)-(26.23 |z| 26.23x .5

NOTE!

Page 27: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

> TESTS> TESTS

Given Values

2.05102 > 1.6448532.05102 > 1.644853

Can conclude mu > 25Can conclude mu > 25

=NORMSINV(1-C2)

=AVERAGE(A2:A50)

(C7-C3)/(C1/SQRT(49))

Page 28: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

< TESTS< TESTS

-1.28231 > -1.64485-1.28231 > -1.64485

Cannot conclude mu < 27Cannot conclude mu < 27

Given Values

=-NORMSINV(1-C2)

=AVERAGE(A2:A50)

(C14-C10)/(C1/SQRT(49))

Page 29: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

TESTSTESTS

Given Values

.384354 < 1.959963.384354 < 1.959963

Cannot conclude mu Cannot conclude mu 26 26

=ABS((C21-C17)/(C1/SQRT(49)))

=NORMSINV(1-C2/2)

=AVERAGE(A2:A50)

Page 30: Hypothesis Testing For  With  Known. HYPOTHESIS TESTING Basic idea: You want to see whether or not your data supports a statement about a parameter

REVIEW• “Common sense concept” of hypothesis testing• 5 Step Approach

– 1. Define H0 (the status quo), and HA (what you are trying to show.)

– 2. Choose = Probability of concluding HA is true when its not.

– 3. Define the rejection region and how to calculate the test statistic.– 4. Take a random sample.– 5. Calculate the required statistics and draw conclusion.

• There is enough evidence to conclude HA is true (Reject H0)

• There is not enough evidence to conclude HA is true (Do not reject H0).