0% found this document useful (0 votes)
97 views

1ststeps in Hyphothesis Testing

Uploaded by

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

1ststeps in Hyphothesis Testing

Uploaded by

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

Steps in Hypothesis Testing

Author(s)

David M. Lane

Prerequisites

Introduction to Hypothesis Testing, Statistical Significance, Type I and II Errors

Learning Objectives

1. Be able to state the null hypothesis for both one-tailed and two-tailed tests
2. Differentiate between a significance level and a probability level
3. State the four steps involved in significance testing

Laerd Statistics LoginCookies & Privacy


Take the Tour Plans & Pricing SIGN UP

The first step is to specify the null hypothesis. For a two-tailed test, the null hypothesis is
typically that a parameter equals zero although there are exceptions. A typical null hypothesis
is μ1 - μ2 = 0 which is equivalent to μ1 = μ2. For a one-tailed test, the null hypothesis is either
that a parameter is greater than or equal to zero or that a parameter is less than or equal to
zero. If the prediction is that μ1 is larger than μ2, then the null hypothesis (the reverse of the
prediction) is μ2 - μ1 ≥ 0. This is equivalent to μ1 ≤ μ2.

1. The second step is to specify the α level which is also known as the significance level.
Typical values are 0.05 and 0.01.

2. The third step is to compute the probability value (also known as the p value). This is the
probability of obtaining a sample statistic as different or more different from the
parameter specified in the null hypothesis given that the null hypothesis is true.

3. Finally, compare the probability value with the α level. If the probability value is lower
then you reject the null hypothesis. Keep in mind that rejecting the null hypothesis is not
an all-or-none decision. The lower the probability value, the more confidence you can
have that the null hypothesis is false. However, if your probability value is higher than
the conventional α level of 0.05, most scientists will consider your findings inconclusive.
Failure to reject the null hypothesis does not constitute support for the null hypothesis. It
just means you do not have sufficiently strong data to reject it.
Pearson Product-Moment Correlation
What does this test do?
The Pearson product-moment correlation coefficient (or Pearson correlation coefficient, for
short) is a measure of the strength of a linear association between two variables and is denoted
by r. Basically, a Pearson product-moment correlation attempts to draw a line of best fit through
the data of two variables, and the Pearson correlation coefficient, r, indicates how far away all
these data points are to this line of best fit (how well the data points fit this new model/line of
best fit).

What values can the Pearson correlation coefficient take?


The Pearson correlation coefficient, r, can take a range of values from +1 to -1. A value of 0
indicates that there is no association between the two variables. A value greater than 0 indicates a
positive association; that is, as the value of one variable increases, so does the value of the other
variable. A value less than 0 indicates a negative association; that is, as the value of one variable
increases, the value of the other variable decreases. This is shown in the diagram below (click the
image to enlarge):
How can we determine the strength of association based on
the Pearson correlation coefficient?
The stronger the association of the two variables, the closer the Pearson correlation coefficient, r,
will be to either +1 or -1 depending on whether the relationship is positive or negative,
respectively. Achieving a value of +1 or -1 means that all your data points are included on the
line of best fit - there are no data points that show any variation away from this line. Values for r
between +1 and -1 (for example, r = 0.8 or -0.4) indicate that there is variation around the line of
best fit. The closer the value of r to 0 the greater the variation around the line of best fit.
Different relationships and their correlation coefficients are shown in the diagram below (click
the image to enlarge):
Join the 1,000s of students, academics and professionals who rely on
Laerd Statistics. TAKE THE TOUR PLANS & PRICING

Are there guidelines to interpreting Pearson's correlation


coefficient?
Yes, the following guidelines have been proposed:

  Coefficient, r
Strength of Association Positive Negative
Small .1 to .3 -0.1 to -0.3
Medium .3 to .5 -0.3 to -0.5
Large .5 to 1.0 -0.5 to -1.0

Remember that these values are guidelines and whether an association is strong or not will also
depend on what you are measuring.

Can you use any type of variable for Pearson's correlation


coefficient?
No, the two variables have to be measured on either an interval or ratio scale. However, both
variables do not need to be measured on the same scale (e.g., one variable can be ratio and one
can be interval). Further information about types of variable can be found in our Types of
Variable guide. If you have ordinal data, you will want to use Spearman's rank-order correlation
or a Kendall's Tau Correlation instead of the Pearson product-moment correlation.

Do the two variables have to be measured in the same units?


No, the two variables can be measured in entirely different units. For example, you could
correlate a person's age with their blood sugar levels. Here, the units are completely different;
age is measured in years and blood sugar level measured in mmol/L (a measure of
concentration). Indeed, the calculations for Pearson's correlation coefficient were designed such
that the units of measurement do not affect the calculation. This allows the correlation coefficient
to be comparable and not influenced by the units of the variables used.

What about dependent and independent variables?


The Pearson product-moment correlation does not take into consideration whether a variable has
been classified as a dependent or independent variable. It treats all variables equally. For
example, you might want to find out whether basketball performance is correlated to a person's
height. You might, therefore, plot a graph of performance against height and calculate the
Pearson correlation coefficient. Lets say, for example, that r = .67. That is, as height increases so
does basketball performance. This makes sense. However, if we plotted the variables the other
way around and wanted to determine whether a person's height was determined by their
basketball performance (which makes no sense), we would still get r = .67. This is because the
Pearson correlation coefficient makes no account of any theory behind why you chose the two
variables to compare. This is illustrated below:

Does the Pearson correlation coefficient indicate the slope of


the line?
It is important to realise that the Pearson correlation coefficient, r, does not represent the slope of
the line of best fit. Therefore, if you get a Pearson correlation coefficient of +1 this does not
mean that for every unit increase in one variable there is a unit increase in another. It simply
means that there is no variation between the data points and the line of best fit. This is illustrated
below:
TAKE THE TOUR

PLANS & PRICING

What assumptions does Pearson's correlation make?


There are four assumptions that are made with respect to Pearson's correlation:

1. The variables must be either interval or ratio measurements (see our Types of Variable
guide for further details).
2. The variables must be approximately normally distributed (see our Testing for Normality
guide for further details).
3. There is a linear relationship between the two variables. We discuss this later in this
guide (jump to this section here).
4. Outliers are either kept to a minimum or are removed entirely. We also discuss this later
in this guide (jump to this section here).
5. There is homoscedasticity of the data. This is discussed later in this guide (jump to this
section here).

How can you detect a linear relationship?


To test to see whether your two variables form a linear relationship you simply need to plot them
on a graph (a scatterplot, for example) and visually inspect the graph's shape. In the diagram
below (click image to enlarge), you will find a few different examples of a linear relationship
and some non-linear relationships. It is not appropriate to analyse a non-linear relationship using
a Pearson product-moment correlation.
Go to the next page for more.

12
next »
Home About Us Contact Us Terms & Conditions Privacy & Cookies © 2013 Lund Research Ltd

The first step is to specify the null hypothesis. For a two-tailed test, the null hypothesis is
typically that a parameter equals zero although there are exceptions. A typical null hypothesis
is μ1 - μ2 = 0 which is equivalent to μ1 = μ2. For a one-tailed test, the null hypothesis is either
that a parameter is greater than or equal to zero or that a parameter is less than or equal to
zero. If the prediction is that μ1 is larger than μ2, then the null hypothesis (the reverse of the
prediction) is μ2 - μ1 ≥ 0. This is equivalent to μ1 ≤ μ2.

4. The second step is to specify the α level which is also known as the significance level.
Typical values are 0.05 and 0.01.

5. The third step is to compute the probability value (also known as the p value). This is the
probability of obtaining a sample statistic as different or more different from the
parameter specified in the null hypothesis given that the null hypothesis is true.

6. Finally, compare the probability value with the α level. If the probability value is lower
then you reject the null hypothesis. Keep in mind that rejecting the null hypothesis is not
an all-or-none decision. The lower the probability value, the more confidence you can
have that the null hypothesis is false. However, if your probability value is higher than
the conventional α level of 0.05, most scientists will consider your findings inconclusive.
Failure to reject the null hypothesis does not constitute support for the null hypothesis. It
just means you do not have sufficiently strong data to reject it.

Laerd Statistics LoginCookies & Privacy


Take the Tour Plans & Pricing SIGN UP

Pearson Product-Moment Correlation


What does this test do?
The Pearson product-moment correlation coefficient (or Pearson correlation coefficient, for
short) is a measure of the strength of a linear association between two variables and is denoted
by r. Basically, a Pearson product-moment correlation attempts to draw a line of best fit through
the data of two variables, and the Pearson correlation coefficient, r, indicates how far away all
these data points are to this line of best fit (how well the data points fit this new model/line of
best fit).

What values can the Pearson correlation coefficient take?


The Pearson correlation coefficient, r, can take a range of values from +1 to -1. A value of 0
indicates that there is no association between the two variables. A value greater than 0 indicates a
positive association; that is, as the value of one variable increases, so does the value of the other
variable. A value less than 0 indicates a negative association; that is, as the value of one variable
increases, the value of the other variable decreases. This is shown in the diagram below (click the
image to enlarge):

How can we determine the strength of association based on


the Pearson correlation coefficient?
The stronger the association of the two variables, the closer the Pearson correlation coefficient, r,
will be to either +1 or -1 depending on whether the relationship is positive or negative,
respectively. Achieving a value of +1 or -1 means that all your data points are included on the
line of best fit - there are no data points that show any variation away from this line. Values for r
between +1 and -1 (for example, r = 0.8 or -0.4) indicate that there is variation around the line of
best fit. The closer the value of r to 0 the greater the variation around the line of best fit.
Different relationships and their correlation coefficients are shown in the diagram below (click
the image to enlarge):
Join the 1,000s of students, academics and professionals who rely on
Laerd Statistics. TAKE THE TOUR PLANS & PRICING

Are there guidelines to interpreting Pearson's correlation


coefficient?
Yes, the following guidelines have been proposed:

  Coefficient, r
Strength of Association Positive Negative
Small .1 to .3 -0.1 to -0.3
Medium .3 to .5 -0.3 to -0.5
Large .5 to 1.0 -0.5 to -1.0

Remember that these values are guidelines and whether an association is strong or not will also
depend on what you are measuring.

Can you use any type of variable for Pearson's correlation


coefficient?
No, the two variables have to be measured on either an interval or ratio scale. However, both
variables do not need to be measured on the same scale (e.g., one variable can be ratio and one
can be interval). Further information about types of variable can be found in our Types of
Variable guide. If you have ordinal data, you will want to use Spearman's rank-order correlation
or a Kendall's Tau Correlation instead of the Pearson product-moment correlation.

Do the two variables have to be measured in the same units?


No, the two variables can be measured in entirely different units. For example, you could
correlate a person's age with their blood sugar levels. Here, the units are completely different;
age is measured in years and blood sugar level measured in mmol/L (a measure of
concentration). Indeed, the calculations for Pearson's correlation coefficient were designed such
that the units of measurement do not affect the calculation. This allows the correlation coefficient
to be comparable and not influenced by the units of the variables used.

What about dependent and independent variables?


The Pearson product-moment correlation does not take into consideration whether a variable has
been classified as a dependent or independent variable. It treats all variables equally. For
example, you might want to find out whether basketball performance is correlated to a person's
height. You might, therefore, plot a graph of performance against height and calculate the
Pearson correlation coefficient. Lets say, for example, that r = .67. That is, as height increases so
does basketball performance. This makes sense. However, if we plotted the variables the other
way around and wanted to determine whether a person's height was determined by their
basketball performance (which makes no sense), we would still get r = .67. This is because the
Pearson correlation coefficient makes no account of any theory behind why you chose the two
variables to compare. This is illustrated below:
Does the Pearson correlation coefficient indicate the slope of
the line?
It is important to realise that the Pearson correlation coefficient, r, does not represent the slope of
the line of best fit. Therefore, if you get a Pearson correlation coefficient of +1 this does not
mean that for every unit increase in one variable there is a unit increase in another. It simply
means that there is no variation between the data points and the line of best fit. This is illustrated
below:

TAKE THE TOUR

PLANS & PRICING

What assumptions does Pearson's correlation make?


There are four assumptions that are made with respect to Pearson's correlation:

1. The variables must be either interval or ratio measurements (see our Types of Variable
guide for further details).
2. The variables must be approximately normally distributed (see our Testing for Normality
guide for further details).
3. There is a linear relationship between the two variables. We discuss this later in this
guide (jump to this section here).
4. Outliers are either kept to a minimum or are removed entirely. We also discuss this later
in this guide (jump to this section here).
5. There is homoscedasticity of the data. This is discussed later in this guide (jump to this
section here).

How can you detect a linear relationship?


To test to see whether your two variables form a linear relationship you simply need to plot them
on a graph (a scatterplot, for example) and visually inspect the graph's shape. In the diagram
below (click image to enlarge), you will find a few different examples of a linear relationship
and some non-linear relationships. It is not appropriate to analyse a non-linear relationship using
a Pearson product-moment correlation.

Go to the next page for more.

12
next »
Home About Us Contact Us Terms & Conditions Privacy & Cookies © 2013 Lund Research Ltd

Some Examples  of Statistical Analysis Using a t-Test

Example #1

A researcher wishes to learn if a certain drug slows the growth of tumors. She obtained mice
with tumors and randomly divided them into two groups. She then injected one group of mice
with the drug and used the second group as a control. After 2 weeks, she sacrificed the mice and
weighed the tumors. The weight of tumors for each group of mice is below.
The researcher is interested in learning if the drug reduces the growth of tumors. Her hypothesis
is: The mean weight of tumors from mice in group A will be less than the mean weight of mice
in group 2.

Group A Group B
    Treated with Drug    Control- Not Treated
0.72 0.71
0.68 0.83
0.69 0.89
0.66 0.57
0.57 0.68
0.66 0.74
0.70 0.75
0.63 0.67
0.71 0.80
0.73 0.78
  `      
Mean =   0.675  0.742

A t-test can be used to test the probability that the two means do not differ. The alternative is that
tumors from the group treated with the drug will not weigh less than tumors from the control
group.

This is a one-tailed test because the researcher is interested in if the drug decreased tumor size.
She is not interested in if the drug changed tumor size.

The values from the table above are entered into the spreadsheet as shown below.
The t-test shows that tumors from the drug group were significantly smaller than the tumors from
the control group because p < 0.05. The researcher therefore accepts her hypothesis that the drug
reduces the growth of tumors.

Example #2

A researcher wishes to learn whether the pH of soil affects seed germination of a particular herb
found in forests near her home. She filled 10 flower pots with acid soil (pH 5.5) and ten flower
pots with neutral soil (pH 7.0) and planted 100 seeds in each pot. The mean number of seeds that
germinated in each type of soil is below.

      Acid Soil      Neutral Soil


pH 5.5 pH 7.0
42 43
45 51
40 56
37 40
41 32
41 54
48 51
50 55
45 50
46 48
 
      
Mean
 43.5 48
=

The researcher is testing whether soil pH affects germination of the herb.

Her hypothesis is: The mean germination at pH 5.5 is different than the mean germination at pH
7.0.

A t-test can be used to test the probability that the two means do not differ. The alternative is that
the means differ; one of them is greater than the other. 

This is a two-tailed test because the researcher is interested in if soil acidity changes germination
percentage. She does not specify if it increases or decreases germination. Notice that a 2 is
entered for the number of tails below.
The t-test shows that the mean germination of the two groups does not differ significantly
because p > 0.05. The researcher concludes that pH does not affect germination of the herb.

Example #3

Suppose that a researcher wished to learn if a particular chemical is toxic to a certain species of
beetle. She believes that the chemical might interfere with the beetle’s reproduction. She
obtained beetles and divided them into two groups. She then fed one group of beetles with the
chemical and used the second group as a control. After 2 weeks, she counted the number of eggs
produced by each beetle in each group. The mean egg count for each group of beetles is below.

Group 1 Group 2
   fed chemical      not fed chemical (control)   
33 35
31 42
34 43
38 41
32
28
       
Mean
  32.7   40.3
=

The researcher believes that the chemical interferes with beetle reproduction. She suspects that
the chemical reduces egg production. Her hypothesis is: The mean number of eggs in group 1 is
less than the mean number of group 2.

A t-test can be used to test the probability that the two means do not differ. The alternative is that
the mean of group 1 is greater than the mean of group 2. 
This is a 1-tailed test because her hypothesis proposes that group B will have greater
reproduction than group 1. If she had proposed that the two groups would have different
reproduction but was not sure which group would be greater, then it would be a 2-tailed test.
Notice that a 1 is entered for the number of tails below.

The results of her t-test are copied below.

The researcher concludes that the mean of group 1 is significantly less than the mean for group 2
because the value of P < 0.05. She accepts her hypothesis that the chemical reduces egg
production because group 1 had significantly less eggs than the control.

You might also like