Q1) Calculate Skewness, Kurtosis & draw inferences on the following data a. Cars speed and distance speed dist
4 2
4 10
7 4
7 22
8 16
9 10
10 18
10 26
10 34
11 17
11 28
12 14
12 20
12 24
12 28
13 26
13 34
13 34
13 46
14 26
14 36
14 60
14 80
15 20
15 26
15 54
16 32
16 40
17 32
17 40
17 50
18 42
18 56
18 76
18 84
19 36
19 46
19 68
20 32
20 48
20 52
20 56
20 64
22 66
23 54
24 70
24 92
24 93
24 120
25 85
Answers
Answer:
1) Skew
library(psych)
skew(cars$speed)
Answer :-
## [1] -0.1105533
2) Kurtosis
kurtosi(cars$speed)
Answer :-
## [1] -0.6730924
3)Correlations
cor(cars$speed, cars$dist)
Answer :-
## [1] 0.8068949
Explanation:
Answer:
How you might write a program in Python to calculate the skewness and kurtosis of the given data:
import statistics
import numpy
data = [[4, 2], [4, 10], [7, 4], [7, 22], [8, 16], [9, 10], [10, 18], [10, 26], [10, 34], [11, 17], [11, 28], [12, 14], [12, 20], [12, 24], [12, 28], [13, 26], [13, 34], [13, 34], [13, 46], [14, 26], [14, 36], [14, 60], [14, 80], [15, 20], [15, 26], [15, 54], [16, 32], [16, 40], [17, 32], [17, 40], [17, 50], [18, 42], [18, 56], [18, 76], [18, 84], [19, 36], [19, 46], [19, 68], [20, 32], [20, 48], [20, 52], [20, 56], [20, 64], [22, 66], [23, 54], [24, 70], [24, 92], [24, 93], [24, 120], [25, 85]]
# Extract first column as x_values and second column as y_values
x_values = [x[0] for x in data]
y_values = [x[1] for x in data]
#Calculate mean
mean_x = statistics.mean(x_values)
mean_y = statistics.mean(y_values)
#Calculate median
median_x = statistics.median(x_values)
median_y = statistics.median(y_values)
#Calculate Mode
mode_x = statistics.mode(x_values)
mode_y = statistics.mode(y_values)
#Calculate standard deviation
stdev_x = statistics.stdev(x_values)
stdev_y = statistics.stdev(y_values)
#Calculate Skewness
skewness_x = (3*(mean_x - median_x))/stdev_x
skewness_y = (3*(mean_y - median_y))/stdev_y
#Calculate Kurtosis
kurtosis_x = ((mean_x - mode_x) / stdev_x)**4
kurtosis_y = ((mean_y - mode_y) / stdev_y)**4
print("Skewness for x_values is: ", skewness_x)
print("Skewness for y_values is: ", skewness_y)
print("Kurtosis for x_values is: ", kurtosis_x)
print("Kurtosis for y_values is: ", kurtosis_y)
Explanation:
You would need to write a program that takes in the given data and calculates the skewness and kurtosis.
To calculate the skewness and kurtosis, you would need to use the formulas after calculating the mean, median, mode, and standard deviation of the data.
Skewness:
Skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable about its mean.
Skewness = (3(mean - median))/standard deviation
Kurtosis:
Kurtosis is a measure of the "tailedness" of the probability distribution of a real-valued random variable.
Kurtosis = ((mean - mode) / standard deviation)^4
More questions and answers
https://brainly.in/question/54958369
https://brainly.in/question/54837668
#SPJ3