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.
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!
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.
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.
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.
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.
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.
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.
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.
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.
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.
Calculating the Standard Error of X [SE(X)] is definitely the most exciting part of Statistics
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.
Thank you so much. All your videos are a blessing to my eyes.
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!
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.
So is this p hacking? And a two tailed test would have been more appropriate?
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.
You should add this to inference of two populations playlist, the playlist ends with a paired different introduction
Very well explained Sir .
I'm glad to be of help!
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?
katiebikes Katie, 0.05 is split into both tails (0.025) each
For the 95% confidence interval
great video thank you :]
you didn't break down x bar and how to calculate the std deviation for unconfident beginners, you assumed this is known.
SE(X) gives you the std
how do you calculate the standard deviation of the differences?
treat it as a separate sample in which the standard deviation of the sample can be found using the computational sample standard deviation equation.
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.
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.
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.
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.
Thank you for clearing that up, JB. I love working through your videos. Keep at it!
why isnt t0.05 used
Because we must split alpha (0.05) by two in order to get a two-sided confidence interval.
how do you find the p value without software?
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.
what are the null and alt. hyphothesis?
I discuss the hypotheses of the test at 7:50.
Thx , so useful!
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.
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.
confidence interval is wrong - the final values are the wrong way round
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.
sapol abi 85 aldım
tebrikler
banada dua et ;)
Chinese medicine works, I can attest :)
I make no judgements either way. It's all about the statistics to me!