2/25/2023

Binomial Distribution, the number of successes in n independent and identically distributed trials, rather than a specific value of the variable being observed.

For students who are confused by the concept of Binomial Distribution. At first, I was thinking that if X ∼ Binomial(10, 0.5), where n = 10 is the number of trials and p = 0.5 is the probability of success in each trial. What is the code x <- 0:10 and then dbinom(x,10,0.5) in the R means? Why the expection E(X) is not simply each value times its probability like we did previously?

The code x<-0:10 creates a vector of integers ranging from 0 to 10, inclusive. This vector represents the possible values of the number of successes, denoted by x, in a binomial distribution with parameters n=10 and p=0.5. The function dbinom(x,10,0.5) computes the probability mass function of the binomial distribution with parameters n=10 and p=0.5 at each value in the vector x. The output is a vector of probabilities, where each element represents the probability of observing the corresponding value of x in the binomial distribution.

For example, suppose we want to calculate the probability of getting exactly 5 heads in 10 coin tosses, where the coin is fair. We can use the binomial distribution with n=10 and p=0.5 to model this situation. First, we create a vector of possible values for the number of heads, from 0 to 10, using the x<-0:10 command. Then, we can use the dbinom() function to calculate the probability of getting exactly 5 heads, given the binomial distribution:

x <- 0:10

dbinom(5, 10, 0.5)

The output should be 0.2460938, which represents the probability of getting exactly 5 heads in 10 coin tosses, where the probability of getting heads is 0.5.

The most important concept which confused me here is that in the context of a binomial distribution, the value of represents the number of successes in n independent and identically distributed trials, each with a probability of success p, rather than a specific value of the variable being observed.

ReadingMall

BOX