# 2/8/2023

## Binomial Experiments (A generalization of the discrete RV lab problem on the number of patients who experience side effects)

• Each random trial can result in one of only two possible outcomes.  This is called a Bernoulli trial.
• We collect data from Bernoulli trials satisfying the following:
• there are n trials;
• the n trials are independent; and
• the probability of “success” remains constant from trial to trial.
• Binomial Distribution - If X is the number of successes in n independent Bernoulli trials, then P(X=k)=n!/[k!*(n-k)!]*pk*(1-p)n-k, for k=0, 1, ..., n.
• We will learn how to use RStudio to make these calculations easier in Chapter 4.

## The mean (expected value) and standard deviation of a random variable

• Mean (or Expected Value) of X
• If X is a discrete random variable taking values x1, x2, …, xk with probabilities p1, p2, …, pk the mean (or expected value) of X is given by µ=E[X] = x1*p1 + x2*p2 + ... + xk*pk.
• Variance of X
• If X is a discrete random variable taking values x1, x2, …, xk with probabilities p1, p2, …, pk the variance of X is given by Var[X] = (x1-µ)2*p1 + (x2-µ)2*p2 + (xk-µ)2*pk.
• The standard deviation of X is the square root of the variance.