Distributions and Skew | data mining!

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/22

encourage image

There's no tags or description

Looks like no tags are added yet.

23 Terms

1
New cards

What is a distribution?

The shape of the data: where values fall and how often. A histogram shows it.

2
New cards

Is skew named after the tail or the bulk of the data?

The tail. A long tail of high values means right skewed.

3
New cards

Application: a histogram's bulk sits on the left, with a long tail stretching right. Which way is it skewed?

Right skewed, because skew is named after the tail.

4
New cards

Which way does skew pull the mean?

Toward the tail. Right skew pulls the mean up; left skew pulls it down.

5
New cards

Does the bulk of the data pull the mean toward it?

No. The tail pulls the mean; the median stays near the bulk.

6
New cards

In right skewed data, which is bigger, the mean or the median?

The mean.

7
New cards

In left skewed data, which is bigger, the mean or the median?

The median.

8
New cards

Application: on an easy exam, most students scored 90–100 and a few scored 40–60. Which is bigger, the mean or the median?

The median. The data is left skewed, so the low tail pulls the mean down.

9
New cards

Application: what are the mean and median of 1, 2, 3, 4, 100?

Median 3, mean 22. The 100 drags the mean toward the tail.

10
New cards

Why do engineers report p50 and p99 latency instead of the mean?

Response times are right skewed: most are fast, with a long tail of slow ones. The mean hides both the typical case and the slow tail.

11
New cards

What might two peaks in a histogram suggest?

Two different groups mixed together in the data.

12
New cards

What does the 68–95–99.7 rule say?

For roughly normal data, about 68% of values fall within 1 SD of the mean, 95% within 2 SD, and 99.7% within 3 SD.

13
New cards

In normal data, roughly what percentage of values fall within 1 SD of the mean?

About 68% (not 10%).

14
New cards

Application: heights are roughly normal with mean 70 inches and SD 3 inches. What range holds about 95% of people?

64 to 76 inches (mean ± 2 SD).

15
New cards

Application: with mean 70 and SD 3, how unusual is a 79 inch man?

He's 3 SDs above the mean, taller than about 99.85% of men. 99.7% fall within ±3 SD, leaving 0.15% in each tail.

16
New cards

Why can't you use the 68–95–99.7 rule on income data?

The rule needs a roughly normal shape. Income is right skewed, so mean ± SD gives impossible ranges (e.g. −402 to 1,068 thousand). The problem is the shape, not data quality.

17
New cards

What are the fences in the 1.5 × IQR outlier rule?

Lower fence = Q1 − 1.5 × IQR; upper fence = Q3 + 1.5 × IQR. Values outside the fences get flagged.

18
New cards

Why use the 1.5 × IQR rule instead of mean ± SD to find outliers in skewed data?

It's built on quartiles, which outliers can't pull, so it still works on skewed data.

19
New cards

Application: Q1 = 20 and Q3 = 40. Is 75 an outlier?

The IQR is 20, so the upper fence is 40 + 30 = 70 (start from Q3, not the middle). Yes, 75 is flagged.

20
New cards

What does df["x"].skew() return for right skewed data?

A positive number. A negative number means left skewed.

21
New cards

Why apply np.log1p to a right skewed column?

The log compresses the long tail, which many models handle badly. log1p computes log(1 + x), so zeros stay valid.

22
New cards
In the 1.5 × IQR rule, what gets multiplied by 1.5?
The IQR (Q3 − Q1), never Q1 or Q3 themselves.
23
New cards
Application: delivery times have Q1 = 25 and Q3 = 35 minutes. Is a 52 minute delivery an outlier?
IQR = 10, so the upper fence = 35 + 15 = 50. Yes, 52 is flagged.