Chapter 4 quiz

Ten questions to bring the chapter together.

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

Question 1

Count wholesale customers whose Grocery spending is at least 10,000 m.u.

Write your answer, then run it.

Question 2

For A=(1,1), B=(4,5), print Euclidean and Manhattan distances.

Write your answer, then run it.

Question 3

Manually standardise classroom Income using ddof=0 and compare with StandardScaler.

Write your answer, then run it.

Question 4

Assign (1.5,1.5) to the fitted six-point model and print its distances to the centres.

Write your answer, then run it.

Question 5

Reconstruct WCSS for the six-point fitted model.

Write your answer, then run it.

Question 6

Print mall WCSS for K=4 and K=5 and a sentence explaining why the smaller value does not settle the business choice.

Write your answer, then run it.

Question 7

Print wholesale original-unit mean Milk and Grocery spending for each working group.

Write your answer, then run it.

Question 8

Inverse-transform wholesale centroids and verify that they match group means.

Write your answer, then run it.

Question 9

Print the largest wholesale group size and a cautious business proposal.

Write your answer, then run it.

Question 10

For the six-point Ward tree, print group counts at cut heights 0.5,3,20.

Write your answer, then run it.

Reference answers are locked until all 10 attempts are submitted.