Prof. Polly

Data Analytics / Module 1 / Topic 3

Topic 3 · Foundations

Know Your Data First

What kind of data is it, can you trust it, and what question are you really asking?

Tiggie the tiger cub, thinking
Your growth lineAnswer Tiggie to add a point
0 of 8
Sprout & Stem again. The plant shop (made up for these guides) has a pile of sales records, order files, and customer reviews. Before anyone builds a model, someone has to understand that data, check it, and pin down the question. Eight short stops.
STOP 1 OF 8

From data to wisdom

Data becomes more useful as it gains context, meaning, and finally a decision. This ladder is called the DIKW hierarchy.

DataA bare fact with no meaning
InformationThe fact with context
KnowledgeA reason behind the pattern
WisdomJudgment applied to a decision

Try it: which rung is it?

STOP 2 OF 8

What kind of data is it?

The kind of data decides which charts and summaries make sense.

Quantitative data are numbers. They can be discrete (counted in whole units, like the number of orders) or continuous (measured on a scale, like weight or time). Qualitative data are categories or text, like a plant type or a written review.

Two more splits matter. Cross-sectional data describe many units at one point in time (last month's sales for every plant). Time series data track one measure over time (fern sales month by month). And data can be structured (rows and columns, like sales records), semi-structured (tagged but not in a fixed table, like emails or web logs), or unstructured (no fixed format, like photos or reviews).

Try it: which kind is it?

STOP 3 OF 8

Levels of measurement

Not all numbers mean the same thing. The psychologist S. S. Stevens sorted them into four levels. Each level keeps what the one below has and adds one more thing.

LevelWhat it addsExampleWhat you can do
NominalLabels only, no orderPlant type: fern, cactusCount, find the most common
OrdinalAn order, but the gaps may not be equalRating: low, medium, highMedian, percentiles
IntervalEqual gaps, but no true zeroTemperature in °FAdd, subtract, average
RatioEqual gaps and a true zeroSales, units sold, ageAll arithmetic, including ratios

A ZIP code looks like a number, but it is a label, so averaging ZIP codes means nothing. And 40 °F is not twice as warm as 20 °F, because zero on that scale is arbitrary.

Try it: which level is each column?

STOP 4 OF 8

Describe it before you decide

Report the center two ways, say how spread out the values are, and note anything extreme.

Here are Sprout & Stem's online sales for 15 days, in dollars. On day 11, one garden club placed a big order.

Mean: the average. Median: the middle value when sorted. Quartiles: the values that cut off the bottom quarter and the top quarter, so the middle half lies between them. Standard deviation: roughly the typical distance of a value from the mean.

STOP 5 OF 8

Can you trust the data?

Garbage in, garbage out: a flawless method on flawed data still gives a flawed answer.

Here is part of Sprout & Stem's order file. It has planted problems.

Try it: which kind of problem is each one?

Try it: what should you do about order 2105?

STOP 6 OF 8

Frame the question first

The most common reason an analysis fails is not a bad technique but a badly posed question.

A classic story: an analyst hired by the military was asked to speed up how fast fighter planes were turned around between landing and takeoff. The military blamed the ground crews. The analyst looked around first and found the real cause: the refueling trucks kept arriving late, because of how they were refilled. Fixing that solved it, with no change to the crews.

A widely used plan for analytics projects, called CRISP-DM, has six phases. It runs as a cycle: what you learn in one phase often sends you back to an earlier one.

Try it: put the six phases in order

Tap the first phase.

Try it: which question is sharpest?

The owner asks, "Are our workshops worth it?"

STOP 7 OF 8

Look before you model

The statistician Francis Anscombe made four small datasets whose summary numbers are almost identical. Plotted, they look completely different.

Look at the four plots first.

A correlation measures only how closely points follow a straight line, from −1 to +1. A strong curve can score near zero, and Set II scores 0.816 even though a straight line is the wrong model for it.

Try it: which chart answers the question?

STOP 8 OF 8

Spot the mistake

Six quick cases. Four are common mistakes, and two are fine.

Nice work. Your growth line is complete!

Now describe a set of numbers of your own in the tool.

Describe a variable. Paste or type 3 to 60 numbers. The tool reports the center two ways, the spread, a dot plot, and what changes without the largest value. It starts with Sprout & Stem's made-up daily sales.

Do it in Excel

Type the 15 daily sales in B2 to B16.

  1. The center, two ways: =AVERAGE(B2:B16) returns about 406.3 and =MEDIAN(B2:B16) returns 352.
  2. The spread: =MIN(B2:B16) returns 259 and =MAX(B2:B16) returns 1184. =QUARTILE.INC(B2:B16,1) returns 317.5 and =QUARTILE.INC(B2:B16,3) returns 400.5. =STDEV.S(B2:B16) returns about 221.2.
  3. A count: =COUNTIF(B2:B16,"<"&AVERAGE(B2:B16)) returns 12. That many days fall below the "average" day.
  4. A picture: select B2 to B16, then choose Insert, Statistic Chart, Histogram. One bar sits alone at the far right.
  5. Test the extreme value: copy the column without day 11 and repeat. The mean drops to about 350.7, the median to 347, and the standard deviation to about 53.1.

Before you describe anything, check the data: =COUNTBLANK(range) finds missing cells, and =COUNTIF(range,cell) copied down shows a 2 next to any record stored twice.

Try it yourself

1. Delivery times

Seven local deliveries took these times, in minutes: 40, 106, 36, 34, 48, 45, 41.

a) Mean?

b) Median?

a) The values add to 350, and 350 ÷ 7 = 50 minutes. b) Sorted: 34, 36, 40, 41, 45, 48, 106. The middle (4th) value is 41 minutes. One slow delivery pulls the mean well above the median, so the median describes a typical delivery better.

2. Which level?

A column records pot size as small, medium, or large. Which level of measurement is it?

3. Which chart?

The owner wants to see how monthly workshop sign-ups changed over two years. Which chart answers that?

4. Which problem?

The same customer is stored twice in the mailing list. Which data-quality problem is that?

Questions to discuss

  1. Give the level of measurement for each: customer ZIP code, a 1 to 5 star rating, temperature in Fahrenheit, and annual revenue. Which arithmetic makes sense for each?
  2. Rewrite this vague question into a specific, answerable one: "Is our website doing its job?" Explain what makes your version better.
  3. Why does Anscombe's quartet warn against trusting summary numbers alone? What habit does it recommend?
  4. Name the six phases of CRISP-DM and explain why the process is drawn as a cycle rather than a straight line.
  5. A report gives only the mean of a set of daily sales. What two more numbers would you ask for before setting a daily sales target, and why?

Practice quiz

Score: 0 of 10

AI can help you get to know a new dataset fast. Treat it like a quick but junior analyst: you give the context and the judgment, it gives speed, and you check everything. If your class has an AI policy, follow it.

It can help with

  • Explaining what each column probably means and flagging obvious problems
  • Suggesting summaries and charts that fit your question
  • Drafting an Excel formula and explaining each part

Always check

  • Run any formula yourself and test it on a few rows you can do by hand
  • Confirm each column's meaning and level against the real file
  • Ask whether the chart answers your question or just looks impressive

Watch out for

  • Confident but wrong facts, or columns that do not exist
  • Pasting customer names or other personal data into a public tool
  • It does not know your business goal unless you say it

Prompts that help you learn

The best prompts make you do the thinking, with AI as a coach.

How to check any AI answer

  1. Compare it with a result you already know, such as the tool on this page.
  2. Test one number yourself with a calculator.
  3. Ask the AI to explain each step. If a step does not make sense, do not use it.
  4. If the AI and your own work disagree, find out why before you trust either one.

Check the AI: a challenge

Give an AI assistant these 15 daily sales: 342, 287, 365, 301, 398, 326, 417, 352, 259, 371, 1184, 309, 403, 334, 446. Ask for the mean, the median, and the first and third quartiles, and ask whether the mean or the median better describes a typical day. Then compare.

Mean about $406.30, median $352, first quartile $317.50, third quartile $400.50 (Excel's QUARTILE.INC rule). The median describes a typical day better, because one big order pulls the mean up. If the AI's quartiles differ a little, it may be using a different quartile rule. Ask which rule it used.
1 / 8