सामग्री पर जाएँ

लेसन 24 · Projects and Reference

Project: Analyze a Customer Survey

Practice data literacy on a small invented survey: check quality, summarize ratings, compare groups, judge bias and uncertainty and write an honest summary.

In this project you act as the analyst for a small invented bakery, "Corner Crumb". The owner emailed a survey to 400 newsletter subscribers and received replies from some of them. She wants to know: "Are customers happy, and should we open on Sundays?" You will go from raw rows to a short, honest answer. All data is made up for practice.

Step 1: Frame the question

Split the request into questions the data might answer:

  1. How did respondents rate the bakery (1 to 5)?
  2. What share of respondents say they would visit on Sundays?
  3. Do answers differ between weekday and weekend shoppers?
  4. Who is missing from this data?

Before looking at results, decide what you would need. "Open on Sundays" is a business decision that also depends on staff and costs, which the survey does not cover.

Step 2: Check the data

The program creates the survey and runs quality checks. The rules: ratings must be 1 to 5, and each respondent should appear once.

Python Load the survey and check quality

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

You find a repeated reply (e02, identical both times), an impossible rating of 9 (e10) and one blank Sunday answer (e12). Decide on rules and write them down:

  • remove the exact duplicate, keeping one copy;
  • treat the rating of 9 as missing, but keep that person's other answers;
  • keep the blank Sunday answer as "no answer".

Step 3: Summarize

Python Clean and summarize

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

You have 15 respondents and 14 usable ratings, with a median of 4. Most ratings are 4 or 5, with two low ones. All 6 weekend shoppers who answered said yes to Sundays, compared with 2 of 8 weekday shoppers. Overall, 8 of 14 said yes.

Step 4: Judge uncertainty and bias

This is the most important step. Think about:

  • Response rate: 15 replies from 400 emails is under 4%. People who replied may care more than average.
  • Coverage: only newsletter subscribers could answer. Walk-in customers who never subscribed are missing, and so are people who might come only on Sundays.
  • Tiny groups: one weekday person changing their answer moves that group's share by over 12 points.
  • Wording: "Would you visit on Sundays?" measures stated intention. People may say yes to options they will rarely use.
  • Group split: the weekend and weekday difference is not surprising. People who already shop on weekends are likely to be more interested in Sundays.

A margin-of-error formula assumes a random sample. This is a self-selected group, so a formula would give a false sense of precision.

Step 5: Recommend a next step

Do not jump to "open on Sundays". A cautious, useful path is:

  1. Pilot four Sundays.
  2. Define success in advance: for example, sales cover added staff and ingredient costs on at least three of the four Sundays.
  3. Track a guardrail, such as whether Saturday sales fall because customers simply move their visit.
  4. Ask walk-in customers a short, neutral question to reach people outside the newsletter.

Step 6: Write the summary

TEXT
Question:   Are customers happy, and should we open on Sundays?
Answer:     Most who replied rate us 4 or 5. Interest in Sundays exists,
            mostly among people who already shop on weekends.
Evidence:   Median rating 4 (14 ratings). Sunday "yes": 8 of 14 answers
            (weekend 6 of 6, weekday 2 of 8).
Limits:     15 replies from 400 emails, newsletter only, stated intentions.
            Cleaning: 1 duplicate removed, 1 impossible rating set to missing.
Next step:  4-Sunday pilot with a cost-based success rule and a check on
            Saturday sales.

Extend the project

  • Redo the summary as if the rating of 9 had been a typing error for 5. Does your conclusion change?
  • Design a better survey question about Sundays, such as asking which times people would visit.
  • Draw a bar chart on paper of the rating distribution with a clear title and the number of responses.
  • Add a column for "how often do you visit?" and explain how it would help.

Check your own work

Before you send the summary, test it like a critic. Could someone read "most customers are happy" and think it describes everyone who buys bread? Change it to "most respondents". Is the weekend versus weekday comparison based on just 6 and 8 answers? Show those counts beside any percentage, as the summary does. Did you explain what you did with the bad rating, so another person could repeat your work and get the same figures? Is there any email address or other detail in the file you share that could identify a person? The owner only needs totals.

Finally, ask a colleague to read the summary and tell you in their own words what it concludes. If their version is stronger than the evidence, for example "customers want Sunday opening", revise your wording until the limits come through.

What a good answer looks like

A strong project report is short. It answers both questions, with different confidence for each. On happiness, it can say that respondents mostly gave high ratings, while two gave low ones that deserve a follow-up, perhaps by asking what went wrong. On Sundays, it can say that interest exists among some people, but that the survey cannot estimate sales. It then turns the open question into a test with a clear rule and a date to decide.

Common weak summaries

Compare your report with these weak versions. "Customers love us" ignores the low ratings and the people who never replied. "Average rating 3.93" gives two decimals to a result from 14 answers and hides the distribution. "Open on Sundays: 57% in favor" turns a handful of replies into a market forecast. A stronger report uses plain counts and says what it cannot know.

Do not report "57% of customers want Sunday opening". You only know about the 8 of 14 respondents who said yes among those who answered that question.

Check your understanding

Quick check · 3 questions

of 3 answered You scored / 3 · perfect!

  1. 1. Why is the 8 of 14 'yes' result weak evidence about all customers?

    Coverage, non-response and small size all limit what can be generalized.
  2. 2. What should you do with the impossible rating of 9?

    The value is invalid. Handle it openly and keep the other answers.
  3. 3. Why include a Saturday guardrail in the pilot?

    Shifted purchases would not add real revenue.

Summary

  • Turn a broad request into answerable questions.
  • Check duplicates, invalid values and blanks, and log your rules.
  • Show distributions and counts, not just one average.
  • Name the response rate, coverage gaps and wording limits.
  • Recommend a testable next step with success rules set in advance.

Next: Project: Fact-Check a Data Claim

आपकी प्रगति इसी ब्राउज़र में सेव होती है। खाते की ज़रूरत नहीं है।