Basics of ML & AL Week 2 Challenge
1.Calculate all 4 business moments using pen and paper for the below data set?
First Business Moment: Measure of Central Tendency
Mean(μ) = ∑(xi) . P(X
| x | p(X) | x.P(X) |
| 0 | 0.35 | 0 |
| 1 | 0.25 | 0.25 |
| 2 | 0.15 | 0.30 |
| 3 | 0.15 | 0.45 |
| 4 | 0.10 | 0.40 |
Expected value (μ) = 0+0.25+0.30+45+0.4= 1.4
Second Business Moment: Measure of Dispersion
Variance(σ2) = ∑(xi -μ)^2 . P(X)
we have μ = 1.4
| x | p(X) | ∑(xi -μ)^2 . P(X) |
| 0 | 0.35 | (0-1.4)^2 . 0.35 = 0.686 |
| 1 | 0.25 | (1-1.4)^2 . 0.25 = 0.04 |
| 2 | 0.15 | (2-1.4)^2 . 0.15 = 0.054 |
| 3 | 0.15 | (3-1.4)^2 . 0.15 = 0.384 |
| 4 | 0.10 | (4-1.4)^2 . 0.10 = 0.676 |
Variance(σ2) = 0.686 + 0.04 + 0.054 + 0.384 + 0.676 = 1.84
σ = 1.3565
Third Business Model: Skewness
Sk = ∑ ((x - μ)/σ)^3 . P(X)
σ = 1.3565
μ = 1.4
| x | P(X) | (x-μ)/σ = y | (y)^3 . P(X) |
| 0 | 0.35 | -1.032 | -0.3847 |
| 1 | 0.25 | -0.295 | -0.00641 |
| 2 | 0.15 | 0.4423 | 0.01297 |
| 3 | 0.15 | 1.1796 | 0.2462 |
| 4 | 0.10 | 1.9167 | 0.7041 |
Sk = 0.57216
Fourth Business Moment: Kurtosis
Kt = ∑((x-μ)/σ)^4 . (P(X)-3)
σ = 1.3565
μ = 1.4
| x | P(X) | (x-μ)/σ = y | (y)^4 . (P(X)-3) |
| 0 | 0.35 | -1.032 | (1.13427) . (-2.65) = -3.006 |
| 1 | 0.25 | -0.295 | (0.00757) . (-2.75) = -0.0208 |
| 2 | 0.15 | 0.4423 | (0.03827) . (-2.85) = -1.1090 |
| 3 | 0.15 | 1.1796 | (1.93615) . (-2.85) = -5.51802 |
| 4 | 0.10 | 1.9167 | (13.4963) . (- 2.9) = -39.1392 |
Kt = -43.8
2.What is the significance of expected value when simple mean (Sum of all observations/number of observations) is already in place
| x | P(X) |
| 0 | 0.1 |
| 1 | 0.15 |
| 2 | 0.4 |
| 3 | 0.25 |
| 4 | 0.1 |
If we calculate the mean value for 'x', we get μ = 2, but if we calculate the expected value, it turns out to be 2.1.
Now as seen above, even though random variables can only take in integer values that are discreet, we can still have a non-integer value which is continuous.
For example, if we take the variable x of a person that goes cycling a week, the mean value for the number of time the person cycles is 2, but that does not mean that the expected value of 2.1 is wrong, because, after say 10 weeks, that expected value of the mean will be 21, which is also right in long-term probability.
3.Having skewness in the curve considered to be bad in the analysis?
We always assume that standard distribution has a normal distribution curve, but that is not always the case as the data is not always normally distributed and it is not always symmetrical along the central part.
That is why we have skewness, which can either be positively skewed or negatively skewed and is good to have for a better understanding of the curve shape. The skewness for a normal distribution curve will always be zero. Negative skewed indicates data that are skewed left and positive skewed indicate data that are skewed right.
Hence it is good to have skewness as it helps us analyze data for a given set of values.
4)Evaluate the probabilities for continuous normal distribution with given mean = 680 and standard deviation = 31
a)P(X<711)
z = (x-μ)/σ = (711-680)/31 = 1
P(X<711) = P(Z<1) = 0.8413
b)P(X>740)
z = (x-μ)/σ = (740-680)/31 = 1.9354
P(X>740) = P(Z>1.9354) = 1-0.9732 = 0.0268
c)P(600<X<720)
z1 = (x-μ)/σ = (600-680)/31 = -2.5806
z2 = (x-μ)/σ = (720-680)/31 = 1.2903
P(600<X<720) = 0.9951-0.0985 = 0.8966
d)P(X=720)
f(x) = (1/σ.√2pi) . e^-(1^2)((x-μ)/σ)^2 = 0.0128 . 0.435 = 0.0055
The probability at this value will tend to 0 but will not be equal to zero
5)Explain the curve on the right side
The curve is a normal distribution curve.
The area under the normal curve will always be 1
It is always defined using the mean and standard deviation
68% of the area under the curve is within 1 standard deviation of the mean
The curve is symmetric at the center