100% found this document useful (1 vote)
3K views1 page

Exercise - Descriptive Statistics - Fresco

This code calculates various statistical measures of a sample data set including the mean, median, mode, quartiles, interquartile range, skew, and kurtosis. It imports necessary libraries, defines the sample data, and prints the result of applying each statistical function to the data.

Uploaded by

Arpita Das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
3K views1 page

Exercise - Descriptive Statistics - Fresco

This code calculates various statistical measures of a sample data set including the mean, median, mode, quartiles, interquartile range, skew, and kurtosis. It imports necessary libraries, defines the sample data, and prints the result of applying each statistical function to the data.

Uploaded by

Arpita Das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

from scipy import stats

import numpy as np

s = [26, 15, 8, 44, 26, 13, 38, 24, 17, 29]

print(np.mean(s))
print(np.median(s))
print(stats.mode(s))
print(np.percentile(s, [25,75], interpolation='lower'))
print(stats.iqr(s, rng=(25, 75), interpolation='lower'))
print(stats.skew(s))
print(stats.kurtosis(s))

You might also like