0% found this document useful (0 votes)
12 views32 pages

Week 13 Hypothesis Testing

Uploaded by

bonolobadire447
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views32 pages

Week 13 Hypothesis Testing

Uploaded by

bonolobadire447
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Week 13

Basics of Hypothesis Testing


Objectives
By the end of this lesson, you must be able to;
• Identify the null hypothesis and alternative hypothesis
from a given claim, and express both in symbolic form
• Calculate the value of the test statistic, given a claim and
sample data
• Calculate P-values and critical values using the SND.
• Calculate P-values and critical values using the student
t- distribution.
• Calculate degrees of freedom.
• State the conclusion about a claim in simple and nontechnical
terms
Preview
1. Set up the null and alternative hypotheses: Ho and
Ha.
2. Determine level of significance (usually 0.05)
3. calculate the sample statistics (sample size, mean,
proportion and standard deviation).
4. Convert the sample statistic to a test statistic by
changing it to a standard score. (using z-distribution
or t-distribution)
5. Find the p-value for your test statistic and double
this probability if Ha is the “not equal to” alternative.
i.e. two tail test.
6. Examine your p-value and make your conclusion
Significance Tests

• We often see or hear that there is a difference between parameters.


• e.g. Prevalence of smoking is 15% for males and 10% for females. Or
In a certain population, there are 59% males and 41% females.
• We can ask ourselves, is this difference a true difference or was it due
to the way we selected our sample?...i.e. sampling bias?
• In other words, how significant is this difference, is it statistically
significant?
• We therefore need to make an assumption (hypothesis) and then
test the assumption (hypothesis test)
…Significance Tests

• In order to test the difference of certain


statistical findings. One has to;

• Make/construct a hypothesis
• Calculate your sample statistics
• Calculate your test statistics
• Find p-value or critical value
• Conclude based on p-value or critical value
Definitions

• A hypothesis is a claim or statement about a


property of a population.
• A hypothesis test is a procedure for testing a
claim about a property of a population.
Hypotheses
• Hypothesis testing is the application of statistical
analysis to determine if there is enough evidence
provided by the sample.
• We can either make a statement to negate or adjoin to the
difference, then conduct a test to either nullify or accept
the statement.
• Therefore we have a null (nil) hypothesis and
alternative hypothesis
• A null hypothesis (Ho) is the hypothesis of no
difference.
• Alternative hypothesis is the hypothesis of difference.
Null Hypothesis
• The null hypothesis (denoted by H0) is a statement
that the value of a population parameter (such as
proportion, mean, or standard deviation) is equal to
some claimed value.
• We test the null hypothesis directly in the sense that
we assume it is true and reach a conclusion to
either reject H0 or fail to reject H0.
Alternative Hypothesis

• The alternative hypothesis (denoted by HA) is the


statement that the parameter has a value that
somehow differs from the null hypothesis.

• The symbolic form of the alternative hypothesis


must use one of these symbols: <, >, ≠.
Ha

• Ha: u>x  right tail test

• Ha: u<x  left tail test

• Ha: u≠x  two tail test (we double the


probability)
…Hypotheses

• If the proportion of males is 59% while that of


females is 41%

Ho: There is no difference between the


proportions of males and females.
Ha: There is a difference between proportion of
male and females.
…Hypotheses

• A hypothesis test is a statistical procedure that’s


designed to test a claim. Typically, the claim is
being made about a population parameter
• Because parameters tend to be unknown
quantities, everyone wants to make claims about
what their values may be.
Ho OR Ha

• Typically, the null hypothesis says that nothing new


is happening; or the groups have the same average.
• In general, you assume that people’s claims
are true until proven otherwise.
…Ho OR Ha

• The next question is, how large of a difference is


large enough to reject Ho?
• We decide based on;
– P-value
– Comparison between test statistic and the critical value

- A high p-value, the null flies high. A low p-value,


the null lies low.
P- values

• The P (probability) value is used when we wish to


see how likely it is that a hypothesis is true.
• The P value gives the probability of any observed
difference having happened by chance.
• The probability of getting the statistics you got or
more extreme, assuming the null hypothesis is true.
– Statistically significant; the probability of getting your statistic is
too rare to have occurred by chance. Hence, there is evidence
to support the alternative hypothesis.
How do you get the P-value?

1. Using SND for large sample means (>30) and


proportions.

2. Using t-distribution and degrees of


freedom for small samples(<30) or unknown
population standard deviation
Hypothesis testing using P-values

• you look at where your test statistic ends up on the


standard normal (Z) distribution .
• We often use 0.05 as the cut off point to either accept
or reject our Ho.
 If P> 0.05…We fail to reject Ho ( or Reject Ha)
 If P<0.05…We reject Ho ( or Accept Ha)
…P- values

• P = 0.5 means that the probability of the difference


having happened by chance is 0.5 in 1, or 50:50.

• P = 0.05 means that the probability of the difference


having happened by chance is 0.05 in 1, i.e. 1 in 20. It
is the figure frequently quoted as being “statistically
significant”, i.e. unlikely to have happened by
chance and therefore important.
P values….exercise
What is a t-distribution?
What is a t-distribution?

• similar to a normal distribution in that it has a basic bell shape


with an area of 1 under it, but is shorter and flatter than a normal
distribution.
• It is centred at zero, but its standard deviation is proportionally
larger compared to the Z-distribution.
• Each t-distribution is distinguished by degrees of freedom, which are
related to the sample size of the data set.
• Smaller sample sizes have flatter t-distributions than larger sample
sizes.
• The larger the sample size is, and the larger the degrees of
freedom, the more the t-distribution looks like a standard normal
distribution (Z-distribution).
What is a t-distribution?

• As the sample size increases, the t- and the Z-


distributions are more and more alike

• You use a t-distribution when you do not know the


standard deviation of the population and you have
to use the standard deviation of the sample (s) to
estimate it.
Reading the t-distribution
In a hypothesis test we either say “reject Ho” or
“fail to reject Ho” — we never say “accept
Ho.”
Calculating the Test Statistic
Steps in hypothesis testing

1. Set up the null and alternative hypotheses: Ho and Ha.


2. Determine level of significance (usually 0.05)
3. calculate the sample statistics (sample size, mean,
proportion and standard deviation).
4. Convert the sample statistic to a test statistic by
changing it to a standard score. (using z-distribution or
t-distribution)
5. Find the p-value for your test statistic and double this
probability if Ha is the “not equal to” alternative. i.e. two
tail test.
6. Examine your p-value and make your conclusion
• If your test statistic is out in the tails of the
standard normal distribution, far from 0, it means
the results of this sample do not verify the claim,
hence we reject Ho.
• If the null hypothesis is true, most (about 95%) of
the samples will result in test statistics that lie
roughly within 2 standard errors of the claim.
Reject or Fail to reject
Exercises

• Researchers believe that 15% of people in


Gaborone are infected with the SARS-CoV-2
virus.You believe it is higher. So you collect a
sample of 60 people and find that 12 are
infected. Do you have evidence that more than
15% of people in Gaborone are infected?
Exercises

• A manufacturer claims that a new cell phone


battery lasts 10.5 hrs. A consumer agency
believes that the claim in incorrect and runs a
test on a sample of 50. The sample mean is
9.6hrs, with standard deviation of 1.3. Is the
manufacturer’s claim valid?
• Your test statistic represents the distance between your
sample results and the claimed population value, in terms
of number of standard errors.
• If you see that the distance between the claim and the
sample statistic is small in terms of standard errors, your
sample isn’t far from the claim and your data are telling
you to stick with Ho.
• If that distance is large, however, your data are showing
less and less support for Ho.
END WEEK 13

You might also like