Hypothesis Testing:
Correlation
MATH 314 – Statistical Theory
Mr. John Laurence U. Candido
Correlation
❑ Used to measure the degree of relationship between
two variables
❑ Examples:
1. Number of hours studying & final grade
2. Student’s grade in Math and English
3. Hours of playing mobile games & grade in STS-301
❑ Two-tailed critical values are used
❑ Both variables must come from normally distributed
populations
Correlation
Example 1:
The owner of a chain of fruit shake store would like to study
the correlation between atmospheric temperature and sales during
summer season. A random sample of 6 days is selected with the
result given as follows: use α = 0.05.
Day Temp (F) Sales (units)
1 79 147
2 76 143
3 78 147
4 84 168
5 90 206
6 83 155
Correlation
Solution:
𝑁 σ 𝑥𝑦−(σ 𝑥)(σ 𝑦)
Pearson r =
(𝑁(σ 𝑥 2 )−(σ 𝑥)2 )(𝑁(σ 𝑦 2 )−(σ 𝑦)2 )
Day Temp (F) (x) Sales (units) (y) 𝒙𝟐 𝒚𝟐 𝒙𝒚
1 79 147 6241 21609 11613
2 76 143 5776 20449 10868
3 78 147 6084 21609 11466
4 84 168 7056 28224 14112
5 90 206 8100 42436 18540
6 83 155 6889 24025 12865
Σ𝑥 = 490 Σ𝑦 = 966 Σ𝑥 2 = 40146 Σ𝑦 2 = 158352 Σ𝑥𝑦 = 79464
Correlation
Solution:
𝑁 σ 𝑥𝑦−(σ 𝑥)(σ 𝑦)
Pearson r =
(𝑁(σ 𝑥 2 )−(σ 𝑥)2 )(𝑁(σ 𝑦 2 )−(σ 𝑦)2 )
6 79464 −(490)(966)
r=
(6 40146 −(490)2 )(6 158352 −(966)2 )
r = 0.95
Correlation
Solution:
1. 𝐻0 : r = 0 (There is no correlation between atmospheric
temperature and total sales of fruit shake.)
𝐻𝑎 : r ≠ 0 (There is a correlation between atmospheric
temperature and total sales of fruit shake.)
2. 𝛼 = 0.05, two tailed test
𝑁 σ 𝑥𝑦−(σ 𝑥)(σ 𝑦)
3. Pearson r = 2 2 2 2
, 𝑟0.05/2(𝑛−2=4) = 0.811
(𝑁(σ 𝑥 )−(σ 𝑥) )(𝑁(σ 𝑦 )−(σ 𝑦) )
4. Reject 𝐻𝑜 , if |r| > 𝑟𝛼 . Otherwise, we fail to reject the null
hypothesis.
Correlation
Solution:
5. 𝑟 = 0.9494
6. Since |r| = 0.9494 > 𝑟𝛼 = 0.811, reject the null hypothesis in
favor of the alternative hypothesis.
7. Thus, we conclude that there is a correlation between
atmospheric temperature and total sales of fruit shake.
Correlation
State the Conclusion.
Answer the following question:
1. Is there a relationship between the two variable being tested?
2. What degree is the relationship or correlation?
1. There is a significant
relationship between
atmospheric temperature
and total sales of fruit shake.
2. The correlation is a very
high positive correlation.
Correlation
Try this!:
As researcher wants to study the correlation between
number of cars a company have and the company’s annual revenue.
A random sample of 6 company is selected with the result given as
follows: use α = 0.05.
Company Cars (in 10, 000) Revenue (in Billions)
A 63.0 7.0
B 29.0 3.9
C 20.8 2.1
D 19.1 2.8
E 13.4 1.4
F 8.5 1.5
THANK YOU VERY MUCH!
KEEP SAFE!
GOD BLESS!