Basics of ML & AL Week 2 Challenge
QUESTION:TO calculate the expected value of this probability distribution, we can use the following formula:
Expected Value = Σx * P(x)
where:
- x: Data value
- P(x): Probability of value
For example, we would calculate the expected value for this probability distribution to be:
Expected Value = 0*0.18 + 1*0.34 + 2*0.35 + 3*0.11 + 4*0.02 = 1.45 goals.
This represents the expected number of goals that the team will score in any given game.
Example: Calculating Mean
We typically calculate the mean after we’ve actually collected raw data.
For example, suppose we record the number of goals that a soccer team scores in 15 different games:
Goals Scored: 1, 1, 0, 2, 2, 1, 0, 3, 1, 1, 1, 2, 4, 3, 1
To calculate the mean number of goals scored per game, we can use the following formula:
Mean = Σxi / n
where:
- xi: Raw data values
- n: Sample size
For example, we would calculate the mean number of goals scored as:
Mean = (1+1+0+2+2+1+0+3+1+1+1+2+4+3+1) / 15 = 1.533 goals.
This represents the mean number of goals scored per game by the team.