> ## Documentation Index
> Fetch the complete documentation index at: https://v1-learn.neoartd.my.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Mean, Variance, and Expectation

<Card>
  The mean of the random of a
  probability distribution is

  $~~~~~ \mu = X_1 \cdot P(X_1) + X_2 \cdot P(X_2) + \ldots + X_n \cdot P(X_n) $\
  $~~~~~~~~ = \sum X \cdot P(X) $

  where $X_1, X_2, \ldots, X_n$ are the outcomes AND\
  $P(X_1), P(X_2), \ldots, P(X_n)$ are the corresponding
  probabilities.
</Card>

### Mean for Discrete Variable - Example

<Card>
  Find the mean of the number of spots
  that appear when a die is tossed. The
  probability distribution is given below.

  |   X  |  1  |  2  |  3  |  4  |  5  |  6  |
  | :--: | :-: | :-: | :-: | :-: | :-: | :-: |
  | P(X) | 1/6 | 1/6 | 1/6 | 1/6 | 1/6 | 1/6 |

  <br />

  Solution:

  $\mu = \sum X \cdot P(X)$

  <br />

  $~~~~ = 1 \cdot \dfrac{1} {6} + 2 \cdot \dfrac{1} {6} + 3 \cdot \dfrac{1} {6} + 4 \cdot \dfrac{1} {6} + 5 \cdot \dfrac{1} {6} + 6 \cdot \dfrac{1} {6} $

  <br />

  $~~~~ = \dfrac{21} {6} = 3.5 $

  <br />

  That is, when a die is tossed many times, the theoretical mean will be 3.5.
</Card>

<Card>
  In a family with two children, find the
  mean number of children who will be
  girls. The probability distribution is
  given below.

  |   X  |  0  |  1  |  2  |
  | :--: | :-: | :-: | :-: |
  | P(X) | 1/4 | 1/2 | 1/4 |

  <br />

  Solution:

  $\mu = \sum X \cdot P(X)$

  <br />

  $~~~~ = 0 \cdot \dfrac{1} {4} + 1 \cdot \dfrac{1} {2} + 2 \cdot \dfrac{1} {4} $

  <br />

  $~~~~ = \dfrac{1} {2} + \dfrac{1} {2} = 1 $

  <br />

  That is, the average number of girls in a two-child family is 1.
</Card>

## Formula for the Variance of a Probability Distribution

The variance of a probability
distribution is found by multiplying the
square of each outcome by its
corresponding probability, summing
these products, and subtracting the
square of the mean.

> Varians dari distribusi probabilitas ditemukan dengan mengalikan kuadrat dari setiap hasil dengan probabilitasnya yang sesuai, menjumlahkan produk-produk ini, dan mengurangkan kuadrat dari rata-rata.

<Card>
  The formula for the of a
  probability distribution is

  <br />

  $~~~~~ \sigma^2 = \sum [X^2 \cdot P(X)] - \mu^2 $

  <br />

  The standard deviation of a
  probability distribution is

  <br />

  $~~~~~ \sigma = \sqrt{\sigma^2} $
</Card>

### Variance of a Probability Distribution - Example

<Card>
  The probability that 0, 1, 2, 3, or 4
  people will be placed on hold when
  they call a radio talk show with four
  phone lines is shown in the
  distribution below. Find the variance
  and standard deviation for the data.

  |   X  |   0  |   1  |   2  |   3  |   4  |
  | :--: | :--: | :--: | :--: | :--: | :--: |
  | P(X) | 0.18 | 0.34 | 0.23 | 0.21 | 0.04 |

  <br />

  Solution:

  |  X  | P(X) | X \cdot P(X) |       X^2 \cdot P(X)       |
  | :-: | :--: | :----------: | :------------------------: |
  |  0  | 0.18 |       0      |              0             |
  |  1  | 0.34 |     0.34     |            0.34            |
  |  2  | 0.23 |     0.46     |            0.92            |
  |  3  | 0.21 |     0.63     |            1.89            |
  |  4  | 0.04 |     0.16     |            0.64            |
  |     |      | $\mu = 1.59$ | $\sum^2 \cdot P(X) = 3.79$ |

  <Info>
    $\sigma^2 = 3.79 - 1.59^2 = 1.26$
  </Info>

  Now, $\mu = (0)(0.18) + (1)(0.34) + (2)(0.23) + (3)(0.21) + (4)(0.04) = 1.59$.

  <br />

  $\sum X^2 P(X) = (0^2)(0.18) + (1^2)(0.34) + (2^2)(0.23) + (3^2)(0.21) + (4^2)(0.04) = 3.79$.

  <br />

  $1.59^2 = 2.53$ (rounded to two decimal places).

  <br />

  $\sigma^2 = 3.79 - 2.53 = 1.26$.

  <br />

  $\sigma = \sqrt{1.26} = 1.12$.
</Card>

## Expectation

<Card>
  The value of a discrete
  random of a probability
  distribution is the l average
  of the variable. The formula is

  > Nilai dari variabel acak diskrit dari distribusi probabilitas adalah rata-rata dari variabel. Rumusnya adalah

  <br />

  $\mu = E(X) = \sum X \cdot P(X)$

  <br />

  The symbol $E(X)$ is used for the expected value
</Card>

### Expectation - Example

<Card>
  A ski resort loses $70,000 per season
    when it does not snow very much
    and makes $250,000 when it snows a
  lot. The probability of it snowing at
  least 75 inches (i.e., a good season)
  is 40%. Find the expected profit.

  <br />

  Solution:

  | Profit, X | 250,000 | -70,000 |
  | :-------: | :-----: | :-----: |
  |    P(X)   |   0.40  |   0.60  |

  The expected profit = $$(\$250,000)(0.40) - (-\$70,000)(0.60) = \$58,000$$.
</Card>
