0% found this document useful (0 votes)
10 views56 pages

Understanding Hypothesis Testing Basics

Hypothesis testing is a statistical method used to draw conclusions about a population based on sample data, involving a null hypothesis (H0) and an alternative hypothesis (Ha). A hypothesis is a testable prediction about the relationship between variables, which can be derived from theories or prior research. The process includes defining hypotheses, selecting significance levels, conducting tests, and interpreting results to either reject or fail to reject the null hypothesis.

Uploaded by

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

Understanding Hypothesis Testing Basics

Hypothesis testing is a statistical method used to draw conclusions about a population based on sample data, involving a null hypothesis (H0) and an alternative hypothesis (Ha). A hypothesis is a testable prediction about the relationship between variables, which can be derived from theories or prior research. The process includes defining hypotheses, selecting significance levels, conducting tests, and interpreting results to either reject or fail to reject the null hypothesis.

Uploaded by

Ogak Jerry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Hypothesis testing Lecture 10

Introduction
• Hypothesis testing is a form of statistical inference that uses data from a sample to
draw conclusions about a population parameter or a population probability
distribution.
• First, a tentative assumption is made about the parameter or distribution.
• This assumption is called the null hypothesis and is denoted by H0. An alternative
hypothesis (denoted Ha), which is the opposite of what is stated in the null
hypothesis, is then defined.
• The hypothesis-testing procedure involves using sample data to determine whether
or not H0 can be rejected.
• If H0 is rejected, the statistical conclusion is that the alternative hypothesis Ha is true.
What is a Hypothesis ?
• A supposition or proposed explanation made on the basis of limited
evidence as a starting point for further investigation.
• It is either, a theory, theorem, thesis, conjecture, supposition,
postulation, postulate, proposition, premise, assumption;
• Philosophy: a proposition made as a basis for reasoning, without any
assumption of its truth
What Exactly Is a Hypothesis?

• A hypothesis is a tentative statement about the relationship between


two or more variables.
• A hypothesis is a specific, testable prediction about what you expect
to happen in your study and /or business situation.
• Remember, a hypothesis does not have to be correct.
• While the hypothesis predicts what the researchers expect to see, the
goal of research is to determine whether this guess is right or wrong.
• When conducting an experiment, researchers might explore a number
of different factors to determine which ones might contribute to the
ultimate outcome.
• In many cases, researchers may find that the results of an experiment
do not support the original hypothesis.
• When writing up these results, the researchers might suggest other
options that should be explored in future studies.
How Do we Come Up With a Hypothesis?

• There are many different ways to come up with a hypothesis.


• In many cases, researchers/Business people/Academicians might
draw a hypothesis from a specific theory or build on previous
research.
• For example, prior research has shown that stress can impact the
immune system.
• So a researcher might say for a specific hypothesis that: "People with
high stress levels will be more likely to contract a common cold after
being exposed to the virus than are people who have low stress
levels."
• In other instances, researchers might look at commonly held beliefs
or folk wisdom.
• "Birds of a feather flock together" is one example of folk wisdom that
a psychologist might try to investigate.
• The researcher might pose a specific hypothesis that "People tend to
select romantic partners who are similar to them in interests and
educational level."
Elements of a Good Hypothesis

• When trying to come up with a good hypothesis for your own


Business research or experiments, ask yourself the following
questions:
• Is your hypothesis based on your research topic?
• Can your hypothesis be tested?
• Does your hypothesis include independent and dependent variables?
• Before you come up with a specific hypothesis, spend some time
doing background research on your topic.
• Once you have completed a literature review, start thinking of
potential questions you still have.
• Pay attention to the discussion section in the journal articles you read.
• Many authors will suggest questions that still need to be explored
Examples of a Good Hypothesis

• A hypothesis often follows a basic format of "If {this happens} then


{this will happen}." One way to structure your hypothesis is to
describe what will happen to the dependent variable if you make
changes to the independent variable.
• The basic format might be:
• "If {these changes are made to a certain independent variable}, then
we will observe {a change in a specific dependent variable}."A few
examples:
• "Students who eat breakfast will perform better on a math exam than
students who do not eat breakfast."
• "Students who experience test anxiety prior to an English exam will
get higher scores than students who do not experience test anxiety."
• "Motorists who talk on the phone while driving will be more likely to
make errors on a driving course than those who do not talk on the
phone."
Checklist

• Does your hypothesis focus on something that you can actually test?
• Does your hypothesis include both an independent and dependent
variable?
• Can you manipulate the variables?
• Can your hypothesis be tested without violating ethical standards?
• Alina Bradford( 2013), A scientific hypothesis is the initial building
block in the scientific method. Many describe it as an “educated
guess,” based on prior knowledge and observation.
• While this is true, the definition can be expanded. A hypothesis also
includes an explanation of why the guess may be correct, according to
National Science Teachers Association.
Hypothesis basics

• A hypothesis is a suggested solution for an unexplained occurrence


that does not fit into current accepted scientific theory.
• The basic idea of a hypothesis is that there is no pre-determined
outcome.
• For a hypothesis to be termed a scientific hypothesis, it has to be
something that can be supported or refuted through carefully crafted
experimentation or observation.

• This is called falsifiability and testability, according to the Encyclopedia
Britannica.
• A key function in this step in the scientific method is deriving
predictions from the hypotheses about the results of future
experiments, and then performing those experiments to see whether
they support the predictions.
The evolution of a hypothesis

• Most formal hypotheses consist of concepts that can be connected


and their relationships tested.
• A group of hypotheses comes together to form a conceptual
framework.
• As sufficient data and evidence are gathered to support a hypothesis,
it becomes a working hypothesis, which is a milestone on the way to
becoming a theory.
• Though hypotheses and theories are often confused, theories are the
result of a tested hypothesis.
• While hypotheses are ideas, theories explain the findings of the
testing of those ideas.
• "Theories are the ways that we make sense of what we observe in the
natural world. Theories are structures of ideas that explain and
interpret facts," Tanner (2012).
Testing a hypothesis

• The primary trait of a hypothesis is that something can be tested and


that those tests can be replicated, according to Midwestern State
University. It is often examined by multiple scientists to ensure the
integrity and veracity of the experiment. This process can take years,
and in many cases hypotheses do not go any further in the scientific
method as it is difficult to gather sufficient supporting evidence.
• "As a field biologist my favorite part of the scientific method is being
in the field collecting the data, but what really makes that fun is
knowing that you are trying to answer an interesting question so the
first step in identifying questions and generating possible answers
(hypotheses) is also very important and is a creative process.
• Then once you collect the data you analyze it to see if your hypothesis
is supported or not," Jaime Tanner, a professor of biology at Marlboro
College, told Live Science.
• A null hypothesis is the name given to a hypothesis that is possibly
false or has no effect.
• Often, during a test, the scientist will study another branch of the idea
that may work, which is called an alternative hypothesis.
• During a test, the scientist may try to prove or disprove just the null
hypothesis or test both the null and the alternative hypothesis. If a
hypothesis specifies a certain direction, it is called one-tailed
hypothesis.
• This means that the scientist believes that the outcome will be either
with effect or without effect.
• When a hypothesis is created with no prediction to the outcome, it is
called a two-tailed hypothesis because there are two possible
outcomes.
• The outcome could be with effect or without effect, but until the
testing is complete, there is no way of knowing which outcome it will
be, according to The Web Center for Social Research Methods.
• During testing, a scientist may come upon two types of errors.
• A Type I error is when the null hypothesis is rejected when it is true.
• A Type II error occurs when the null hypothesis is not rejected when it
is false, according to the University of California, Berkeley.
• For example, a scientist can form a hypothesis that a certain type of
tomato is red.
• During research, the scientist then finds that each tomato of this type
is red.
• Though his findings confirm his hypothesis, there may be a tomato of
that type somewhere in the world that isn't red.
• Thus, his hypothesis is true, but it may not be true 100 percent of the
time.
The structure of hypothesis testing

• Whilst all pieces of quantitative research have some dilemma, issue or


problem that they are trying to investigate, the focus in hypothesis
testing is to find ways to structure these in such a way that we can
test them effectively.
• Typically, it is important to:
• [Link] the research hypothesis for the study.
• [Link] how you are going to operationalize (that is, measure or
operationally define) what you are studying and set out the variables
to be studied.
• [Link] out the null and alternative hypothesis (or more than one
hypothesis; in other words, a number of hypotheses).
• [Link] the significance level.
• [Link] a one- or two-tailed prediction.
• [Link] whether the distribution that you are studying is normal
(this has implications for the types of statistical tests that you can run
on your data).
• [Link] an appropriate statistical test based on the variables you
have defined and whether the distribution is normal or not.
• [Link] the statistical tests on your data and interpret the output.
• [Link] or fail to reject the null hypothesis.
• For example, assume that a radio station selects the music it plays
based on the assumption that the average age of its listening
audience is 30 years.
• To determine whether this assumption is valid, a hypothesis test could
be conducted with the null hypothesis given as H0: μ = 30 and the
alternative hypothesis given as Ha: μ ≠ 30.
• Based on a sample of individuals from the listening audience, the
sample mean age, x̄, can be computed and used to determine
whether there is sufficient statistical evidence to reject H0.
• Conceptually, a value of the sample mean that is “close” to 30 is
consistent with the null hypothesis, while a value of the sample mean
that is “not close” to 30 provides support for the alternative
hypothesis.
• What is considered “close” and “not close” is determined by using the
sampling distribution of x̄.
• Ideally, the hypothesis-testing procedure leads to the acceptance of
H0 when H0 is true and the rejection of H0 when H0 is false.
• Unfortunately, since hypothesis tests are based on sample
information, the possibility of errors must be considered.
• A type I error corresponds to rejecting H0 when H0 is actually true,
and a type II error corresponds to accepting H0 when H0 is false.
• The probability of making a type I error is denoted by α, and the
probability of making a type II error is denoted by β.
• In using the hypothesis-testing procedure to determine if the null
hypothesis should be rejected, the person conducting the hypothesis
test specifies the maximum allowable probability of making a type I
error, called the level of significance for the test. Common choices for
the level of significance are α = 0.05 and α = 0.01.
• Although most applications of hypothesis testing control the
probability of making a type I error, they do not always control the
probability of making a type II error.
• A graph known as an operating-characteristic curve can be
constructed to show how changes in the sample size affect the
probability of making a type II error.
• A concept known as the p-value provides a convenient basis for
drawing conclusions in hypothesis-testing applications.
• The p-value is a measure of how likely the sample results are,
assuming the null hypothesis is true; the smaller the p-value, the less
likely the sample results.
• If the p-value is less than α, the null hypothesis can be rejected;
otherwise, the null hypothesis cannot be rejected.
• The p-value is often called the observed level of significance for the
test.
• A hypothesis test can be performed on parameters of one or more
populations as well as in a variety of other situations. In each
instance, the process begins with the formulation of null and
alternative hypotheses about the population.
• In addition to the population mean, hypothesis-testing procedures are
available for population parameters such as proportions, variances,
standard deviations, and medians.
• Hypothesis tests are also conducted in regression and correlation
analysis to determine if the regression relationship and the
correlation coefficient are statistically significant (see below
Regression and correlation analysis).
• A goodness-of-fit test refers to a hypothesis test in which the null
hypothesis is that the population has a specific probability
distribution, such as a normal probability distribution. Nonparametric
statistical methods also involve a variety of hypothesis-testing
procedures.
Statistical hypothesis
testing
Statistical Hypotheses
• Statistical Hypotheses are mathematical, or logical
statements that help researchers interpret the results of
research
• Statistical hypotheses consist of the Null Hypothesis (H0),
the hypothesis of no difference and the Alternative
Hypothesis (H1 or HA) which is similar in form to the
research hypothesis.
• Null: (H0: µ1 - µ2 = 0 )
• Alternative: (H1: µ1 - µ2 ≠ 0)
Statistical hypothesis testing can be done using the
following tests
• Correlation
• Regression
• Chi square
The Null Hypothesis, the Alpha Level, the Critical Region,
and the Test Statistic
• The following four/five steps outline the process of
hypothesis testing and introduce some of the new
terminology:
i. Write null and alternative hypotheses.
ii. Calculate an appropriate test statistic.
iii. Determine a p-value associated with the test statistic
iv. .Decide between the null and alternative hypotheses.
v. State a "real world" conclusion.
Calculating the
Product Moment ( Product
Moment)Correlation Coefficient
Sample correlation coefficient:

r
 ( x  x )( y  y )
[ ( x  x ) ][  ( y  y ) ]
2 2

or the algebraic equivalent:


n xy  x y
r
[n(  x )  (  x ) ][n(  y )  (  y ) ]
2 2 2 2

where:
r = Sample correlation coefficient
n = Sample size
x = Value of the independent variable
y = Value of the dependent variable
Calculation Example
Tree Trunk
Height Diamete
r
y x xy y2 x2
35 8 280 1225 64
49 9 441 2401 81
27 7 189 729 49
33 6 198 1089 36
60 13 780 3600 169
21 7 147 441 49
45 11 495 2025 121
51 12 612 2601 144
=321 =73 =3142 =14111 =713
Calculation Example (continued)

Tree n xy   x y
Height, r
y
70
[n(  x )  (  x) ][n(  y )  (  y) ]
2 2 2 2

60

8(3142)  (73)(321)
50 
40
[8(713)  (73)2 ][8(14111)  (321)2 ]
30

 0.886
20

10

0
r = 0.886 → relatively strong positive
0 2 4 6 8 10 12 14
linear association between x and y
Trunk Diameter, x
Excel Output
Excel Correlation Output
Tools / data analysis / correlation…

Tree Height Trunk Diameter


Tree Height 1
Trunk Diameter 0.886231 1

Correlation between
Tree Height and Trunk Diameter
Significance Test for Correlation

• Hypotheses
H0: ρ = 0 (no correlation)
HA: ρ ≠ 0 (correlation exists)

• Test statistic
r
• t (with n – 2 degrees of freedom)
2
1 r
n 2
Example: Produce Stores
Is there evidence of a linear relationship
between tree height and trunk diameter at
the .05 level of significance?

H0: ρ = 0 (No correlation)


H1: ρ ≠ 0 (correlation exists)
 =.05 , df = 8 - 2 = 6

r .886
t  4.68
1 r 2 1  .886 2
n 2 8 2
Example: Test Solution

r .886 Decision:
t  4.68
1 r 2 1  .886 2 Reject H0

n 2 8 2 Conclusion:
There is evidence
d.f. = 8-2 = 6
of a linear
relationship at the
a/2=.025 a/2=.025
5% level of
significance
Reject H0 Do not reject H0 Reject H0
-tα/2 0
tα/2
-2.4469 2.4469
4.68
Regression Analysis
Data: House Prices and Square feet
House Price in $1000s Square Feet
(y) (x)
245 1400
312 1600
279 1700
308 1875
199 1100
219 1550
405 2350
324 2450
319 1425
255 1700
Population Linear Regression
(continued)

y y β0  β1x  ε
Observed Value
of y for xi

εi Slope = β1
Predicted Value Random Error for
of y for xi
this x value

Intercept = β0

xi x
Estimated Regression Model
The sample regression line provides an estimate of the
population regression line

Estimated (or Estimate of the Estimate of the


predicted) y regression regression slope
value intercept

Independent

ŷ i b0  b1x variable

The individual random error terms ei have a mean of zero


The Least Squares Equation
• The formulas for b1 and b0 are:

b1 
 ( x  x )( y  y)
 (x  x) 2

algebraic
equivalent: and

 xy   x y
b1  n b0  y  b1 x
(
x  n
2  x ) 2
Inference about the Slope:
t Test
• t test for a population slope
• Is there a linear relationship between x and y?
• Null and alternative hypotheses
• H0: β1 = 0 (no linear relationship)
• H1: β1  0 (linear relationship does exist)
• Test statistic
where:

• b1 = Sample regression slope


coefficient
b1  β1
t β1 = Hypothesized slope


sb1 sb1 = Estimator of the standard
d.f. n  2 error of the slope
Inference about the Slope:
t Test
(continued)

House Price Estimated Regression Equation:


Square Feet
in $1000s
(x)
(y) house price 98.25  0.1098 ([Link].)
245 1400
312 1600
279 1700
308 1875
The slope of this model is 0.1098
199 1100 Does square footage of the house
219 1550 affect its sales price?
405 2350
324 2450
319 1425
255 1700
Inferences about the Slope:
t Test Example
Test Statistic: t = 3.329
b1 sb1 t
H0: β1 = 0 From Excel output:
Coefficient Standard P-
HA: β1  0 s Error t Stat value
1.6929 0.1289
Intercept 98.24833 58.03348 6 2
d.f. = 10-2 = 8 Square 3.3293 0.0103
Feet 0.10977 0.03297 8 9
a/2=.025 a/2=.025

Reject H0 Do not reject H0 Reject H


-tα/2 0
tα/2 0

-2.3060 2.3060 3.329


• Decision: Reject Ho

• Conclusion: There is sufficient evidence that square


footage affects house price
The Least Squares Equation
• The formulas for b1 and b0 are:

b1 
 ( x  x )( y  y)
 (x  x) 2

algebraic
equivalent: and

 xy   x y
b1  n b0  y  b1 x
(
x  n
2  x ) 2

You might also like