An Example of a Paired-Difference t Test and Confidence Interval

Поділитися
Вставка
  • Опубліковано 4 лют 2025

КОМЕНТАРІ • 44

  • @temich1985
    @temich1985 6 років тому +34

    Calculating the Standard Error of X [SE(X)] is definitely the most exciting part of Statistics

  • @josephward5436
    @josephward5436 9 років тому +3

    Thank you!!! This is the first helpful thing I've found on the Internet for obtaining a confidence interval from a paired difference t-Test! I can actually do my homework now.

  • @hanaavdic7725
    @hanaavdic7725 3 роки тому

    Thank you so much. All your videos are a blessing to my eyes.

  • @gwenythmitchell6684
    @gwenythmitchell6684 2 роки тому +2

    Just a head up: to calculate Standard Deviation it’s the Square root of the Variance. You can calculate the variance by: sum of the (differences - the mean)squared divided by n-1. Hope this helps!

  • @jimmyleo4718
    @jimmyleo4718 5 років тому

    Many thanks. This video is much more clear than my lecture notes. I do not know why my lecture notes do not contain the figure explanation of what the p value is and what the t-test is. All of them are just word explanations. I cannot image how to study statistics without the figure explanation.

  • @andrews9719
    @andrews9719 7 місяців тому +1

    So is this p hacking? And a two tailed test would have been more appropriate?

    • @jbstatistics
      @jbstatistics  7 місяців тому +2

      While I personally lean towards two-tailed alternatives in the vast majority of situations, I think the use of a one-tailed procedure is reasonable in this situation. Before collecting the data, there was a strong belief (based on previous studies and information) that puerarin would have a tendency to reduce alcohol consumption. So it wasn't just a "ooooh, I think my new drug is better" sort of argument. (Or even worse, using the data to inform the choice of alternative.) Abusing the use of a one-tailed test can be a form of p-hacking, sure, but I don't think that happened in this study.

  • @BudskiiHD
    @BudskiiHD 8 років тому +2

    You should add this to inference of two populations playlist, the playlist ends with a paired different introduction

  • @amartyachoudhury8991
    @amartyachoudhury8991 6 років тому

    Very well explained Sir .

  • @katiebikes
    @katiebikes 6 років тому +1

    I am confused how we get to t.025 instead of t.05 as a 2-sided test vs. a one sided test. Is that just from H0 =/= 0?

  • @realcirno1750
    @realcirno1750 4 роки тому

    great video thank you :]

  • @sarahdlp524
    @sarahdlp524 10 років тому +17

    you didn't break down x bar and how to calculate the std deviation for unconfident beginners, you assumed this is known.

  • @edd2719
    @edd2719 2 роки тому

    how do you calculate the standard deviation of the differences?

    • @luisrodrigueziii7316
      @luisrodrigueziii7316 2 роки тому

      treat it as a separate sample in which the standard deviation of the sample can be found using the computational sample standard deviation equation.

  • @bornhere13
    @bornhere13 6 років тому

    The t-value in R
    pt(c(.05, .95), df = 9)
    returns -1.833, 1.833
    Is this the code to run if you want the appropriate test statistic for a one-sided alternative? Just curious.

    • @jbstatistics
      @jbstatistics  6 років тому

      The test statistic is calculated using sample data. Its value can't be found with pt or qt, but it can be found if you bring your data into t.test. The command qt(c(.05, .95), df = 9) [with the fix of the pt/qt typo] yields the 5th and 95th percentile of the t distribution with 9 DF. You are likely intending to ask about the critical value for a one-sided alternative. That would depend on the alpha level and what side you're interested in. For 9 DF, alpha = 0.05, and a one-sided alternative of mu > mu_0, 1.833 is the critical value.

    • @bornhere13
      @bornhere13 6 років тому

      Thank you! One more concern...
      I used the t.test() function and the output returns the appropriate confidence interval [-840.6, 68.4]. I assumed, mistakenly, that the t-value returned from the t.test() function was the same t used to construct the 95% confidence interval for the “population” mean difference.
      The -1.92 is from the “sample” right? And the t-value I obtained using the qt() function was used to construct the confidence interval?
      Also, shouldn’t the output from t.test() report that “the true difference is equal to zero.” I figured since the interval “contains” zero.
      Any thoughts? You’re amazing as always.

    • @jbstatistics
      @jbstatistics  6 років тому

      You state: "The -1.92 is from the “sample” right? And the t-value I obtained using the qt() function was used to construct the confidence interval?"
      Yes, in the example in this video -1.92 is the value of the test statistic, calculated from sample data. The t value used in the confidence interval calculation is a quantile from the appropriate t distribution, and it can be found with qt.
      You state: "Also, shouldn’t the output from t.test() report that “the true difference is equal to zero.” I figured since the interval “contains” zero."
      R doesn't draw any conclusions -- that's up to you and me :) R simply reports the results of the calculations. R does state the alternative hypothesis that was used, as that influences the p-value.

    • @bornhere13
      @bornhere13 6 років тому

      Thank you for clearing that up, JB. I love working through your videos. Keep at it!

  • @zeromethanez
    @zeromethanez 9 років тому +3

    why isnt t0.05 used

    • @alexkoziarz8846
      @alexkoziarz8846 7 років тому +1

      Because we must split alpha (0.05) by two in order to get a two-sided confidence interval.

  • @justinsison9243
    @justinsison9243 7 років тому

    how do you find the p value without software?

    • @jbstatistics
      @jbstatistics  7 років тому +1

      You can't find an exact p-value for a t test without software, but you can find a range of values using a t table.

  • @Shimtimus
    @Shimtimus 6 років тому

    what are the null and alt. hyphothesis?

    • @jbstatistics
      @jbstatistics  6 років тому

      I discuss the hypotheses of the test at 7:50.

  • @yapanliu9608
    @yapanliu9608 8 років тому

    Thx , so useful!

  • @Antoniogfl
    @Antoniogfl 8 років тому

    How this drug decreasing alcohol consumption is statistically significant? You have 0 g difference between -841 g and +68 g. would not that mean that you have more than 5% chance of having the null hypothesis being 0g? I do not understand.

    • @jbstatistics
      @jbstatistics  8 років тому

      The direct relationship between hypothesis tests and confidence intervals only holds if both are two-sided, or both are one-sided. In this video I carried out a one-sided hypothesis test (for reasons I discuss in the video), but report the two-sided confidence interval. The two-sided 95% confidence interval contains 0, but the one-sided test has a p-value that is (a little) less than 0.05.

  • @trz_maier7154
    @trz_maier7154 6 років тому

    confidence interval is wrong - the final values are the wrong way round

    • @jbstatistics
      @jbstatistics  6 років тому +1

      No, it is not wrong. If we took the differences in the other direction, then yes the signs would switch. But we didn't, and the given interval is correct.

  • @PURRFECT123
    @PURRFECT123 5 років тому +1

    sapol abi 85 aldım

  • @RobertoMartin1
    @RobertoMartin1 7 років тому

    Chinese medicine works, I can attest :)

    • @jbstatistics
      @jbstatistics  7 років тому

      I make no judgements either way. It's all about the statistics to me!