Confidence Intervals in R

Поділитися
Вставка
  • Опубліковано 17 лис 2024

КОМЕНТАРІ • 29

  • @thenomadicrabbit2890
    @thenomadicrabbit2890 Рік тому +1

    Thank you for this! I was having trouble setting a different level than the default .95! This cleared that up for me!

  • @andyga3581
    @andyga3581 Рік тому +1

    Thanks!!

  • @karolinakaminska8692
    @karolinakaminska8692 4 роки тому +3

    how to perform t.test in Rstudio if I do not have data, I only have a standard error(se)
    , and mean sample(xbar)

    • @EquitableEquations
      @EquitableEquations  4 роки тому +2

      Thanks for the question! If you need to build a confidence interval by hand when you don't have actual data (for instance on a stats exam), you should use the formula μ=xbar ± t* (SE), where t* is calculated using the qt() function and SE=s/√n. I get into this idea at around 1:55 of the vid.

  • @devinhawkins249
    @devinhawkins249 3 роки тому +1

    Thank you so much!

  • @romanvasiura6705
    @romanvasiura6705 Рік тому

    Thank you!

  • @mishudhar9920
    @mishudhar9920 4 роки тому +1

    It is simply great!

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

    Great video thank you so much!

  • @aqsaashraf7798
    @aqsaashraf7798 3 роки тому +1

    Can you tell me how to perform simultaneous vonfidence intervals in R or RStudio??

    • @EquitableEquations
      @EquitableEquations  3 роки тому +1

      Hi! There are several ways to go about this. I expect to have a vid on the subject later in the year.

  • @Gamertrip4life
    @Gamertrip4life 3 роки тому +2

    Hi, thanks for the video! It is super helpful in rounding out the resources I have as a student in R. I was wondering, for the function t.test, is there a way to change the null hypothesis? For example, if instead the null hypothesis is true mean is greater than x, is there a way to do so using the t.test function? Thanks a ton!

    • @EquitableEquations
      @EquitableEquations  3 роки тому +2

      Hi! Check out this vid on significance testing in R:
      ua-cam.com/video/iMAE47S_Xq4/v-deo.html
      It's also done with the t.test() command.

  • @mishudhar9920
    @mishudhar9920 4 роки тому +1

    Hello, many thanks for your video. I have a question and the question is calculate mean, median, mode and standard deviation of the given dataset and the 95% confidence of the interval. It is a large dataset with 8 variables and each variable has 1640 objects. I understand everything except the 94% confidence interval part. I know how to find out mean, mode, median etc. But what should i do with this 95% interval question. Should i do it like you did? Please answer!

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

      Hey! It sounds like you just need to do what I did in the vid. Something like t.test(dataset$variable, conf.level = .94) or t.test(dataset$variable, conf.level = .95), depending. Hope this helps!

    • @mishudhar9920
      @mishudhar9920 4 роки тому +1

      Hello thank you so much for your reply. I am doing masters at Stockhom University in 'Environmental Science and biogeochemistry'. I have some courses of data science. Is that ok for you if i ask your precious suggestion?

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

      Sounds like an exciting program! Good luck!

  • @arnikaorni2832
    @arnikaorni2832 3 роки тому +1

    Why is it .975 ? How to get lower and upper bound from 95%

    • @EquitableEquations
      @EquitableEquations  3 роки тому +2

      Hi! A 95% confidence level leaves out 2.5% on the left and on the right, so the critical t-value must capture 97.5% of the probability to its left. I get into this at around 2:35.

    • @arnikaorni2832
      @arnikaorni2832 3 роки тому +1

      @@EquitableEquations one more question while getting lower or upper bound should we use one sided t value or two sided t value to -/+ from sample mean?

  • @brazilfootball
    @brazilfootball 2 роки тому +1

    Does this work for non-normal data? (I assume the CO2 data is normal since you used the t-test on it)

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

      Hi! Violation of normality isn't a problem unless the sample is very small. Many texts give n=30 as a rule-of-thumb threshold, but in practice this is very conservative.

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

      @@EquitableEquations Ah sorry, I meant to edit this sooner, because per group my data doesn't meet that criteria (observations per group are between 11-72). Would this work? Or is it only building C.I.'s for the pseudomedian and not the mean? wilcox.test(dat, conf.int = T, correct = T, exact = F, conf.level = .95)

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

      @@brazilfootball Even n=11 is fine if the distribution is relatively symmetric. You can also consider bootstrapping.

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

      @@EquitableEquations I think that's the way to go. I don't have symmetry either because most values = 0. I also have heterogeneous variance, which I've heard also causes problems...
      Thank you!

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

    Why did he choose to put 90 as the confidence level at the end?

    • @EquitableEquations
      @EquitableEquations  2 роки тому +1

      Hi! I just wanted to show how to do a different confidence level. There's nothing special about 90%.