Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 4a)
- T-Test, wichtig: unpaired Variante in R
- treatmentA <- subset(dataEx9Q4, treatment == "A")
- treatmentB <- subset(dataEx9Q4, treatment == "B")
- treatmentA <- treatmentA$time
- treatmentB <- treatmentB$time
- t.test(treatmentA, treatmentB, alternative = "two.sided", var.equal = FALSE)
- Resultat:
- Welch Two Sample t-test
- data: treatmentA and treatmentB
- t = -2.3304, df = 7.9776, p-value = 0.04822
- alternative hypothesis: true difference in means is not equal to 0
- 95 percent confidence interval:
- -23.4823931 -0.1176069
- sample estimates:
- mean of x mean of y
- 14.2 26.0
- point estimate for difference in means: 26-14.2=11.8
- value of the t-statistic: t = -2.3304
- p-value: 0.04822
- decision - differences are significant, discard H0 etc....
- 4b)
- siehe https://www.investopedia.com/ask/answers/073115/what-assumptions-are-made-when-conducting-ttest.asp
- das wichtiste ist wohl, das wir bei n=5 für A und n=5 für B nicht auf Noramlität schließen können,
- sprich der ganze Test ist umsonst. Es gibt außerdem wenn man danach googelt noch viele Hinweise, warum T-Test für
- Clinical Trials Unsinn sind. Wie auch immer, die Resultate sind irrelevant.
- evtl qqnorm plot für treamentA und B, aber bei n=5 bringt das wenig
- 4c)
- auch Mann-Whitney U-Test genannt...
- kann man auch mit https://www.socscistatistics.com/tests/mannwhitney/default2.aspx ausrechnen
- in R:
- wilcox.test(treatmentA, treatmentB, alternative = "two.sided")
- Resultat:
- data: treatmentA and treatmentB
- W = 4, p-value = 0.09524
- alternative hypothesis: true location shift is not equal to 0
- wichtig ist wohl, dass man die Nullhypthese definiert - die nullhypothese bezieht sich nicht auf den mittelwert-unterschied
- wie beim t-test
- https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test
- ist nicht einfach zu beschreiben...
- p-value = 0.09524
- Interpret the result in the context of the clinical trial?
- H0 beibehalten, die Resultate sind nicht signifikant
- 4d)
- Siehe auch Wikipedia, was unter Robustness, Efficiency steht. Dem Wilcoxon Test kann man sicher mehr trauen hier, weil
- der T-test eben Unsinn ist.
- Power of the tests relative to each other
- Efficiency
- When normality holds, the Mann–Whitney U test has an (asymptotic) efficiency of 3/π or about 0.95 when compared to the t-test.[18] For distributions sufficiently far from normal and for sufficiently large sample sizes, the Mann–Whitney U test is considerably more efficient than the t.[19] This comparison in efficiency, however, should be interpreted with caution, as Mann-Whitney and the t-test do not test the same quantities. If, for example, a difference of group means is of primary interest, Mann-Whitney is not an appropriate test.[20]
- sprich wenn n größer wäre, Normalität da ist, hat der t-test eine größere Power
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement