Challenge

Basics of ML & AL Week 2 Challenge

1) Calculate all 4 business moments using the given data (First Image)

The four business moments are:

  1. Mean (First Moment)
  2. Variance (Second Moment)
  3. Skewness (Third Moment)
  4. 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]E[X]E[X] is given by:

E[X]=∑XiP(Xi)E[X] = \sum X_i P(X_i)E[X]=∑Xi​P(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 \times 0.35) + (1 \times 0.25) + (2 \times 0.15) + (3 \times 0.15) + (4 \times 0.10)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.4E[X] = 0 + 0.25 + 0.30 + 0.45 + 0.40 = 1.4E[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])2Var(X) = E[X^2] - (E[X])^2Var(X)=E[X2]−(E[X])2

First, calculate E[X2]E[X^2]E[X2]:

E[X2]=(02×0.35)+(12×0.25)+(22×0.15)+(32×0.15)+(42×0.10)E[X^2] = (0^2 \times 0.35) + (1^2 \times 0.25) + (2^2 \times 0.15) + (3^2 \times 0.15) + (4^2 \times 0.10)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.8E[X^2] = 0 + 0.25 + 0.60 + 1.35 + 1.60 = 3.8E[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.84Var(X) = 3.8 - (1.4)^2 = 3.8 - 1.96 = 1.84Var(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=E[(X−μ)3]σ3Skewness = \frac{E[(X - \mu)^3]}{\sigma^3}Skewness=σ3E[(X−μ)3]​

Using the computed values of mean (μ=1.4\mu = 1.4μ=1.4) and standard deviation (σ=1.84≈1.356\sigma = \sqrt{1.84} \approx 1.356σ=1.84​≈1.356), we calculate:

E[(X−μ)3]=∑(Xi−μ)3P(Xi)E[(X - \mu)^3] = \sum (X_i - \mu)^3 P(X_i)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= (-1.4)^3 \times 0.35 + (-0.4)^3 \times 0.25 + (0.6)^3 \times 0.15 + (1.6)^3 \times 0.15 + (2.6)^3 \times 0.10=(−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= (-2.744) \times 0.35 + (-0.064) \times 0.25 + (0.216) \times 0.15 + (4.096) \times 0.15 + (17.576) \times 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= -0.96 - 0.016 + 0.032 + 0.614 + 1.758 = 1.428=−0.96−0.016+0.032+0.614+1.758=1.428

Now, Skewness:

Skewness=1.428(1.356)3=1.4282.49=0.573Skewness = \frac{1.428}{(1.356)^3} = \frac{1.428}{2.49} = 0.573Skewness=(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=E[(X−μ)4]σ4Kurtosis = \frac{E[(X - \mu)^4]}{\sigma^4}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.10E[(X - \mu)^4] = (-1.4)^4 \times 0.35 + (-0.4)^4 \times 0.25 + (0.6)^4 \times 0.15 + (1.6)^4 \times 0.15 + (2.6)^4 \times 0.10E[(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)= (3.8416 \times 0.35) + (0.0256 \times 0.25) + (0.1296 \times 0.15) + (6.5536 \times 0.15) + (45.6976 \times 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= 1.34456 + 0.0064 + 0.01944 + 0.98304 + 4.56976 = 6.923=1.34456+0.0064+0.01944+0.98304+4.56976=6.923

Now, compute Kurtosis:

Kurtosis=6.923(1.356)4=6.9233.68=1.88Kurtosis = \frac{6.923}{(1.356)^4} = \frac{6.923}{3.68} = 1.88Kurtosis=(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\mu = 680μ=680, σ=31\sigma = 31σ=31

We use the Z-score formula:

Z=X−μσZ = \frac{X - \mu}{\sigma}Z=σX−μ​

a) P(X<711)P(X < 711)P(X<711)

Z=711−68031=3131=1Z = \frac{711 - 680}{31} = \frac{31}{31} = 1Z=31711−680​=3131​=1

From the normal table, P(Z<1)=0.8413P(Z < 1) = 0.8413P(Z<1)=0.8413.

b) P(X>740)P(X > 740)P(X>740)

Z=740−68031=6031=1.94Z = \frac{740 - 680}{31} = \frac{60}{31} = 1.94Z=31740−680​=3160​=1.94

From the normal table, P(Z<1.94)=0.9738P(Z < 1.94) = 0.9738P(Z<1.94)=0.9738.

P(X>740)=1−0.9738=0.0262P(X > 740) = 1 - 0.9738 = 0.0262P(X>740)=1−0.9738=0.0262

c) P(600<X<700)P(600 < X < 700)P(600<X<700)

For P(X<700)P(X < 700)P(X<700):

Z=700−68031=2031=0.645Z = \frac{700 - 680}{31} = \frac{20}{31} = 0.645Z=31700−680​=3120​=0.645

From the normal table, P(Z<0.645)=0.7400P(Z < 0.645) = 0.7400P(Z<0.645)=0.7400.

For P(X<600)P(X < 600)P(X<600):

Z=600−68031=−8031=−2.58Z = \frac{600 - 680}{31} = \frac{-80}{31} = -2.58Z=31600−680​=31−80​=−2.58

From the normal table, P(Z<−2.58)=0.0049P(Z < -2.58) = 0.0049P(Z<−2.58)=0.0049.

P(600<X<700)=0.7400−0.0049=0.7351P(600 < X < 700) = 0.7400 - 0.0049 = 0.7351P(600<X<700)=0.7400−0.0049=0.7351

d) P(X=720)P(X = 720)P(X=720)

Since normal distribution is continuous, P(X=720)=0P(X = 720) = 0P(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σ\pm 1\sigma±1σ).
    • 95.45% falls within 2 standard deviations (±2σ\pm 2\sigma±2σ).
    • 99.73% falls within 3 standard deviations (±3σ\pm 3\sigma±3σ).

This curve is used for statistical inference, hypothesis testing, and probability calculations.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.