Chapter 2-HYPOTHESIS TESTING

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 52

HYPOTHESIS TESTING

 A hypothesis test is a process that uses


sample statistics to test a claim about the
value of a population parameter.
 A verbal statement, or claim, about a
population parameter is called a statistical
hypothesis.
 A hypothesis test evaluates two mutually
exclusive statements about a population to
determine which statement is best supported
by the sample data
Types of Hypothesis
 There are two types of hypothesis namely:
Non-statistical hypothesis
Statistical hypothesis
Non-Statistical Hypothesis Testing
When a person is accused of a crime, he or she
faces a trial. The prosecution presents its case,
and the judge must make a decision on the basis
of the evidence presented. In fact, the jury
conducts a test of hypothesis. There are actually
two hypotheses that are tested.
 The null hypothesis is
H0: The defendant is innocent
 The alternative hypothesis or research
hypothesis is
H1: The defendant is guilty
Types of Errors
No matter which hypothesis represents the claim, always begin the hypothesis test
assuming that the null hypothesis is true.

At the end of the test, one of two decisions will be made:


1. Reject the null hypothesis, or
2. Do not reject the null hypothesis.

A type I error occurs if the null hypothesis is rejected when it is true.

A type II error occurs if the null hypothesis is not rejected when it is false.
 In our justice system, Type I errors are
regarded as more serious.
 As a consequence, the system is set up so that
the probability of a Type I error is small.
 This is arranged by placing the burden of proof
on the prosecution (the prosecution must
prove)
 Judges must find the defendant guilty only if
there is evidence beyond a reasonable doubt.
 Of course, the judge does not know which
hypothesis is correct.
 A decision must be made on the basis of the
evidence presented by both the prosecution
and the defence.
 There are only two possible decisions Convict
or acquit the defendant.
 In statistical parlance, convicting the
defendant is equivalent to rejecting the null
hypothesis in favour of the alternative (Enough
evidence)
 Acquitting a defendant is phrased as not
rejecting the null hypothesis in favour of the
alternative (Not enough evidence to convict),
 There are two possible errors. A Type I error
occurs when we reject a true null hypothesis.
A Type II error is defined as not rejecting a
false null hypothesis.
EXERCISE
You are contemplating doing Masters Program .
If you succeed, a life of fame, fortune, and
happiness awaits you. If you fail, you’ve wasted
2 years of your life.
Required
Identify the hypotheses, define Type I and Type II
errors, and discuss the consequences of each
error. In setting up the hypotheses, you will have
to consider where to place the “burden of proof.”
Statistical Hypothesis Testing
Example:
Statesville college claims that 94% of their graduates find employment within six months
of graduation. What will a type I or type II error be?

H0: p = 0.94 (Claim)


H1: p  0.94

A type I error is rejecting the null when it is true.


The population proportion is actually 0.94, but is rejected. (We believe it is not 0.94.)

A type II error is failing to reject the null when it is false.


The population proportion is not 0.94, but is not rejected. (We believe it is 0.94.)
Statistical Tests
After stating the null and alternative hypotheses and specifying the level of significance,
a random sample is taken from the population and sample statistics are calculated.

The statistic that is compared with the parameter in the null hypothesis is called
the test statistic.

Population Test statistic Standardized test statistic


parameter
μ
x z (n  30)
t (n < 30)
p p̂ z
2 s2 X2
Ways of Testing Hypothesis

 Confidence Interval
 Test of significance (P Value Approach)
a) Confidence Intervals

 A point estimate is the statistic, computed


from sample information, which is used to
estimate the population parameter.
 A confidence interval estimate is a range of
values constructed from sample data so that
the population parameter is likely to occur
within that range at a specified probability.
The specified probability is called the level of
confidence.
 Find a range of values, L <  < U, that we can
be really confident contains .
 This range of values is called a “confidence
interval.”
General Form of most Confidence Intervals

 Sample estimate ± margin of error


 Lower limit L = estimate - margin of error
 Upper limit U = estimate + margin of error
 Then, we’re confident that the population
value is somewhere between L and U.
Confidence Interval Estimates for the Mean

If the sample size is less than 30 and the


population distribution is known to be
normal, or if the sample size is large and the
population distribution is unknown, a (1-
)100% confidence interval estimate for the
population mean, , based on sample data
is:
S
X  t
2
, n 1 n

15
Confidence Interval for the Mean – Example using
the t-distribution

A tire manufacturer wishes to


investigate the tread life of its
Given in the problem :
tires. A sample of 10 tires driven
50,000 miles revealed a sample n  10
mean of 0.32 inch of tread x  0.32
remaining with a standard
deviation of 0.09 inch. Construct s  0.09
a 95 percent confidence interval
for the population mean. Would
it be reasonable for the
manufacturer to conclude that Compute the C.I. using the
after 50,000 miles the t - dist. (since  is unknown)
population mean amount of s
tread remaining is 0.30 inches? X  t / 2,n 1
n
16
t-distribution Table

17
Example

A tire manufacturer wishes to


investigate the tread life of its
Given in the problem :
tires. A sample of 20 tires driven
50,000 miles revealed a sample n  20
mean of 0.45 inch of tread x  0.45
remaining with a standard
deviation of 0.10 inch. Construct s  0.10
a 95 percent confidence interval
for the population mean. Would
it be reasonable for the
manufacturer to conclude that Compute the C.I. using the
after 50,000 miles the t - dist. (since  is unknown)
population mean amount of s
tread remaining is 0.35 inches? X  t / 2,n 1
n
18
b) P Value Approach
 Financial analysts do not report whether or not
their tests reject a particular hypothesis about
a regression parameter.
 Instead they report the p-value or probability
value for a particular hypothesis.
 The significance test is the process used by
researchers to determine whether the null
hypothesis is rejected in favour of the alternative
research hypothesis or not.
In a hypothesis test, the level of significance is your maximum allowable probability of
making a type I error. It is denoted by , the lowercase Greek letter alpha.

Hypothesis tests are based on


.
The probability of making a type II error is denoted by , the lowercase Greek letter beta.

By setting the level of significance at a small value, you are saying that you want the
probability of rejecting a true null hypothesis to be small.

Commonly used levels of significance:

 = 0.10  = 0.05  = 0.01


Types of Hypothesis Tests
 There are three types of hypothesis tests – a
left-, right-, or two-tailed test.
 The type of test depends on the region of the
sampling distribution that favors a rejection of
H0.
 This region is indicated by the alternative
hypothesis
Left-tailed Test
1. If the alternative hypothesis contains the less-than inequality symbol (<), the
hypothesis test is a left-tailed test.

H0: μ  k
H a: μ < k

P is the area to
the left of the test
statistic.

z
-3 -2 -1 0 1 2 3
Test
statistic
Right-tailed Test
2. If the alternative hypothesis contains the greater-than symbol (>), the hypothesis test
is a right-tailed test.

H0: μ  k
H1: μ > k

P is the area to
the right of the
test statistic.

z
-3 -2 -1 0 1 2 3
Test
statistic
Two-tailed Test
3. If the alternative hypothesis contains the not-equal-to symbol (), the hypothesis test
is a two-tailed test. In a two-tailed test, each tail has an area of P.
1
2
H0: μ = k
H1: μ  k
P is twice the area
P is twice the area to the right of the
to the left of the positive test
negative test statistic.
statistic.

z
-3 -2 -1 0 1 2 3
Test Test
statistic statistic
Hypothesis Testing for the
Mean (Large Samples)
Using P-values to Make a Decision
Decision Rule Based on P-value
To use a P-value to make a conclusion in a hypothesis test, compare the P-value with .

1. If P  , then reject H0.


2. If P > , then Do Not reject H0.

Recall that when the sample size is at least 30, the sampling distribution for the
sample mean is normal.
Using P-values to Make a Decision
Example:
The P-value for a hypothesis test is P = 0.0256. What is your decision if the level of
significance is
a.) 0.05,

b.) 0.01?

a.) Because 0.0256 is < 0.05, you should reject the null hypothesis.

b.) Because 0.0256 is > 0.01, Do not reject the null hypothesis.
Finding the P-value
After determining the hypothesis test’s standardized test statistic and the test statistic’s
corresponding area, do one of the following to find the P-value.

a. For a left-tailed test, P = (Area in left tail).


b. For a right-tailed test, P = (Area in right tail).
c. For a two-tailed test, P = 2(Area in tail of test statistic).

Example:
The test statistic for a right-tailed test is z = 1.56. Find the P-value.

The area to the right of z = 1.56 is 1


P-value = 0.0594 – .9406 = 0.0594.
0 1.56 z
Using P-values for a z-Test
The z-test for the mean is a statistical test for a population mean. The z-test can be used
when the population is normal and  is known, or for any population when the sample
size n is at least 30.

The test statistic is the sample mean x and the standardized test statistic is z.

x μ σ
z   st a n da r d er r or  σ x
σ n n
When n  30, the sample standard deviation s can be substituted for .
Using P-values for a z-Test
Using P-values for a z-Test for a Mean μ
In Words In Symbols

1. State the claim mathematically and State H0 and H1.


verbally. Identify the null and
alternative hypotheses.
2. Specify the level of significance. Identify .
3. Determine the standardized test x μ
z 
statistic. σ n
4. Find the area that corresponds to z.

Continued.
Hypothesis Testing with P-values
Example:
A manufacturer claims that its rechargeable batteries are good for an average of more
than 1,000 charges. A random sample of 100 batteries has a mean life of 1002
charges and a standard deviation of 14. Is there enough evidence to support this
claim at  = 0.01?

H0:   1000 H1:  > 1000 (Claim)

The level of significance is  = 0.01.

The standardized test statistic is

x  μ 1002  1000
z  
σ n 14 100
 1.43
Continued.
Hypothesis Testing with P-values
Example continued:
A manufacturer claims that its rechargeable batteries are good for an average of more
than 1,000 charges. A random sample of 100 batteries has a mean life of 1002
charges and a standard deviation of 14. Is there enough evidence to support this
claim at  = 0.01?

H0:   1000 H1:  > 1000 (Claim)


z  1.43
The area to the right of P-value is greater than
z = 1.43 is P = 0.0764.  = 0.01, fail to reject H0.
0 1.43 z

At the 1% level of significance, there is not enough evidence to support the


claim that the rechargeable battery has an average life of at least 1000
charges.
Example:
The manager of a departmental store is thinking
about establishing a new billing system for the
store’s credit customers. After a thorough
financial analysis, she determines that the new
system will be cost-effective only if the mean
monthly account is more than $170. A random
sample of 400 monthly accounts is drawn, for
which the sample mean is $178. The manager
knows that the accounts are approximately
normally distributed with a standard deviation of
$65. Can the manager conclude from this that the
new system will be cost-effective?
Solution
Hypothesis
H0: U  170
H1: U > 170 (Claim)
Exercise
 A researcher wishes to test the claim
that the average age of lifeguards in
Ocean City is greater than 24 years.
She selects a sample of 36 guards and
finds the mean of the sample to be 24.7
years, with a standard deviation of 2
years. Is there evidence to support the
claim at α= 0.05?
 State the hypotheses and identify the claim.
Example
 A researcher claims that the average wind
speed in a certain city is 8 miles per hour. A
sample of 32 days has an average wind speed
of 8.2 miles per hour. The standard deviation
of the sample is 0.6 mile per hour. At α = 0.05,
is there enough evidence to reject the claim?
Use the P-value method.
Step 3: Use Z Table , find the corresponding area
for z = 1.89 = .9706
Step 4: Subtract the value from 1 = 0.0294
 Step 5: Make the decision: Since this test is
two-tailed, the value 0.0294 must be doubled;
2(0.0294) = 0.0588.
 Hence, the decision is not to reject the null
hypothesis, since the P-value is greater than
0.05.
 Step 6: Summarize the results. There is not
enough evidence to reject the claim that the
average wind speed is 8 miles per hour.
Hypothesis Testing for the
Mean (Small Samples)
Hypothesis Testing for
Proportions
(Critical Values)
z-Test for a Population Proportion
The z-test for a population is a statistical test for a population proportion. The z-test can
be used when a binomial distribution is given such that np  5 and nq  5.

The test statistic is the sample proportionp̂ and the standardized test statistic is z.

pˆ  μ pˆ pp
z   ˆ
σ pˆ pq n
Hypothesis Test for Proportions
Using a z-Test for a Proportion p
Verify that np  5 and nq  5.

In Words In Symbols

5. Determine any rejection regions.


6. Find the standardized test statistic.
p̂  p
7. Make a decision to reject or fail to z 
reject the null hypothesis. pq n
8. Interpret the decision in the context of If z is in the rejection
the original claim. region, reject H0.
Otherwise, do not to
reject H0.
Hypothesis Test for Proportions
Example:
Herentials college claims that more than 94% of their graduates
find employment within six months of graduation. In a sample
of 500 randomly selected graduates, 475 of them were
employed. Is there enough evidence to support the college’s
claim at a 1% level of significance?

Verify that the products np and nq are at least 5.

np = (500)(0.94) = 470 and nq = (500)(0.06) = 30

H0: p  0.94 Ha: p > 0.94 (Claim)

Continued.
Hypothesis Test for Proportions
Example continued:
Statesville college claims that more than 94% of their graduates find employment
within six months of graduation. In a sample of 500 randomly selected graduates,
475 of them were employed. Is there enough evidence to support the college’s claim
at a 1% level of significance?

H0: p  0.94 Ha: p > 0.94 (Claim)


Because the test is a right-tailed test and  = 0.01, the critical value is
2.33. (1-0.01) = 0.99 (use Z Tables) p̂  p 0.95  0.94
z  
pq n (0.94)(0.06) 500
 0.94 Test statistic
0 2.33 z
Continued.
Hypothesis Test for Proportions
Example continued:
Statesville college claims that more than 94% of their graduates find employment
within six months of graduation. In a sample of 500 randomly selected graduates,
475 of them were employed. Is there enough evidence to support the college’s claim
at a 1% level of significance?

H0: p  0.94 Ha: p > 0.94 (Claim)

The test statistic falls in the


0 2.33 z nonrejection region, so H0 is
z  0.94 not rejected.

At the 1% level of significance, there is not enough evidence to support the


college’s claim.
Hypothesis Test for Proportions
Example:
A cigarette manufacturer claims that one-eighth of the US adult population smokes
cigarettes. In a random sample of 100 adults, 5 are cigarette smokers. Test the
manufacturer's claim at  = 0.05.

Verify that the products np and nq are at least 5.

np = (100)(0.125) = 12.5 and nq = (100)(0.875) = 87.5

H0: p = 0.125 (Claim) Ha: p  0.125

Because the test is a two-tailed test and  = 0.05 (divide it by 2) then subtract from 1.
Form Z tables the critical values are ± 1.96.

Continued.
Hypothesis Test for Proportions
Example continued:
A cigarette manufacturer claims that one-eighth of the US adult population smokes
cigarettes. In a random sample of 100 adults, 5 are cigarettes smokers. Test the
manufacturer's claim at  = 0.05.

H0: p = 0.125 (Claim) Ha: p  0.125

The test statistic is


2.27
z p̂  p  0.05  0.125
z0 = 1.96 0 z0 = 1.96 z 
pq n (0.125)(0.875) 100
 2.27 Reject H0.

At the 5% level of significance, there is enough evidence to reject the claim that one-eighth
of the population smokes.
 Statistics practitioners can translate p-values using the
following descriptive terms:
 If the p-value is less than .01, we say that there is
overwhelming evidence to infer that the alternative
hypothesis is true. We also say that the test is highly
significant.
 If the p-value lies between .01 and .05, there is strong
evidence to infer that the alternative hypothesis is true.
The result is deemed to be significant.
 If the p-value is between .05 and .10, we say that there is
weak evidence to indicate that the alternative hypothesis
is true.
 When the p-value exceeds .10, we say that there is little to
no evidence to infer that the alternative hypothesis is true.
Summary
Example
TTr =f (UGE, PCG, IMV, AT, EXC)
Where Where, TTr Trade tax revenue as a share of total tax revenue, UGE
Underground economy as share of GDP, PCG GDP per capita growth (annual %), IMV
Import value index, AT Tariff rate weighted mean, all products (%), EXC Official
exchange rate, To measure the macroeconomic determinants of trade tax revenue, this
study uses import value, exchange rate, policy of trade liberalization, level of economic
development, real effective exchange rate of economy and different types of imports
elasticities.
Regression Results
END

You might also like