Introduction to Statistics in R
Run the hidden code cell below to import the data used in this course.
The binomial distribution describes the probability of the number of successes in a sequence of independent trials To get the probability of getting 7 heads out of 10 coins, we can use dbinom. dbinom(numero de caras, numero de intentos, probabilidad de aciertos de cara) pbinom gives the probability of getting a number of successes less than or equal to the first argument. pbinom (7,10,0.5) pbinom(7,10,0.5, lower.tail = FALSE)
The expected value of the binomial distribution can be calculated by multiplying n times p
It's important to remember that in order for the binomial distribution to apply, each trial must be independent, so the outcome of one trial shouldn't have an effect on the next