Using R please :) Inference 1. Consider a sample of nine 30-day-old, protein-def
ID: 3306229 • Letter: U
Question
Using R please :)
Inference 1. Consider a sample of nine 30-day-old, protein-deficient infants that were given a motor skills test. The mean for a normal population is 60. The data are Y1 = 40,69,75,42,38,47,37,52,31 Using (a) Find a 90% confidence interval for the mean of the protein-deficient population. Report your result in APA format. (b) Is the mean score of the protein-deficient children significantly below that of a normal population? Assume.05 level of significance. Report your result in APA format (c) After 3 months of a normal diet the scores of the nine children are Ys = 48,68,77,46,47,46,41,51,34 Estimate the mean of the population after 3 months of a normal diet. Calculate the 90% CI and test whether this sample mean is below the population value of 60. Assume.05 level of significance. Report your result in APA format (d) Test whether there has been an improvement from the first test to the second. Assume .05 level of significance. Report your result in APA format (e) Estimate Cohen's d for the comparison of the Y1and Y2 means. Report your result in APA format (f) What assumptions have you made to construct the confidence interval in (a) and test the hypothesis in (b)? Do they hold for these data? Justify your answer If the assumptions are not satisfied, redo (b) using a nonparametric test. How do the conclusions of nonparametric test compare to result of (b)?Explanation / Answer
a)
> Y1=c(40,69,74,42,38,47,37,52,31)
> mean(Y1)
[1] 47.77778
> n = length(Y1)
> s = sd(Y1) # sample standard deviation
> SE = s/sqrt(n); SE
[1] 4.920981
>
> E = qt(p=0.90, 7)*SE; E # margin of error
[1] 6.962813
>
> xbar = mean(Y1) # sample mean
> xbar
[1] 47.77778
> Lower_limit=xbar-E
> Upper_lomit=xbar+E
> Lower_limit
[1] 40.81496
> Upper_lomit
[1] 54.74059
The 90% confidence interval of mean score of the protein-deficient is (40.8142, 54.7406). hence, the true population mean is fall within this interval with 90% confidence.
b) Ans:
> ## b)
> t.test(Y1, alternative = c( "less"), mu = 60)
One Sample t-test
data: Y1
t = -2.4837, df = 8, p-value = 0.01895
alternative hypothesis: true mean is less than 60
95 percent confidence interval:
-Inf 56.92858
sample estimates:
mean of x
47.77778
Comment: The estimated p-value is 0.012. Hence, we can conclude that the mean score of the protein deficient is less than 60 at 0.05 level of significance.
c) Ans:
> # c)
> Y2=c(48,68,77,46,47,46,41,51,34)
>
>
> ## 90% CI
> n2 = length(Y2)
> s2 = sd(Y2) # sample standard deviation
> SE2 = s2/sqrt(n2); SE2
[1] 4.454849
>
> E2 = qt(p=0.90, 7)*SE; E # margin of error
[1] 6.962813
>
>
> xbar2 = mean(Y2) # sample mean
> xbar2
[1] 50.88889
> Lower_limit2=xbar2-E2
> Upper_lomit2=xbar2+E2
> Lower_limit2
[1] 43.92608
> Upper_lomit2
[1] 57.8517
Comment: The population mean score of the protein deficient after 3 month is leis between (43.92608, 57.8517) with 90% confidence.
## Test at 0.05 level of significance.
> t.test(Y2, alternative = c( "less"), mu = 60)
One Sample t-test
data: Y2
t = -2.0452, df = 8, p-value = 0.03753
alternative hypothesis: true mean is less than 60
95 percent confidence interval:
-Inf 59.17289
sample estimates:
mean of x
50.88889
Comment: The estimated p-value is 0.03753=0.04. Hence, we can conclude that the mean score of the protein deficient is less than 60 at 0.05 level of significance for this 3-month-old children.
d) Ans:
> ## d)
> t.test(Y1,Y2, alternative = c( "less"), mu = 60)
Welch Two Sample t-test
data: Y1 and Y2
t = -9.5077, df = 15.844, p-value = 3.007e-08
alternative hypothesis: true difference in means is less than 60
95 percent confidence interval:
-Inf 8.484888
sample estimates:
mean of x mean of y
47.77778 50.88889
Ans: The estimated p-value is 3.007e-08. Hence, we can conclude that there is the improvement at 0.05 level of significance.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.