Challenge

Basics of ML & AL Week 2 Challenge

1.

a)The first business moment is the mean, which is the average of the values of X multiplied by their probabilities. The mean is calculated as follows:

Mean = Σx*P(x)
Mean = 0 * 0.35 + 1 * 0.25 + 2 * 0.15 + 3 * 0.15 + 4 * 0.10
Mean = 1.6

b)The second business moment is the variance, which is a measure of how spread out the values of X are. The variance is calculated as follows:

Variance = Σ(x - Mean)^2 * P(x)

Variance = (0 - 1.6)^2 * 0.35 + (1 - 1.6)^2 * 0.25 + (2 - 1.6)^2 * 0.15 + (3 - 1.6)^2 * 0.15 + (4 - 1.6)^2 * 0.10

Variance = 1.176

c)The third business moment is the skewness, which is a measure of the asymmetry of the distribution of X. The skewness is calculated as follows:

Skewness = 3 * (Mean - Median) / Standard Deviation

where:

  • Mean is the mean of the distribution
  • Median is the median of the distribution
  • Standard Deviation is the standard deviation of the distribution

In this case, the skewness is calculated as follows:

Skewness = 3 * (1.6 - 2) / 1.08
Skewness = -0.87

d)
The fourth business moment is the kurtosis, which is a measure of the peakedness of the distribution of X. The kurtosis is calculated as follows:
Kurtosis = (Mean^3 - 3 * Mean * Variance + 2 * Standard Deviation^3) / Standard Deviation^3

In this case, the kurtosis is calculated as follows:

Kurtosis = (1.6^3 - 3 * 1.6 * 1.176 + 2 * 1.08^3) / 1.08^3
Kurtosis = 0.125
2. 

The expected value is a more complete measure of central tendency than the simple mean because it takes into account the probabilities of the different values. For example, if a random variable has two values, 1 and 2, with probabilities 0.5 and 0.5, respectively, then the expected value is 1.5. However, the simple mean would be 1, because the average of 1 and 2 is 1.

The simple mean is a simpler measure of central tendency than the expected value, and it is often used when the probabilities of the different values are not known. However, the expected value is a more accurate measure of central tendency when the probabilities of the different values are known.

Here are some of the significance of expected value:

  • It is a measure of how likely a particular outcome is.
  • It can be used to calculate the variance and standard deviation of a distribution.
  • It can be used to make predictions about future events.
  • It can be used to compare different distributions.

3.

Whether skewness in a curve is considered bad in an analysis depends on the context of the analysis. In some cases, skewness can be a sign of a problem, while in other cases it can be a neutral or even beneficial characteristic.

For example, if you are analyzing a dataset of heights, a slight positive skewness might be expected, since there are more people who are of average height than there are people who are very tall or very short. In this case, the skewness would not be considered a problem.

4.

Sure, I can help you with that.

The probability distribution you provided is a continuous normal distribution with mean = 680 and standard deviation = 31. This means that the probability of any particular value is zero, but the probability of a range of values can be calculated.

a) P(X < 711)

The probability that X is less than 711 is equal to the area under the normal curve from the mean to 711. This can be calculated using the norm.cdf() function in Python.

python

import numpy as np
import scipy.stats as stats

mean = 680
std_dev = 31

probability = stats.norm.cdf(711, mean, std_dev)

print(probability)

output =
0.8413447460685429

b) P(X > 740)

The probability that X is greater than 740 is equal to the area under the normal curve from 740 to infinity. This can be calculated using the 1 - norm.cdf() function in Python.

python

probability = 1 - stats.norm.cdf(740, mean, std_dev)

print(probability)

output =
0.02646547301493496

c) P(600 < X < 720)

The probability that X is between 600 and 720 is equal to the area under the normal curve from 600 to 720. This can be calculated using the norm.cdf() function in Python.

Python
lower_bound = 600
upper_bound = 720

probability = stats.norm.cdf(upper_bound, mean, std_dev) - stats.norm.cdf(lower_bound, mean, std_dev)

print(probability)

output =
0.8965998656914088

d) P(X = 720)

The probability that X is equal to 720 is zero, because the normal distribution is continuous and there is no probability of any particular value.

5.

The curve on the right side of the image is a normal distribution curve. It is a bell-shaped curve that is symmetrical around the mean, which is 680 in this case. The standard deviation is 31, which means that 68% of the data is within 1 standard deviation of the mean, 16% is within 2 standard deviations of the mean, and 16% is within 3 standard deviations of the mean.

The curve is also known as the Gaussian distribution, after the German mathematician Carl Friedrich Gauss. It is one of the most important distributions in statistics, and it is used in a wide variety of applications, including:

  • Probability theory. The normal distribution is used to calculate probabilities in a variety of situations, such as the probability of a coin landing on heads or the probability of a die rolling a 6.
  • Estimation. The normal distribution is used to estimate parameters of a population, such as the mean or the standard deviation.
  • Hypothesis testing. The normal distribution is used to test hypotheses about a population, such as the hypothesis that the mean of a population is equal to a particular value.

The normal distribution is a very useful tool in statistics, and it is important to understand its properties in order to use it effectively.

The image you sent also shows the probability of different values of X. For example, the probability that X is less than 711 is 0.6826894921370912, which is the area under the curve from the mean to 711. The probability that X is greater than 740 is 0.1586552793960588, which is the area under the curve from 740 to infinity.

The curve in the image is a standard normal distribution curve, which means that the mean is 0 and the standard deviation is 1. However, the normal distribution curve in your question has a mean of 680 and a standard deviation of 31. This means that the curve is shifted to the right by 680 units and compressed horizontally by a factor of 31.

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.