0

We are testing if a computer's performance increases after its OS update by comparing the performance of 10 different Programs before and after the update which results in:

  • Program: #1 #2 #3 #4 #5
  • before: 34 29 32 27 28
  • after: 32 34 36 27 28

now we should do a t-test by calculating t on our own and only the p-value using the qt-function in R. But how do I have to use the qt-function to get my p-value?

I calculated t and it is -0,6486 (t.test in R says -0.64854 so close enough) and df is 8

JinseiNagai
  • 351
  • 1
  • 2
  • 10
  • How about `qt(p = c(0.05, 0.95), df = 8)`? This gives you values corresponding to the 5% and 95% quantiles of the `t`-distribution, which you can then compare to your t-statistic. – coffeinjunky Sep 11 '17 at 14:36
  • 2
    You are calculating the p-value with `qt()`? Shouldn't it be `pt()`? – Alex Sep 11 '17 at 14:39
  • That will give the bounds of the rejection region for a two sided test at 10% level, @coffeinjunky. OP, did you mean `pt`? `2*pt(q = -0.64854, df = 8)` would give the p-value for a two sided test given a t statistic of -0.6485 and 8 degrees of freedom – svenhalvorson Sep 11 '17 at 14:39
  • @svenhalvorson y that would make sense but for some reason my prof wrote qt() on the exercise sheet..... – JinseiNagai Sep 11 '17 at 14:42
  • This seems to be some sort of homework, and the goal appears to be a `t`-test. You do not need the `p`-value of the `t`-statistic to do a t-test. A `t`-test is a reject-do not reject decision rule, for which you need the boundaries for any given levels of alpha. These you can get with `qt`. – coffeinjunky Sep 11 '17 at 14:43
  • @coffeinjunky can you give me an example how it would look like? – JinseiNagai Sep 11 '17 at 14:44
  • Look at my first comment, which, as @svenhalvorson correctly pointed out, corresponds to the boundaries for a two-sided test at 10%. You probably don't want to do a two-sided test, and your prof will probably have a preference for alpha (5%, 10%?). But in the two-sided 10% alpha case, if your t-statistic were either smaller or larger than the boundaries, you would reject the null of no difference. My advice would be to first really understand what is going on when you do a hypothesis test. The computation is then quite easy. – coffeinjunky Sep 11 '17 at 14:48
  • @coffeinjunky sorry i just realised that in the exercise it was not about the increasement of the performance but the change in performance so the t-test is supposed to be a two-sided test with alpha = 5% – JinseiNagai Sep 11 '17 at 14:54
  • Well, do you know which quantiles of the t-distribution to use with alpha = 5%? Then you can adjust my code above and carry out the t-test. If not, please make sure you understand the concepts properly. These things are really fundamental. – coffeinjunky Sep 11 '17 at 14:58

0 Answers0