[go: up one dir, main page]

0% found this document useful (0 votes)
24 views2 pages

Descriptive Statistics With Python Examples

The document provides an overview of descriptive statistics including mean, median, standard deviation, min and max, count, skewness, and kurtosis, along with Python examples for each concept. Mean is used for symmetric data, while median is preferred for skewed data. The document emphasizes the importance of these statistics in understanding data distributions and identifying outliers.

Uploaded by

Areesha Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views2 pages

Descriptive Statistics With Python Examples

The document provides an overview of descriptive statistics including mean, median, standard deviation, min and max, count, skewness, and kurtosis, along with Python examples for each concept. Mean is used for symmetric data, while median is preferred for skewed data. The document emphasizes the importance of these statistics in understanding data distributions and identifying outliers.

Uploaded by

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

Descriptive Statistics with Interview

Answers & Python Examples


1. Mean (Average)
Mean is the average of all values. Use it when data is symmetric without outliers.

Python Example:

import numpy as np

data = [30000, 35000, 38000, 40000, 5000000]


mean_value = np.mean(data)
print("Mean:", mean_value)

2. Median
Median is the middle value. Use it when data is skewed or has outliers.

Python Example:

median_value = np.median(data)
print("Median:", median_value)

3. Standard Deviation
Standard deviation shows how spread out the values are from the mean.

Python Example:

std_value = np.std(data)
print("Standard Deviation:", std_value)

4. Min and Max


Minimum and maximum help in identifying range and outliers.

Python Example:

min_val = np.min(data)
max_val = np.max(data)
print("Min:", min_val, "Max:", max_val)
5. Count
Count tells how many non-null entries exist in the dataset.

Python Example:

import pandas as pd
df = pd.DataFrame({"values": data})
print("Count:", df['values'].count())

6. Skewness
Skewness indicates the asymmetry of the data distribution.

Python Example:

print("Skewness:", df['values'].skew())

7. Kurtosis
Kurtosis tells how heavy the tails of a distribution are.

Python Example:

print("Kurtosis:", df['values'].kurt())

You might also like