A Primer in Biological Data Analysis and Visualization Using R by Gregg Hartvigsen

A Primer in Biological Data Analysis and Visualization Using R by Gregg Hartvigsen

Author:Gregg Hartvigsen
Language: eng
Format: epub, pdf
Tags: SCI008000, Science/Life Sciences/Biology/General, MAT041000, Mathematics/Numerical Analysis
Publisher: Columbia University Press
Published: 2014-02-24T16:00:00+00:00


Sample is not normally distributed

This is the same question as above but your friends, refreshingly, are not “normal.”

> friends = c(1340, 1540, 1310, 1270, 1340, 1300, 1330, 1540,

+ 1540, 1320)

> you = 1300

> shapiro.test(friends)

Shapiro-Wilk normality test

data: friends

W = 0.7477, p-value = 0.003344

From this we see that the sample is not normally distributed (p ≤ 0.05). Therefore, we should use the non-parametric Wilcoxon test. Here we’re asking the simple question as to whether the sample of friends have SAT scores that differ from your score.

> wilcox.test(friends, mu = you) # mu tested against the sample

Wilcoxon signed rank test with continuity correction

data: friends

V = 41.5, p-value = 0.02757

alternative hypothesis: true location is not equal to 1300

We conclude that your SAT score is statistically lower than the sample (V = 41.5, df = 9, p = 0.028).



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.