Chapter 2 · Section 5 practice

Exploratory Data Analysis

Work from question 1 to 10. Edit your Python box, click Run Code, review the result, then click Submit attempt. Reference answers unlock after all ten attempts are submitted. This records completion, not correctness. Each box runs independently. Progress is saved in this browser.

Submitted: 0 / 10

1. Typical order

Warm-up. Print the mean and median of these sales.

Write your answer, then run it.

2. Observed count

Warm-up. Print the count of observed values and the number of rows.

Write your answer, then run it.

3. A quartile

Warm-up. Print the 75th percentile of [100, 200, 300].

Write your answer, then run it.

4. Sample spread

Build your skills. Print the sample standard deviation of [100, 200, 300].

Write your answer, then run it.

5. Category counts

Build your skills. Print category counts for these orders.

Write your answer, then run it.

6. Category shares

Build your skills. Print the Gifts proportion.

Write your answer, then run it.

7. Reduce down rows

Build your skills. Print Monday and Tuesday totals as a list.

Write your answer, then run it.

8. Reduce across columns

Challenge. Print Central and Kowloon totals as a list.

Write your answer, then run it.

9. A large observation

Challenge. Compare the full mean with the mean after removing the 1000 order. Print both.

Write your answer, then run it.

10. Calculate and interpret correlation

Challenge. Print the correlation between AdSpend and Revenue rounded to three decimals, followed by a statement that it does not establish causation.

Write your answer, then run it.

Reference answers are locked until all 10 attempts are submitted.