Exact Binomial Test Explained! + Real-World Example: Counting Trash in the Baltic Sea 📊🌊🔬(4K)

  Рет қаралды 1,496

yuzaR Data Science

yuzaR Data Science

Күн бұрын

IF YOU WOULD LIKE TO SUPPORT ME, JOIN THE CHANNEL: / @yuzar-data-science
The Exact Binomial Test is a simple yet powerful technique that every data scientist should have in their toolbox. In this video, we’ll explore why we need the Exact Binomial Test and examine a real-world application where I used it to publish a scientific paper on encounters of marine litter particles on the Baltic seafloor.
Enjoy! 🥳
Welcome to my VLOG! My name is Yury Zablotski & I love to use R for Data Science = "yuzaR Data Science" ;)
This channel is dedicated to data analytics, data science, statistics, machine learning and computational science! Join me as I dive into the world of data analysis, programming & coding. Whether you're interested in business analytics, data mining, data visualization, or pursuing an online degree in data analytics, I've got you covered. If you are curious about Google Data Studio, data centers & certified data analyst & data scientist programs, you'll find the necessary knowledge right here. You'll greatly increase your odds to get online master's in data science & data analytics degrees. Boost your knowledge & skills in data science and analytics with my engaging content. Subscribe to stay up-to-date with the latest & most useful data science programming tools. Let's embark on this data-driven journey together!

Пікірлер: 36
@neurosciencehubbykissikont5378
@neurosciencehubbykissikont5378 5 ай бұрын
Your videos are intuitive. Can you start a playlist on machine learning in R?
@yuzaR-Data-Science
@yuzaR-Data-Science 5 ай бұрын
thanks man! yes, that's the plan, but first I would cover stat models, like logistic regression etc. after that I would go full ML and AI ;)
@hikeaway1596
@hikeaway1596 5 ай бұрын
good quality content as always thanks! keep up a great work!
@yuzaR-Data-Science
@yuzaR-Data-Science 5 ай бұрын
thanks for your continuous support! :)
@WilForDataScience
@WilForDataScience 5 ай бұрын
Excellent content quality! You sir always find a way to keep us interestingly attached to the video. You are like our Statistics and Data Science dealer. Thanks for your labor. We'll keep growing up.
@yuzaR-Data-Science
@yuzaR-Data-Science 5 ай бұрын
Wow, thank you! Your comments, my friend, are the most supportive and motivating! So, after reading them I just wanna jump straight into creating a new video on one of the 1000 ideas I have :) For instance, I am finally starting the logistic regression series. One of my favorite topics ;) Genuinely thankful for your continuous support! Cheers!
@jalalkassout4226
@jalalkassout4226 4 ай бұрын
I think your the best explaining statistics in such smooth way. I'm wondering if your blog is out of service?
@yuzaR-Data-Science
@yuzaR-Data-Science 4 ай бұрын
Thanks man! Greatly appreciate your positive feedback. My blog was shut down, since they want me to pay. I refuse to pay, because I actually do something useful for the world for free. So, hope for your understanding. The good news is, youtube is still free and will stay free, so, when you just stop the video at any time and type the code it's free. However, when you want to see the whole code from any of the video, you could join the channel (kzbin.info/door/cGXGFClRdnrwXsPHi7P4ZAjoin), because for the members, I do provide the whole code.
@aminebahmed7526
@aminebahmed7526 5 ай бұрын
Nice video as usual, keep up the good work
@yuzaR-Data-Science
@yuzaR-Data-Science 5 ай бұрын
Thanks, will do! Appreciate your continuous support!!! Commenting, watching and liking is really the best support! So, thanks again!
@SUNILYADAV-tv5ze
@SUNILYADAV-tv5ze 5 ай бұрын
Nice video and excellent explanation 👍
@yuzaR-Data-Science
@yuzaR-Data-Science 5 ай бұрын
Thanks 🙏 Sunil! Glad you enjoyed it!
@OnLyhereAlone
@OnLyhereAlone 5 ай бұрын
Thanks for this but is this not the classic case when p-value adjustments for multiple testing need to be applied? Why wasnt it applied? Also, in a situation where we have only 2 possible outcomes, when should the binomial test be used versus Chi-square? Would this be based on preference or one is objectively more appropriate versus the other?
@yuzaR-Data-Science
@yuzaR-Data-Science 5 ай бұрын
Man, you ask good questions! ;) first, yes, you are absolutely right, p-values adjustment would be the right thing to do, but to the time I have done the paper, I used it irregularly. For the video I also try to keep the focus, so it's concise.
@yuzaR-Data-Science
@yuzaR-Data-Science 5 ай бұрын
And since I try to keep videos short, some infos does not end up there, but was considered, while I was writing the script. For instance, check these parts below, I hope you'd find them useful: Intuition Ironically, there is nothing exact about Exact Binomial test. It is called “exact” because it simply calculates the p-value directly from the probability, and not from any kind of statistics, like the Chi-Square. However, Chi-Square’s Goodness of Fit test is only approximation for a p-value, that is why the exact binomial test is recommended. Proportion test If you have lots of data (N > 30) or more than two outcomes, use a proportion test which is highly similar to the exact binomial test. In fact, the Exact binomial test is exactly the same as the proportion test with Yates continuity correction, which is used by the proportion test by default. Below, I explicitly wrote down such correction: prop.test(x = 7, n = 10, p = 0.5, correct = T) One sample Chi-Square test However, as you can see above, the proportion test calculates the chi-squared statistics, so it is actually calling a chi-squared test. And interestingly a proportion test without Yates continuity correction gives identical results to a Goodness-of-Fit One-sample Chi-Square test: prop.test(x = 7, n = 10, p = 0.5, correct = F) chisq.test(c(7,3)) # total is 10 and p = 0.5 for both numbers by default (Simplest) Logistic regression If you are not overwhelmed yet, you can also go further and conduct the simplest logistic regression possible (don’t need to understand it now! I’ll cover it in different videos). Below you’ll find an log-odds output of the logistic regression (0.847) which can be expressed in probability using the plogis function. You’ll see that the probability is exactly 0.7, as in the tests above and the p-value is similar. By the way, the p-value represents the probability of observing a result as extreme or more extreme than the one you got, assuming the null hypothesis is true. m
@paulocastro5502
@paulocastro5502 4 ай бұрын
why not use the Chi-square test goodness-of-fit also?
@yuzaR-Data-Science
@yuzaR-Data-Science 4 ай бұрын
you actually can, here is what I think about them: Close relatives: connect the dots Ironically, there is nothing exact about Exact Binomial test. It is called “exact” because it simply calculates the p-value directly from the probability, and not from any kind of statistics, like the Chi-Square. However, Chi-Square’s Goodness of Fit test is only approximation for a p-value, that is why the exact binomial test is recommended. Proportion test If you have lots of data (N > 30) or more than two outcomes, use a proportion test which is highly similar to the exact binomial test. In fact, the Exact binomial test is exactly the same as the proportion test with Yates continuity correction, which is used by the proportion test by default. Below, I explicitly wrote down such correction: prop.test(x = 7, n = 10, p = 0.5, correct = T) 1-sample proportions test with continuity correction data: 7 out of 10, null probability 0.5 X-squared = 0.9, df = 1, p-value = 0.3428 alternative hypothesis: true p is not equal to 0.5 95 percent confidence interval: 0.3536707 0.9190522 sample estimates: p 0.7 One sample Chi-Square test However, as you can see above, the proportion test calculates the chi-squared statistics, so it is actually calling a chi-squared test. And interestingly a proportion test without Yates continuity correction gives identical results to a Goodness-of-Fit One-sample Chi-Square test: prop.test(x = 7, n = 10, p = 0.5, correct = F) 1-sample proportions test without continuity correction data: 7 out of 10, null probability 0.5 X-squared = 1.6, df = 1, p-value = 0.2059 alternative hypothesis: true p is not equal to 0.5 95 percent confidence interval: 0.3967781 0.8922087 sample estimates: p 0.7 chisq.test(c(7,3)) # total is 10 and p = 0.5 for both numbers by default Chi-squared test for given probabilities data: c(7, 3) X-squared = 1.6, df = 1, p-value = 0.2059 (Simplest) Logistic regression If you are not overwhelmed yet, you can also go further and conduct the simplest logistic regression possible (don’t need to understand it now! I’ll cover it in different videos). Below you’ll find an log-odds output of the logistic regression (0.847) which can be expressed in probability using the plogis function. You’ll see that the probability is exactly 0.7, as in the tests above and the p-value is similar. By the way, the p-value represents the probability of observing a result as extreme or more extreme than the one you got, assuming the null hypothesis is true. m
@paulocastro5502
@paulocastro5502 4 ай бұрын
​@@yuzaR-Data-Science Thank you for your attention and complete answer. This was very insightful. Also thanks for your video about regressions vs statistical tests, which I wondered about that for months or more (since I don't have a strong background on statistics, I'm a Biologyst who (tries to ^^) enjoy statistics). So, the proportion test calculates the pvalue from the Chi-square value as in the Chi-square test unlike binomial test? At least I can see a clear advantage given that proportion test gives the confidence intervals and I would expect that the Exact binomial test to be similar to the binomial glm but in fact it's similar to Chi-square pvalue. Is this due to the Yates continuity correction?, I found some sources saying is can be a bit conservative. For some reason, I tried to do the Chi-square test and it gives me the same result with continuity correction (which is the default it seems, and doesn't specify which) and not corrected, equal to the proportion test without correction. When i used pvalue by Monte Carlo simulation it gives something closer to the Yate's continuity correction Chi-squared test for given probabilities with simulated p-value (based on 2000 replicates) data: c(7, 3) X-squared = 1.6, df = NA, p-value = 0.3543 What is best? Using continuity corrections or alpha adjustments for multiple outcomes, or both?
@yuzaR-Data-Science
@yuzaR-Data-Science 4 ай бұрын
Monte Carlo simulation is the best I think and adjustment for multiple comparisons is always a must.
@user-wr4yl7tx3w
@user-wr4yl7tx3w 5 ай бұрын
Thanks but why is it called ‘exact’?
@yuzaR-Data-Science
@yuzaR-Data-Science 5 ай бұрын
amazing question! Thanks :) I was thinking to put it into a video actually, but deleted it as "boring" and "less useful" part of the script :) Here is what I was going to say: Ironically, there is nothing exact about Exact Binomial test. It is called “exact” because it simply calculates the p-value directly from the probability, and not from any kind of statistics, like the Chi-Square. However, Chi-Square’s Goodness of Fit test is only approximation for a p-value, that is why the exact binomial test is recommended. Hope it answers the question :)
@SUNILYADAV-tv5ze
@SUNILYADAV-tv5ze 5 ай бұрын
Sir please make a video lecture on Simulation study.
@yuzaR-Data-Science
@yuzaR-Data-Science 5 ай бұрын
Thanks 🙏 Sunil, I’ll do. But it’ll take some time, because I first want to cover frequentists stats. Then come to simulation
@SUNILYADAV-tv5ze
@SUNILYADAV-tv5ze 5 ай бұрын
@@yuzaR-Data-Science Sure Sir I will wait the video. Thank you so much Sir 🙏
@yuzaR-Data-Science
@yuzaR-Data-Science 5 ай бұрын
You are very welcome! :)
@statlab_stat.solution
@statlab_stat.solution 5 ай бұрын
@yuzaR-Data-Science
@yuzaR-Data-Science 5 ай бұрын
🙏
@RichmondDarko-qo2me
@RichmondDarko-qo2me 5 ай бұрын
Very insightful. Thank you vey much. Please can I get your email. I will like to ask you some stuff I find confusing since you are the expert :)
@yuzaR-Data-Science
@yuzaR-Data-Science 5 ай бұрын
Hi Richmond, thanks a lot for your nice feedback! I do not share my email, but that's no problem, because you can ask anything here in the comments section of videos and I would do my best to answer as quick and as good as I can. The channel members get quicker and more insightful responses though, and the higher their level, the more time I can invest into answering questions, thus if you wish, join my channel: kzbin.info/door/cGXGFClRdnrwXsPHi7P4ZAjoin
@RichmondDarko-qo2me
@RichmondDarko-qo2me 4 ай бұрын
@@yuzaR-Data-Science Thank you very much for such informative videos. I spent several years in class and didn't understand all these concepts, but watching this video has made things easier for my comprehension. I have a few questions I would like to ask: When performing a statistical test, we use a parametric test if the data or variable in question is normally distributed, and a non-parametric alternative if the data or variable is not normally distributed. My question is: when does the central limit theorem come into play here? Also, a colleague of mine told me to always use parametric tests even if the data is not normally distributed. His explanation was that parametric tests are more powerful than non-parametric tests. So, should I straightforwardly use the non-parametric alternative when I observe that my data is not normally distributed, or should I take the CLT into consideration and use the parametric test?
@yuzaR-Data-Science
@yuzaR-Data-Science 4 ай бұрын
I am not sure the CLT helps too much, but using parametric test for a highly skewed data is absolute nonsense. The power difference is minimum and is overrated. I also have colleagues who use non-parametric tests by default. Another extreme nonsensicality and laziness. Just for the sake of learning effect, please, take skewed data and calculate mean and median to see how much difference you'll get. And if your colleague would really care about power, he/she would use multivariable models, not univariable tests. And this is what I would recommend to you - the test are fine, in the beginning - but try to learn models and their assumptions when you want to go to the next level. Cheers and thanks again for a nice feedback!
@RichmondDarko-qo2me
@RichmondDarko-qo2me 4 ай бұрын
@@yuzaR-Data-Science I'm really grateful for finding time in your busy schedule to reply me. So please when should I use the CLT or I shouldn't use it at all. Thank you
@yuzaR-Data-Science
@yuzaR-Data-Science 4 ай бұрын
but what exactly do you mean by CLT? bayesian methods?
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 31 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 269 #shorts
00:26
I Studied Data Job Trends for 24 Hours to Save Your Career! (ft Datalore)
13:07
Thu Vu data analytics
Рет қаралды 257 М.
How AI Solved Protein Folding and Won a Nobel Prize
22:20
Quanta Magazine
Рет қаралды 61 М.
Principles of Beautiful Figures for Research Papers
1:01:14
ChuScience
Рет қаралды 69 М.
🚨 YOU'RE VISUALIZING YOUR DATA WRONG. And Here's Why...
17:11
Adam Finer - Learn BI Online
Рет қаралды 214 М.
Mastering {dplyr}: 50+ Data Wrangling Techniques!
17:35
yuzaR Data Science
Рет қаралды 5 М.
Bar Charts with {ggplot2}
13:38
yuzaR Data Science
Рет қаралды 6 М.
Fisher's Exact Test | Lady Tasting Tea
6:40
math et al
Рет қаралды 64 М.
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 31 МЛН