In: Statistics and Probability
Using the data we collected in class about weight and height, find the following:
weight = c(130, 220, 180, 170, 135, 120, 200, 208, 210, 180, 110)
height = c(5,6,6.2,7.8,5.5,5.3,5.5,6.2,5.8,6.8,4.9)
a. Using height as the dependent variable and weight as the independent test if height is positively correlated with weight. What is the null hypothesis and the alternative hypothesis?
b. Provide the p-value.
c. Conclude this analysis, is this test statistically significant, justify your answer?
d. Provide your R coding
a. Using height as the dependent variable and weight as the independent test if height is positively correlated with weight.
What is the null hypothesis and the alternative hypothesis?
Here we want to test that correlation between height and weight is positive.
Ho:- ϸ = 0 vs Ha:- ϸ > 0.
b.
> weight = c(130, 220, 180, 170, 135, 120, 200, 208, 210,
180, 110)
> height = c(5,6,6.2,7.8,5.5,5.3,5.5,6.2,5.8,6.8,4.9)
> cor.test(weight, height,alternative = "greater")
Pearson's product-moment correlation
data: weight and height
t = 1.5471, df = 9, p-value = 0.07812
alternative hypothesis: true correlation is greater than 0
95 percent confidence interval:
-0.08611759 1.00000000
sample estimates:
cor
0.4583434
P-value = 0.07812
C.
Reject Ho if P-value < alpha= 0.05
Here P-value = 0.07812 > 0.05
Here we fail to reject Ho at 5% l.o.s.
So we can say that data not provide sufficient evidence to support claim that height is positively correlated with weight.
D.
>weight = c(130, 220, 180, 170, 135, 120, 200, 208, 210, 180,
110)
>height = c(5,6,6.2,7.8,5.5,5.3,5.5,6.2,5.8,6.8,4.9)
>cor.test(weight, height,alternative = "greater")