Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. 4a)
  2.  
  3. T-Test, wichtig: unpaired Variante in R
  4.  
  5. treatmentA <- subset(dataEx9Q4, treatment == "A")
  6. treatmentB <- subset(dataEx9Q4, treatment == "B")
  7. treatmentA <- treatmentA$time
  8. treatmentB <- treatmentB$time
  9. t.test(treatmentA, treatmentB, alternative = "two.sided", var.equal = FALSE)
  10.  
  11. Resultat:
  12. Welch Two Sample t-test
  13.  
  14. data: treatmentA and treatmentB
  15. t = -2.3304, df = 7.9776, p-value = 0.04822
  16. alternative hypothesis: true difference in means is not equal to 0
  17. 95 percent confidence interval:
  18. -23.4823931 -0.1176069
  19. sample estimates:
  20. mean of x mean of y
  21. 14.2 26.0
  22.  
  23. point estimate for difference in means: 26-14.2=11.8
  24. value of the t-statistic: t = -2.3304
  25. p-value: 0.04822
  26. decision - differences are significant, discard H0 etc....
  27.  
  28. 4b)
  29. siehe https://www.investopedia.com/ask/answers/073115/what-assumptions-are-made-when-conducting-ttest.asp
  30. 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,
  31. sprich der ganze Test ist umsonst. Es gibt außerdem wenn man danach googelt noch viele Hinweise, warum T-Test für
  32. Clinical Trials Unsinn sind. Wie auch immer, die Resultate sind irrelevant.
  33. evtl qqnorm plot für treamentA und B, aber bei n=5 bringt das wenig
  34.  
  35. 4c)
  36. auch Mann-Whitney U-Test genannt...
  37. kann man auch mit https://www.socscistatistics.com/tests/mannwhitney/default2.aspx ausrechnen
  38.  
  39. in R:
  40. wilcox.test(treatmentA, treatmentB, alternative = "two.sided")
  41. Resultat:
  42. data: treatmentA and treatmentB
  43. W = 4, p-value = 0.09524
  44. alternative hypothesis: true location shift is not equal to 0
  45.  
  46. wichtig ist wohl, dass man die Nullhypthese definiert - die nullhypothese bezieht sich nicht auf den mittelwert-unterschied
  47. wie beim t-test
  48. https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test
  49. ist nicht einfach zu beschreiben...
  50. p-value = 0.09524
  51. Interpret the result in the context of the clinical trial?
  52. H0 beibehalten, die Resultate sind nicht signifikant
  53.  
  54. 4d)
  55. Siehe auch Wikipedia, was unter Robustness, Efficiency steht. Dem Wilcoxon Test kann man sicher mehr trauen hier, weil
  56. der T-test eben Unsinn ist.
  57. Power of the tests relative to each other
  58. Efficiency
  59. 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]
  60. 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