Two-Sample t Test in R (Independent Groups) with Example | R Tutorial 4.2 | MarinStatsLectures

preview_player
Показать описание


Independent two sample t-test and confidence interval are parametric methods appropriate for examining the difference in means for two populations. These are ways of examining the relationship between a numeric outcome variable (Y variable) and a categorical explanatory variable (X variable with 2 levels)

Table of Content:

0:00:10 when should we use the independent two sample t-test and confidence interval in statistics and in research
0:00:53 how to access the help menu in R for t-test
0:01:04 how to visually examine the relationship between two variables in R
0:01:56 introducing the null and alternative hypothesis, the confidence interval, and variance assumption with example
0:03:06 how to use the "mu" argument in two-sided t-test
0:03:12 how to use the "alt" argument to do a one-sided t-test
0:03:18 how to use the "conf" argument to change the confidence level for the t-test
0:03:29 how to let R know that groups are paired or dependent using the "paired" argument
0:04:18 how to decide if we should assume equal or non-equal variances using boxplot
0:04:38 how to decide if we should assume equal or non equal variances comparing the actual variances
0:05:02 how to test the null hypothesis "that the population variances are equal" using Levene's test using "leveneTest" function

► ► Watch More:

Follow MarinStatsLectures

Our Team:
Content Creator: Mike Marin (B.Sc., MSc.) Senior Instructor at UBC.
Producer and Creative Manager: Ladan Hamadani (B.Sc., BA., MPH)

These videos are created by #marinstatslectures to support some Statistics and R Programming courses at the University of British Columbia (UBC) (#IntroductoryStatistics and #RVideoTutorials ), although we make all videos available to the everyone everywhere for free.

Thanks for watching! Have fun and remember that statistics is almost as beautiful as a unicorn!

#statistics #r_programming
Рекомендации по теме
Комментарии
Автор

when i wanted to learn t-test using R, i googed and landed at your channel. now, i have viewed almost all videos of your channel, effectively and diligently ! thank you very much ! Very helpful

sudheerrao
Автор

You basically helped me through a really difficult take-home exam, thank you.

koolchick
Автор

Thank you Mike for the service you are providing to the society.

mididoddi
Автор

Thank you for this tutorial, I am doing a statistics with R course and you helped me with one of my exercises.

TJ-dowt
Автор

what a perfect instructor! I truly appreciate your teaching on R ! Thank you.

zongchenli
Автор

Time stamp 2:43 I have one question. By what formula we are getting degrees of freedom value 117.719 ? Thank you

agrianalyze
Автор

thank you! You are very good at laying out info in a followable fashion, unlike my lecturers.

someoneelse
Автор

You are a great teacher !!! I've watched a few of your videos, and your explanation of key concepts have helped me greatly and I recommended it to my friends.Thank you!

anoopsaxena
Автор

Thank you very much for this video. Concise and without excess complexity.

TakeFlow
Автор

Thanks Guillermo, very much appreciated! We plan on creating more intermediate videos to continue with this series, when we have the time...so once you're past the beginner stage, you can move on to more intermediate videos that will be uploaded within the next few months ;-)

marinstatlectures
Автор

Hi thanks for the great video. A question how about normality test for this t-test example? Can I just make a model aov(y~x, data) and extract resid from there?

kar
Автор

Thanks for really good explanation!
However, when testing if variances are equal; I think you have to use F-test not Levene`s (that one is used in ANOVA)?

janezkermavnar
Автор

Another extremely informative tutorial Mr. Marin. Thanks for doing these!  Amazing how close one can get to the math when using R. I love SPSS, but R is great because of the control you have in the details. Now, I'm finally learning how to use it.

jaymanhire
Автор

Hi! Thank you so much for these videos :)
i am very new in these subjects and i just to make sure i got it right...
so the conclusion is that there is a significant difference between the groups right? (since the p < 0.05)

shirharel
Автор

I'm trying to trun a t test, exactly like the video, but I'm getting this error code: Error in var(x) : Calling var(x) on a factor x is defunct.
Use something like 'all(duplicated(x)[-1L])' to test for a constant vector.
In addition: Warning message:
In mean.default(x) : argument is not numeric or logical: returning NA
Any suggestions on how to fix it?

gregorymiller
Автор

Thank you so much! Is var(LungCap[Smoke=="no"]) the same as var(LungCapData$Smoke=="no")?

nasongg
Автор

Hi I have a set of data composed of two groups male, female of butterfly. I want to do a proper t test. I have calculated the population variance and they are not equal. I should add that sample size in one is 40 and in the other 60. Now should I use welch?

rimagh
Автор

You're very welcome, happy to be of help!

marinstatlectures
Автор

Thank you for helping me understand how to use R

lolaritter
Автор

Thank you! Your video is incredibly helpful!

harikathi