"A random variable is a numerical outcome of a probability experiment."
discrete versus continuous
Discrete probability distribution
Usual math confusion: use `X` be the random variable (e.g., sum of the numbers "on top" with 3 dice)
and use `x` be a specific value, or set of values, that `X` may have, expressed as `P(x)`.
`0 <= P(x) <= 1 quad AA ` possible values of ` x`
Probability Histogram (really a bar chart for discrete valeus)
Mean of a discrete random variable (also the expected value)
mean denoted as `mu_X`
and expected value as `E(X)` (note uses of capital `X`)
`mu_x = sum_(i=1)^n [ x_i * P(x_i)] = E(X)`
Law of large numbers: see Toss 3 Die Repeatedly
for presentation of some examples of this.
Variance of a discrete random variable
`sigma_X^2 = sum[(x - mu_X)^2*P(x)] = sum[x^2*P(x)] - mu_X^2`
standard deviation of a discrete random variable
`sigma_X = sqrt(sigma_X^2)`
Fixed number of trials (i.e., attempts) are done (run `n` trials)
Only 2 possible outcomes of each trial: one called a success the other called a failure.
Probability of success is the same for each trial.
Trials are independent (really a consequence of previous statemetn)
we will use the random variable `X` to represent the number of successes
that occur in the `n` trials.
Again, `n` is the number of trials
we ue `p` as the probability of a success, therefore, the probability of a failure must be `(1-p)`.
Independence versus "independent for all practical purposes" (when sample is less than 5% of population)
probability of getting `x` successes in `n` trials for a random variable `X` where `p` is the probability of a
success on any one trial is
`P(x) = quad_nC_x * p^x *(1 - p)^(n-x)`
Using a table of values
The mean of a binomial random variable `X` with `n` trials and
probability of success equal to `p` is given as `mu_X = n*p`
The variance of a binomial random variable `X` with `n` trials and
probability of success equal to `p` is given as `sigma_X^2 = n*p*(1-p)`
The standard deviation of a binomial random variable `X` with `n` trials and
probability of success equal to `p` is given as `sigma_X = sqrt(sigma_X^2) = sqrt( n*p*(1-p) )`