Chapter 7 hypothesis testing
Download
1 / 71

Chapter 7 Hypothesis Testing - PowerPoint PPT Presentation


  • 253 Views
  • Uploaded on

7-1 Basics of Hypothesis Testing 7-2 Testing a Claim about a Mean: Large Samples 7-3 Testing a Claim about a Mean: Small Samples 7-4 Testing a Claim about a Proportion 7- 5 Testing a Claim about a Standard     Deviation (will cover with chap 8). Chapter 7 Hypothesis Testing. 7-1.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Chapter 7 Hypothesis Testing' - karen-lucas


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Chapter 7 hypothesis testing

7-1 Basics of Hypothesis Testing

7-2 Testing a Claim about a Mean: Large Samples

7-3 Testing a Claim about a Mean: Small Samples

7-4 Testing a Claim about a Proportion

7- 5 Testing a Claim about a Standard     Deviation (will cover with chap 8)

Chapter 7Hypothesis Testing


7-1

Basics of

Hypothesis Testing


Definition

Hypothesis

in statistics, is a statement regarding a characteristic of one or more populations

Definition


Steps in hypothesis testing

Statement is made about the population

Evidence in collected to test the statement

Data is analyzed to assess the plausibility of the statement

Steps in Hypothesis Testing


Components of a formal hypothesis test

Components of aFormal Hypothesis Test


Components of a hypothesis test

Form Hypothesis

Calculate Test Statistic

Choose Significance Level

Find Critical Value(s)

Conclusion

Components of a Hypothesis Test


Null hypothesis h 0

A hypothesis set up to be nullified or refuted in order to support an alternate hypothesis. When used, the null hypothesis is presumed true until statistical evidence in the form of a hypothesis test indicates otherwise.

Null Hypothesis: H0


Null hypothesis h 01

Statement about value of population parameter like support an m, p or s

Must contain condition of equality

=, , or

Test the Null Hypothesis directly

RejectH0 or fail to rejectH0

Null Hypothesis: H0


Alternative hypothesis h 1

Must be true if support an H0 is false

, <, >

‘opposite’ of Null

sometimes used instead of

Alternative Hypothesis: H1

H1

Ha


Note about forming your own claims hypotheses

If you are conducting a study and want to use a hypothesis test to support your claim, the claim must be worded so that it becomes the alternative hypothesis.

The null hypothesis must contain the condition of equality

Note about Forming Your Own Claims (Hypotheses)


Examples

Set up the null and alternative hypothesis test to

The packaging on a lightbulb states that the bulb will last 500 hours. A consumer advocate would like to know if the mean lifetime of a bulb is different than 500 hours.

A drug to lower blood pressure advertises that it drops blood pressure by 20%. A doctor that prescribes this medication believes that it is less. Set up the null and alternative hypothesis. (see hw # 1)

Examples


Test statistic

a value computed from the sample data that is used in making the decision about the rejection of the null hypothesis

Testing claims about the population proportion

Test Statistic

x - µ

σ

Z*=

n


Critical Region - the decision about the rejection of the null hypothesis Set of all values of the test statistic that would cause a rejection of the null hypothesis

Critical Value - Value or values that separate the critical region from the values of the test statistics that do not lead to a rejection of the null hypothesis


Critical region and critical value

One Tailed Test the decision about the rejection of the null hypothesis

Critical Region and Critical Value

Critical

Region

Critical Value

( z score )


Critical region and critical value1

One Tailed Test the decision about the rejection of the null hypothesis

Critical Region and Critical Value

Critical

Region

Critical Value

( z score )


Critical region and critical value2

Two Tailed Test the decision about the rejection of the null hypothesis

Critical Region and Critical Value

Critical

Regions

Critical Value

( z score )

Critical Value

( z score )


Significance level

Denoted by the decision about the rejection of the null hypothesis 

The probability that the test statistic will fall in the critical region when the null hypothesis is actually true.

Common choices are 0.05, 0.01, and 0.10

Significance Level


Two tailed right tailed left tailed tests

Two-tailed,Right-tailed, the decision about the rejection of the null hypothesis Left-tailed Tests

The tails in a distribution are the extreme regions bounded

by critical values.


Two tailed test

H the decision about the rejection of the null hypothesis 0: µ = 100

H1: µ  100

Two-tailed Test

 is divided equally between

the two tails of the critical

region

Means less than or greater than

Reject H0

Fail to reject H0

Reject H0

100

Values that differ significantly from 100


Right tailed test

H the decision about the rejection of the null hypothesis 0: µ  100

H1: µ > 100

Fail to reject H0

Reject H0

Right-tailed Test

Points Right

Values that

differ significantly

from 100

100


Left tailed test

H the decision about the rejection of the null hypothesis 0: µ  100

H1: µ < 100

Left-tailed Test

Points Left

Reject H0

Fail to reject H0

Values that

differ significantly

from 100

100


Conclusions in hypothesis testing

Traditional Method the decision about the rejection of the null hypothesis

Reject H0if the test statistic falls in the critical region

Fail to reject H0if the test statistic does not fall in the critical region

P-Value Method

Reject H0if the P-value is less than or equal 

Fail to reject H0if the P-value is greater than the 

Conclusions in Hypothesis Testing


P value method of testing hypotheses

Finds the the decision about the rejection of the null hypothesis probability (P-value) of getting a result and rejects the null hypothesis if that probability is very low

Uses test statistic to find the probability.

Method used by most computer programs and calculators.

Will prefer that you use the traditional method on HW and Tests

P-Value Methodof Testing Hypotheses


Finding p values

Two tailed test the decision about the rejection of the null hypothesis

p(z>a) + p(z<-a)

One tailed test (right)

p(z>a)

One tailed test (left)

p(z<-a)

Finding P-values

Where “a” is the value of the calculated test statistic

Used for HW # 3 – 5 – see example on next two slides


Determine P-value the decision about the rejection of the null hypothesis

Sample data: x = 105

or

z* = 2.66

Reject

H0: µ = 100

Fail to Reject

H0: µ = 100

*

µ = 73.4

or z = 0

z = 1.96

z* = 2.66

Just find p(z > 2.66)


Determine P-value the decision about the rejection of the null hypothesis

Sample data: x = 105

or

z* = 2.66

Reject

H0: µ = 100

Reject

H0: µ = 100

Fail to Reject

H0: µ = 100

*

z = - 1.96

µ = 73.4

or z = 0

z = 1.96

z* = 2.66

Just find p(z > 2.66) + p(z < -2.66)


Conclusions in hypothesis testing1

Always test the null hypothesis the decision about the rejection of the null hypothesis

Choose one of two possible conclusions

1. Reject the H0

2. Fail to reject the H0

Conclusions in Hypothesis Testing


Accept versus fail to reject

Never “accept the null hypothesis, we will fail to reject it.

Will discuss this in more detail in a moment

We are not proving the null hypothesis

Sample evidence is not strong enough to warrant rejection (such as not enough evidence to convict a suspect – guilty vs. not guilty)

Accept versus Fail to Reject



Conclusions in hypothesis testing2

Need to formulate it. correct wording of finalconclusion

Conclusions in Hypothesis Testing


Conclusions in hypothesis testing3

Wording of final conclusion it.

1. Reject the H0

Conclusion: There is sufficient evidence to conclude………………………(what ever H1 says)

2. Fail to reject the H0

Conclusion: There is not sufficient evidence to conclude ……………………(what ever H1 says)

Conclusions in Hypothesis Testing


Example

State a conclusion it.

The proportion of college graduates how smoke is less than 27%. Reject Ho:

The mean weights of men at FLC is different from 180 lbs. Fail to Reject Ho:

Example

Used for #6 on HW


Type i error

The mistake of rejecting the null hypothesis when it is true.

(alpha) is used to represent the probability of a type I error

Example: Rejecting a claim that the mean body temperature is 98.6 degrees when the mean really does equal 98.6 (test question)

Type I Error


Type ii error

the mistake of failing to reject the null hypothesis when it is false.

ß (beta) is used to represent the probability of a type II error

Example: Failing to reject the claim that the mean body temperature is 98.6 degrees when the mean is really different from 98.6 (test question)

Type II Error


Type i and type ii errors
Type is false.I and Type II Errors

True State of Nature

H0 True

H0 False

Reject H0

Correct

decision

Type I error

Decision

Fail to Reject H0

Type II error

Correct

decision

In this class we will focus on controlling a Type I error. However, you will have one question on the exam asking you to differentiate between the two.


Type i and type ii errors1

a is false. = p(rejecting a true null hypothesis)

b = p(failing to reject a false null hypothesis)

n, a and b are all related

Type I and Type II Errors


Example1

Identify the type I and type II error. is false.

The mean IQ of statistics teachers is greater than 120.

Type I: We reject the mean IQ of statistics teachers is 120 when it really is 120.

Type II: We fail to reject the mean IQ of statistics teachers is 120 when it really isn’t 120.

Example


Controlling type i and type ii errors

For any fixed sample size is false.n, as  decreases,  increases and conversely.

To decrease both  and , increase the sample size.

Controlling Type I and Type II Errors


Definition1

Power of a Hypothesis Test is false.

is the probability (1 - ) of rejecting a false null hypothesis.

Note: No exam questions on this. Usually covered in a more advanced class in statistics.

Definition


7-2 is false.

Testing a claim about the mean

(large samples)


Traditional or classical method of testing hypotheses

Goal is false.

Identify a sample result that is significantly different from the claimed value

By

Comparing the test statistic to the critical value

Traditional (or Classical) Method of Testing Hypotheses


Determine H is false.0 and H1. (and if necessary)

Determine the correct test statistic and calculate.

Determine the critical values, the critical region and sketch a graph.

Determine Reject H0 or Fail to reject H0

State your conclusion in simple non technical terms.

Traditional (or Classical) Method of Testing Hypotheses (MAKE SURE THIS IS IN YOUR NOTES)


Test statistic for testing a claim about a proportion
Test Statistic for Testing a Claim about a Proportion is false.

Can Use

Traditional method

Or

P-value method


Three methods discussed

1) Traditional method is false.

2) P-value method

3) Confidence intervals

Three Methods Discussed


Assumptions

for testing claims about population means is false.

1) The sample is a random sample.

2) The sample is large (n > 30).

a) Central limit theorem applies

b) Can use normal distribution

3) If  is unknown, we can use sample standard deviation s as estimate for .

Assumptions


Test statistic for claims about when n 30
Test Statistic for Claims about is false.µ when n > 30

x - µx

Z*=

n


Decision criterion

Reject the null hypothesis is false.if the test statistic is in the critical region

Fail to reject the null hypothesis if the test statistic is not in the critical region

Decision Criterion


Claim: is false. = 69.5 years

H0 :  = 69.5

H1 :  69.5

Example:A newspaper article noted that the mean life span for 35 male symphony conductors was 73.4 years, in contrast to the mean of 69.5 years for males in the general population. Test the claim that there is a difference. Assume a standard deviation of 8.7 years. Choose your own significance level.

Step 1: Set up Claim, H0, H1

Select if necessary level:

 = 0.05


Step 2: Identify the test statistic and calculate is false.

x - µ 73.4 – 69.5

z*=== 2.65

8.7

n

35


Step 3: Determine critical region(s) and critical value(s) & Sketch

= 0.05

/2= 0.025 (two tailed test)

0.4750

0.4750

0.025

0.025

z = - 1.96 1.96

Critical Values - Calculator


Step 4: Determine reject or fail to reject H & Sketch0:

Sample data: x = 73.4

or

z = 2.66

Reject

H0: µ = 69.5

Reject

H0: µ = 69.5

Fail to Reject

H0: µ = 69.5

*

z = - 1.96

µ = 73.4

or z = 0

z = 1.96

z = 2.66

P-value = P(z > 2.66) x 2 = .0078

REJECT H0


Claim: & Sketch = 69.5 years

H0 :  = 69.5

H1 :  69.5

There is sufficient evident to conclude that the mean life span of symphony conductors is different from the general population.

OR

There is sufficient evidence to conclude that mean life span of symphony conductors is different from 69.5 years.

Step 5: Restate in simple nontechnical terms

REJECT


Ti 83 calculator
TI-83 Calculator & Sketch

Hypothesis Test using z (large sample)

  • Press STAT

  • Cursor to TESTS

  • Choose ZTest

  • Choose Input: STATS

  • Enter σ and x and two tail, right tail or left tail

  • Cursor to calculate or draw

    *If your input is raw data, then input your raw data in L1 then use DATA


Testing claims with confidence intervals

We reject a claim that the population parameter has a value that is not included in the confidence interval

Typically only used for two-tailed tests

For one-tailed test the degree of confidence would be 1 – 2a (don’t worry about this)

Testing Claims with Confidence Intervals


Testing claims with confidence intervals1

95% confidence interval of 35 conductors (that is, 95% of samples would contain true value µ )

70.5 < µ < 76.3

69.5 is not in this interval

Therefore it is very unlikely that µ = 69.5

Thus we reject claim µ = 69.5 (same conclusion as previously stated)

Testing Claims with Confidence Intervals

  • Claim: mean age = 69.5 years,

  • where n = 35, x = 73.4 ands= 8.7


7- 3 95% of samples would contain true value

Testing a claim about the mean

(small samples)


Assumptions1

for testing claims about population means (student 95% of samples would contain true value t distribution)

1) The sample is a random sample.

2) The sample is small (n  30).

3) The value of the population standard deviation  is unknown.

4) population is approximately normal.

Assumptions


Test statistic for a student t distribution

Critical Values 95% of samples would contain true value

Found in Table A-3

Degrees of freedom (df) = n -1

Critical t values to the left of the mean are negative

Test Statistic for a Student t-distribution

x -µx

t* =

s

n


Choosing between the Normal and Student 95% of samples would contain true value t-Distributions when Testing a Claim about a Population Mean µ

Start

Use normal distribution with

x - µx

Is

n > 30

?

Yes

Z

/ n

(If  is unknown use s instead.)

No

Is the

distribution of

the population essentially

normal ? (Use a

histogram.)

No

Use nonparametric methods, which don’t require a normal distribution.

Yes

Use normal distribution with

Is 

known

?

x - µx

Z

/ n

No

(This case is rare.)

Use the Student t distribution

with

x - µx

t

s/ n


Easier decision tree
Easier Decision Tree 95% of samples would contain true value

  • Use z if

    •  known orn is large

  • Use t if

    • is unknown and n is small and population is approximately normal

      MAKE SURE THIS IS IN YOUR NOTES


P value method

Table A-3 includes only selected values of 95% of samples would contain true value 

Specific P-values usually cannot be found from table

Use Table to identify limits that contain the P-value – very confusing

Some calculators and computer programs will find exact P-values

P-Value Method


Ti 83 calculator1
TI-83 Calculator 95% of samples would contain true value

Hypothesis Test using t (small sample)

  • Press STAT

  • Cursor to TESTS

  • Choose TTest

  • Choose Input: STATS

  • Enter s and x and two tail, right tail or left tail

  • Cursor to calculate or draw

    *If your input is raw data, then input your raw data in L1 then use DATA


Example2

Sample statistics of GPA include n=20, x=2.35 and s=.7 95% of samples would contain true value

Test the claim that the GPA is greater than 2.0

Use traditional method

Use Calculator

Find exact p-value (see excel – TDIST function)

Example


7-4 95% of samples would contain true value

Testing a claim about a proportion


Assumptions2

for testing claims about population proportions 95% of samples would contain true value

1) The sample observations are a random sample.

2) The conditions for a binomial experiment are satisfied

If np 5 and nq 5 are satisfied we 

Use normal distribution to approximate binomial with µ = np and  = npq

Assumptions


Notation

p 95% of samples would contain true value = population proportion (used in the null hypothesis)

q= 1 - p

Notation

n = number of trials

p = x/n(sample proportion)


Test statistic for testing a claim about a proportion1
Test Statistic for Testing a Claim about a Proportion 95% of samples would contain true value

p - p

z*=

pq

n


(determining the sample proportion of households with cable TV)

p sometimes is given directly

“10% of the observed sports cars are red”

is expressed as

p = 0.10

p sometimes must be calculated

“96 surveyed households have cable TV

and 54 do not” is calculated using

x

96

p = = = 0.64

n

(96+54)


Caution

When the calculation of TV)p results in a decimal with many places, store the number on your calculator and use all the decimals when evaluating the z test statistic.

Large errors can result from rounding p too much.

CAUTION


Test statistic for testing a claim about a proportion2
Test Statistic for Testing a Claim about a Proportion TV)

Z* =

p - p

pq

n

x np

x - µ x - np n n p - p

z = = = =

pq

npq

npq

n

n


Ti 83 calculator2
TI-83 Calculator TV)

Hypothesis Test using z (proportions)

  • Press STAT

  • Cursor to TESTS

  • Choose 1-PropZTest

  • Enter x and n and two tail, right tail or left tail

  • Cursor to calculate or draw


ad