Basics of ML & AL Week 2 Challenge
1) Calculate all 4 business moments using the given data (First Image)
The four business moments are:
- Mean (First Moment)
- Variance (Second Moment)
- Skewness (Third Moment)
- Kurtosis (Fourth Moment)
We will calculate them using the given random variable X and probabilities P(X).
Step 1: Calculate Mean (Expected Value, E[X])
The mean or expected value E[X] is given by:
E[X]=∑XiP(Xi)
Using the given data:
E[X]=(0×0.35)+(1×0.25)+(2×0.15)+(3×0.15)+(4×0.10) E[X]=0+0.25+0.30+0.45+0.40=1.4
Step 2: Calculate Variance (Second Moment)
Variance is given by:
Var(X)=E[X2]−(E[X])2
First, calculate E[X2]:
E[X2]=(02×0.35)+(12×0.25)+(22×0.15)+(32×0.15)+(42×0.10) E[X2]=0+0.25+0.60+1.35+1.60=3.8
Now, compute variance:
Var(X)=3.8−(1.4)2=3.8−1.96=1.84
Step 3: Calculate Skewness (Third Moment)
Skewness measures the asymmetry of the distribution:
Skewness=σ3E[(X−μ)3]
Using the computed values of mean (μ=1.4) and standard deviation (σ=1.84≈1.356), we calculate:
E[(X−μ)3]=∑(Xi−μ)3P(Xi) =(−1.4)3×0.35+(−0.4)3×0.25+(0.6)3×0.15+(1.6)3×0.15+(2.6)3×0.10 =(−2.744)×0.35+(−0.064)×0.25+(0.216)×0.15+(4.096)×0.15+(17.576)×0.10 =−0.96−0.016+0.032+0.614+1.758=1.428
Now, Skewness:
Skewness=(1.356)31.428=2.491.428=0.573
Since skewness > 0, the distribution is positively skewed (right-skewed).
Step 4: Calculate Kurtosis (Fourth Moment)
Kurtosis measures the "tailedness" of the distribution:
Kurtosis=σ4E[(X−μ)4] E[(X−μ)4]=(−1.4)4×0.35+(−0.4)4×0.25+(0.6)4×0.15+(1.6)4×0.15+(2.6)4×0.10 =(3.8416×0.35)+(0.0256×0.25)+(0.1296×0.15)+(6.5536×0.15)+(45.6976×0.10) =1.34456+0.0064+0.01944+0.98304+4.56976=6.923
Now, compute Kurtosis:
Kurtosis=(1.356)46.923=3.686.923=1.88
Since kurtosis < 3, this is a platykurtic distribution (flatter than normal distribution).
2) What is the significance of expected value when simple mean is already in place?
The expected value (E[X]) is a probability-weighted mean rather than just an arithmetic mean. It is more representative when:
- Data points are assigned different probabilities (unlike the arithmetic mean, which assumes equal weight).
- It helps in decision-making under uncertainty, particularly in risk analysis, insurance, and finance.
3) Having skewness in the curve considered to be bad in analysis?
Not necessarily. The impact of skewness depends on the type of data and context:
- In financial data, skewness can indicate high-risk investments.
- In normal distributions, extreme skewness affects statistical tests like t-tests and regression.
- In machine learning, skewness in features may lead to biased models, requiring transformation (log/square root).
4) Evaluate probabilities for normal distribution with μ=680, σ=31
We use the Z-score formula:
Z=σX−μ
a) P(X<711)
Z=31711−680=3131=1
From the normal table, P(Z<1)=0.8413.
b) P(X>740)
Z=31740−680=3160=1.94
From the normal table, P(Z<1.94)=0.9738.
P(X>740)=1−0.9738=0.0262
c) P(600<X<700)
For P(X<700):
Z=31700−680=3120=0.645
From the normal table, P(Z<0.645)=0.7400.
For P(X<600):
Z=31600−680=31−80=−2.58
From the normal table, P(Z<−2.58)=0.0049.
P(600<X<700)=0.7400−0.0049=0.7351
d) P(X=720)
Since normal distribution is continuous, P(X=720)=0.
5) Explanation of the Curve (Second Image)
The second image represents a standard normal distribution (bell-shaped curve):
- Mean = 0, Standard Deviation = 1
- The area under the curve represents probabilities.
- The Empirical Rule states:
- 68.27% of the data falls within 1 standard deviation (±1σ).
- 95.45% falls within 2 standard deviations (±2σ).
- 99.73% falls within 3 standard deviations (±3σ).
This curve is used for statistical inference, hypothesis testing, and probability calculations.