Kindly answer the following question by using Rstudio.
At Mayo Clinic evaluated the link between obesity and energy spent on daily activities by attaching sensors to two groups (Slim and Overweight) and monitored energy spent on different activities (stand/walk, sit, lie).
A.1 Plot the data using a dotplot and comment on anything you notice relative to the analysis for the sitting variable.
A.2 For sitting, test the hypothesis that there is no difference between the slim and Overweight groups. Summspecifyingspecifing null and alternative hypotheses, test statistic, degrees of freedom, p-value and conclusion.
Group | Subject | Stand/walk | Sit | Lie |
Overweight | 11 | 260.244 | 646.281 | 521.044 |
Overweight | 12 | 464.756 | 456.644 | 514.931 |
Overweight | 13 | 367.138 | 578.662 | 563.3 |
Overweight | 14 | 413.667 | 463.333 | 532.208 |
Overweight | 15 | 347.375 | 567.556 | 504.931 |
Overweight | 16 | 416.531 | 567.556 | 448.856 |
Overweight | 17 | 358.650 | 621.262 | 460.55 |
Overweight | 18 | 267.344 | 646.181 | 509.981 |
Overweight | 19 | 410.631 | 572.769 | 448.706 |
Overweight | 20 | 426.356 | 591.369 | 412.919 |
slim | 1 | 511.100 | 370.300 | 555.5 |
slim | 2 | 607.925 | 374.512 | 450.65 |
slim | 3 | 319.212 | 582.138 | 537.362 |
slim | 4 | 584.644 | 357.144 | 489.269 |
slim | 5 | 578.869 | 348.994 | 514.081 |
slim | 6 | 543.388 | 385.312 | 506.5 |
slim | 7 | 677.188 | 268.188 | 467.7 |
slim | 8 | 555.656 | 322.219 | 567.006 |
slim | 9 | 374.831 | 537.031 | 531.431 |
slim | 10 | 504.700 | 528.838 | 396.962 |
A1. I created two variables as "sitting.ow" for sitting column for overweight group and "sitting.slim" for slim group
I combined both variables as another variable "x" and run the dotchart function to get the plot of the data
the R code is as follows,
sitting.ow=c(646.281,456.644,578.662,463.333,567.556,567.556,621.262,646.181,572.769,591.369)
sitting.slim=c(370.300,374.152,582.138,357.144,348.994,385.312,268.188,322.219,537.031,528.838)
x=c(sitting.ow,sitting.slim)
dotchart(x)
the output is given by,
from the above plot we can observe that the values of group slim, 7 out of 10 are scattered below 400 and the values of group overweight , 9 out of 10 are scattered above 500.
from this we can say that the group "overweight" spent more energy than the group "slim".
A2.
the null hypothesis will be,
H0: there is no significant difference between the two groups.
H1: there is a significant difference between two groups.
The test statistic of t-test for two independent samples is given by,
t=(x1- x2)/ : where x1 and x2 are
the means of the two variables,
n1 and n2 are sizes of x1 and x2 respectively
and
are the standard
deviations of x1 and x2 respectively
the test statistic follows t distribution with (n1+n2 - 2) degrees of freedom.
the R code and the result of the test is given as follows ,
> t.test(sitting.ow,sitting.slim,paired=FALSE)
Welch Two Sample t-test
data: sitting.ow and sitting.slim
t = 4.202, df = 15.203, p-value = 0.000749
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
80.77473 246.68467
sample estimates:
mean of x mean of y
571.1613 407.4316
CONCLUSION: since the p-value (0.000749) is less than
0.05 , we may reject the null hypothesis and conclude that there is
a significant difference between the means of the two groups (i.e.,
overweight and slim)
Kindly answer the following question by using Rstudio. At Mayo Clinic evaluated the link between obesity...
People gain weight when they take in more energy from food than they expend. Some researchers wanted to investigate the link between obesity and energy spent on daily activity. Choose 20 healthy volunteers who don't exercise. Deliberately choose 10 who are lean and 10 who are mildly obese but still healthy. Attach sensors that monitor the subjects' every move for 10 days. The table below presents data on the time (in minutes per day) that the subjects spent standing or...