Healthcare data analysis · public dataset

One measurement.
The whole story?

Can a cell measurement tell cancerous and noncancerous samples apart? Let’s try it, and see where things get messy.

Wisconsin Diagnostic Breast Cancer569 samplesInteractive exploratory analysis
The question: Where should we draw the line? A lower cutoff catches more cancerous samples but also flags more noncancerous ones. This is a data exercise, not a tool for medical decisions.
569Samples in this dataset
212Cancerous · malignant
357Noncancerous · benign

First, compare the groups

Pick a measurement. Taller bars mean more samples. Rose means cancerous (malignant); green means noncancerous (benign). Look for places where the groups overlap.

CancerousNoncancerous

What I notice

Cancerous · middle value
Noncancerous · middle value

These measurements describe the centers of cells in sample images. “Worst” means the average of the three largest values measured in a sample. Median means the middle value in a group.

Now move the cutoff

Move the slider. Samples at or above the cutoff get flagged. Watch the missed cases and false alarms change, no cutoff gets everything right.

Cancerous samples caught
Noncancerous samples cleared
Cancerous caughtNoncancerous cleared

At this cutoff

Cancerous flagged
Cancerous missed
Noncancerous flagged
Noncancerous cleared

“Sensitivity” means the share of cancerous samples caught. “Specificity” means the share of noncancerous samples cleared. These scores describe this dataset only.

What stood out

1. The groups differ

Cancerous samples tend to have larger cell measurements here. But the groups overlap, so size alone can’t tell the whole story.

2. The tradeoff matters

At 15.0, the rule catches 205 of 212 cancerous samples. It also flags 75 noncancerous ones. Catching more cases can mean more false alarms.

3. This is a starting point

Next, I’d test fresh data and ask clinicians what mistakes matter most. This small historical dataset can’t tell us how the rule would work today.

How I did it

  1. Loaded 569 samples from the public Wisconsin Diagnostic Breast Cancer dataset.
  2. Compared five measurements using middle values and bar charts.
  3. Flagged samples above the selected cutoff. Counted correct flags, missed cases, false alarms, and correct clearances.
  4. Calculated the two percentages from those counts. No prediction model was trained.

Limits: These selected samples don’t represent everyone. There are no dates or demographic details for comparing trends or groups. The results don’t prove medical safety or explain what causes cancer.

Original dataset and documentation (UCI) · scikit-learn dataset details · Download the five-column analysis extract

The download contains the same sample labels and five measurements used in these charts.