In: Statistics and Probability
Using a real-world data set that interests you, conduct one of the tests you learned this week (or fit a linear regression model). Make sure to document all steps in the hypothesis testing process, including stating your hypotheses, your code, your output and your findings along with interpretation. You may use data from the MASS library if you wish, or load external data
Please type all answer.
SOLUTION:-
GIVEN THAT
Data from the MASS library if you wish, or load external data
A real word data set of a least weights of 27 domestic eats is obtained by the a portion of eat' M denoted from R let were the least weights are given in grams.
Let we want perform one sample mean t-test for the true population means the mean least weights of the domestic eats in their entire population suppose one element claims that the least weights of eat's is equal to 8 grams the test this we construct our null and alternative hypotheses are ;
H0 ; = 8 vs Ha ; 8
Where is the true population mean
For performing this test we take a test-statistics
T = (x - o)/ / ( / n) Ho that
we reject Ho iff tobs > t/2 ; n-1
there tobs = 2.95533 t/2 ; n-1 = 2.065529
where = 0.05
there fore tobs > t/2 ; n-1 we reject the Ho & concluded on the basis of the considered sample at 5% level of significance that the true population mean is statistically, significantly and different from 8.
The calculations are obtained using R- code output is below
R - Code
> X=c (6.5,6.5,10.1,7.2,7.6, 7.9, 8.5, 5, 9.1,9.6,9.6,10.7,9.
> n = length (x)
> n [1] 27
> muo = 8
> xbar = mean (x)
> xbar
> s = sd (x)
> t = (xbar-muo) / (s/sqrt (n))
> t
>qt (0.975, (n-1))
>!
OUTPUT
R Console
> X=c (6.5,6.5,10.1,7.2,7.6, 7.9, 8.5, 5, 9.1,9.6,9.6,10.7,9.
> n = length (x)
> n [1] 27
> muo = 8
> xbar = mean (x)
> xbar
[1] 8.896296
> s = sd (x)
> t = (xbar-muo) / (s/sqrt (n))
> t
[1] 2.95533
>qt (0.975, (n-1))
[1] 2.055529
>!