This randomization test does not provide significant evidence that the sexes differ with regard to pulse. 120/252 (p=0.4762) randomization yields a difference in sample means as far from zero as the original sample mean difference.
p<-120/252;p
## [1] 0.4761905
Ho: mu(heart disease) = mu(control); There is no difference in serotonin levels between those with heart disease and those without heart disease. Ha: mu(heart disease) != mu(control); There is a signifcant difference in serotonin levels between those with heart disease and those without heart disease.
Are we supposed to be able to infer hypotheses tests from table without text. I am assuming ng/gm is nangrams/gram and is blood concentration of serotonin in these two populations (one with heart disease and one without.) *** ## Use your graphing calculator or R code to report the t-test statistic and p-value of this t-test. CI for Y(hd)-Y(c): (-2237.334, -702.666) with a p value = 0.00127
n_hd<-8
n_c<-12
y_hd<-3840
y_c<-5310
s_hd<-850
s_c<-640
library(BSDA)
## Loading required package: lattice
##
## Attaching package: 'BSDA'
## The following object is masked from 'package:datasets':
##
## Orange
tsum.test(y_hd, s_hd, n_hd, y_c, s_c, n_c)
##
## Welch Modified Two-Sample t-Test
##
## data: Summarized x and y
## t = -4.167, df = 12.184, p-value = 0.001265
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -2237.3341 -702.6659
## sample estimates:
## mean of x mean of y
## 3840 5310
This 95% CI does not contain zero. We reject the null hypothesis, and state that there is significant evidence (p value= 0.00127 <.01) that the two populations are significatnly different. We are 95% confident that those with heart disease have 2237.334 to 702.666 (NG/MG) less Serotonin than those without heart disease. ## What does a type I error mean in the context of the problem? Type I error would mean that we rejected the true null hypothesis that these two populations are not different, and that serotonin concentration (NG/GM) is the same in both populations. ## hat assumptions should be made about the conditions for this test to be appropriate? Observations are from randomly collected samples. Populations are large relative to sample size. Obeservations and samplesare independent of eachother. Sampling distributions are aproximately normal.
effect_size<-(y_c-y_hd)/s_hd;effect_size
## [1] 1.729412
The effect size is 1.729, which means that there is 1.729 standard deviations separarting the overlap of the two distributions, so the difference is important. ## Why might you want to use a Wilcoxon-Mann-Whitney test rather than a t-test? Looking at the histograms of both datasets, the data appears to not reflect a normal distribution. This is likely a result of the smalls ample sizes (n=8) . A Wilcoxon-Mann-Whitney test is used in this instance because it is a nonparametric test, not dependent on the mean (or some measure of center which is pretty unrepresentative in data with skews, outliers, non-normal distributions). Again, it does not focus on a parameter of either group, but rather the difference of all data points between each group.
experimental <- c(5.32, 5.60, 5.74, 6.06, 6.32, 6.34, 6.79, 7.18)
control <- c(4.50, 4.78, 4.79, 4.86, 5.41, 5.70, 6.08, 6.21)
hist(experimental)
hist(control)
wilcox.test(experimental, control, alternative = "two.sided", conf.int = TRUE, conf.level=0.90)
##
## Wilcoxon rank sum test
##
## data: experimental and control
## W = 53, p-value = 0.02813
## alternative hypothesis: true location shift is not equal to 0
## 90 percent confidence interval:
## 0.24 1.53
## sample estimates:
## difference in location
## 0.895
We would reject the null (p-value =0.02813<0.05), there is significant evidence that the population distribution of the experimental group is shifted from the population distribution of the control group. ## Interpret the 90% confidence interval in context of the problem. We are 90% confident (p-value =0.02813), the population distribution of the experimental group is shifted from the population distribution of the control group. The CI (0.24,1.53) does not contain zero, we would state the experimental group is significantly different than the control group.