Thomas Ellebaek
2015-10-21
Shiny App Presentation
As part of the course project for the coursera course Developing Data Products, by Brian Caffo, PhD, Jeff Leek, PhD, Roger D. Peng, PhD, I have created a simple Shiny application Coin Flip Test.
The Coin Flip Test application is published to shinyapps.io on following link CoinFlipTest.
Tossing the coin with R, is done with the method rbinom
rbinom(n=numberOfFlips, size=1, prob = someSecretProbability)
Here is an example with prob=0.7
rbinom(n=10, size=1, prob=0.7)
[1] 1 1 0 0 1 0 0 1 0 1
The normal approximation confidence interval for a fair coin (prob=0.5) flipped n times is calculated with following formula
ci <- 0.5 + c(1,-1)*qnorm(.025)*sqrt(0.5*(1-0.5)/n)
Like what you've seen? - Don't worry, the app will be online until the end of the course, so you can enjoy it as much as you like for remainder of the course period.
Am I really throwing the same coin each experiment? - Yes, don't worry.
How fair is the coin actually? - That is confidential business insight ;)