Understand distributions and choose useful charts

Download the files for the course

Understand distributions and choose useful charts

A transport operations team reports an average trip time and asks whether it describes a typical trip. Your job is to show the typical experience, the spread and the long recorded tail, while keeping the underlying population visible. You will ask ChatGPT to calculate and create the files, then use Excel to verify the important controls. You do not need to write code.

The worked result is revealing: eligible recorded duration averages 18.20 minutes, while its median is 11.42 minutes. Recorded distance averages 31.49 miles, while its median is 1.79 miles. Those statements use different, explicitly defined populations. Large recorded values remain in both distributions; their presence is a reason to investigate the records, not permission to invent corrections.

Decision and learning outcomes

By the end, you should be able to define separate populations for different measures; explain a mean, median, percentile and interquartile range; choose a histogram, box plot or grouped percentile chart; make zooms and tails transparent; and verify a small percentile calculation yourself. The client decision is which measures to use for an operational discussion and which recorded extremes need follow-up. This lesson does not establish service targets or causal explanations.

Prerequisites are Lessons 1–3 or the supplied source notice, joined file and method card. The observation is one recorded source trip occurrence. A source_record_id traces its place in the frozen file and is not an operational trip identifier. The blueprint’s 40-minute core allowance is a planning estimate, not a measured completion time; downloads, tool waiting and optional Excel checks can take longer.

What you will produce

DeliverablePurpose
All-row analytical ledger and eligible CSV viewsPreserve every record and show why each view includes or excludes it.
Statistics and chart tablesMake every headline, group count and plotted value traceable.
Four PNG charts and a client interpretationExplain typical values, variation and tails without silently trimming data.
Compact reference workbookReview results, reconciliations and a live percentile worked example.
Weekday and weekend comparisonApply the same definitions to a new question using the same real observations.

The supplied reference outputs use the prefix L04_. Your ChatGPT exports use My_L04_ so you can compare them without overwriting the answers. Presentation wording and styling can differ. Counts, definitions, source preservation and calculations must agree within the stated tolerance.

Start from the released files

Extract the complete ZIP first. Use 00_read_first for this lesson and prompts; 01_start for the six starting uploads; 02_prerequisites for the inherited Lesson 3 notice, dictionary, join policy and validation evidence; 03_reference for instructor-produced answers and chart values; and 04_reproduction for scripts and execution evidence. Leave 03_reference closed during your first attempt if you want an unassisted exercise.

Open a fresh ChatGPT conversation that supports file upload, executing calculations and producing downloadable files. Use a model available in your workspace with those capabilities; this lesson does not depend on a particular model name. If file execution is unavailable, the analysis cannot be completed in that conversation. Do not accept a response that merely describes what it would calculate.

Upload the following six files from 01_start. Upload them in two batches if your interface imposes a lower per-message limit, then wait until all are attached before sending Prompt 1. Do not upload the ZIP, instructor notes or reference answers.

Starting fileWhat ChatGPT needs it for
green_socrata_2024-01.csvOriginal 20-field, 56,555-row source extract.
L03_Jan_Joined_Trips.csvFrozen 39-field enriched population and stable source lineage.
taxi_zone_lookup.csvCheck both pickup and drop-off role labels against all 265 reference rows.
L04_Analysis_Policy.jsonExact eligibility, percentile, grouping and chart-bin rules.
L04_Field_Dictionary.csvDefinitions of all 58 fields in the reference ledger.
L04_Data_Dictionary_and_Method_Card.pdfStandalone explanation of the scope, methods and controls.

The original source and joined files have been recovered byte-for-byte. Their hashes are embedded in Prompt 1. No new download, replacement population or synthetic observations are needed. These are the official Socrata pickup-month CSV records; their equivalence to monthly TLC Parquet files has not been tested. The original query excludes records without a January pickup timestamp; the lesson preserves every record returned by that query.

Understand the policy before calculating

Source observations are the original strings, such as timestamps, recorded miles, USD amounts and lookup labels. Analytical results include the elapsed seconds, eligible counts and percentiles calculated from those strings. Teaching conventions include the 24-hour duration cutoff, Saturday/Sunday weekend definition, histogram bins and boxplot fences. None is a claimed operator, human reviewer or publisher approval.

Duration is recorded drop-off time minus recorded pickup time, divided by 60 to obtain minutes. The timestamps are used as recorded, without an invented timezone conversion. A duration is eligible only if known, greater than zero and no more than 24 hours. The exclusive reasons are checked in order: unknown timestamp, negative duration, zero duration, above 24 hours, then included. Included does not mean certified correct.

Distance is eligible independently when it is a known nonnegative number of miles. Zero is a known number and stays included; unknown is not zero. Its exclusive reasons are unknown distance, negative distance and included. A future analysis using both measures would need their intersection. Do not accidentally impose the duration rule on a distance-only chart.

The all-row ledger keeps both sets of flags. It also keeps overlapping diagnostics, such as zero duration and zero distance. These cannot be added as if they were separate excluded groups. In the worked file, 60 records have both conditions. A duration view excludes 76 zero-duration records; the distance view retains all 2,871 zero-distance records, including those 60.

Stage 1 Inspect and approve the calculation plan

Copy Prompt 1 exactly from the text file or the block below. Review the file gate before continuing. Stop if hashes, row counts, field preservation or lookup checks fail. Ask for a specific repair rather than allowing a new source download.

I am a management consultant learning to analyze distributions. I know Excel but do not program. Use the six uploaded files: green_socrata_2024-01.csv, L03_Jan_Joined_Trips.csv, taxi_zone_lookup.csv, L04_Analysis_Policy.json, L04_Field_Dictionary.csv and L04_Data_Dictionary_and_Method_Card.pdf.

Stage 1 is an inspection and policy gate. Actually read the files with calculation tools. Verify SHA256: raw 1aeae98878911c9bce92eb41cbe5f564ceef4c80d4f3377f6d7e874a1164aaa3; joined 233e21fcc41e6937ba1fe2fa137d24dea51c48d8246c68b65878a9b968176914; lookup 1a99e105092230f8620f301edcca7f80d3080642ff404d28ed957d3fa222c8ed. Expected raw and joined counts are 56,555 data rows; joined has 39 fields; lookup has 265 rows. Read source fields as text, preserving literal N/A, blanks, exact timestamps and precision. Compare all 20 raw source fields to the joined input, prove source_record_id uniqueness and row order, and verify both role enrichments against the unique lookup. These row IDs are lineage, not operational trip IDs. Stop with a specific blocker if a file is missing, hashes differ, a tool cannot execute, or preservation fails. Do not download or silently substitute another population.

Profile recorded timestamps and distances, directly showing actual zero-duration, zero-distance and extreme records with source_record_id and original text. Preserve every row. Propose an appended-field analytical ledger using the supplied versioned policy: elapsed time from recorded timestamps without timezone conversion; duration eligible only when known, positive and <=24 hours; distance eligible independently when known and nonnegative, including zero; joint eligibility is their intersection. Unknown measures remain unknown. Explain exclusive reason priorities separately from overlapping flags. Saturday/Sunday of recorded pickup date is Weekend; all other weekdays are Weekday; unknown dates stay Unknown. Keep all pickup borough labels, including N/A and Unknown. Never cap, winsorize, deduplicate or replace values.

Explain in plain English the PERCENTILE.INC/linear convention, population standard deviation, four chart populations and the difference between eligibility and display limits. The 24-hour cutoff and display rules are teaching conventions, not publisher-approved error rules. Export My_L04_Stage1_Checks.json and a short proposed analysis plan. Stop after this gate; do not yet create final charts or conclusions. Report exactly which checks ran. Do not assert equivalence to TLC monthly Parquet files.

The expected gate is 56,555 source rows, 56,555 joined rows, 39 joined fields and 265 lookup rows, with every original field and lineage ID preserved. You should see actual records for zero and extreme values, not an assertion that outliers were “cleaned.” Stage 1 should stop with its inspection report and proposed plan. Keep the downloaded report as evidence.

Stage 2 Calculate and create four useful charts

A histogram shows how observations are distributed across value intervals. Equal-width main bins let you compare concentrations. A box plot compresses a group into quartiles and whiskers while keeping fliers visible. Hourly percentile lines show how the center and tail vary across a business grouping. The count bars prevent a small group from appearing as well-supported as a large one.

This lesson deliberately avoids a logarithmic scale. A log axis can be useful for positive values, but zero requires separate treatment and readers need an explanation of the scale. Here, explicit zero and tail panels preserve the facts more directly.

Proceed with Stage 2 using the unchanged frozen files and L04_Analysis_Policy.json. Execute the analysis. Preserve all 39 joined source/preparation fields and source_record_id strings in original order; append derived fields. Export My_L04_All_Row_Ledger.csv for every row and separate duration, distance and joint eligible views. Include derived elapsed seconds/minutes, parsed distance, separate exclusive disposition reasons and eligibility flags, recorded pickup date/hour, day type and pickup borough group. Leave unavailable numeric values blank with an explicit status, never zero. Reconcile each view to all source rows and separately reconcile known signed total_amount plus unknown-amount counts. Do not add overlapping flags as if they were disjoint exclusions.

Calculate full-population n, mean, median/P50, P25, P75, P90, P95, min, max, range, IQR and population standard deviation, using unrounded measures and one PERCENTILE.INC/linear interpolation convention. Supply overall, pickup borough, pickup hour and day-type tables with source, eligible and excluded counts; retain special labels and disclose small groups. Show a worked percentile example from the first ten duration-eligible rows in source order, sorted by elapsed seconds then source_row, including source IDs and exact seconds. This is an actual-observation teaching sample, not a population estimate.

Produce exactly four PNG charts and underlying CSV tables following the policy: C1 duration histogram [0,60) with 5-minute bins and an exhaustive categorical tail panel [60,1440]; C2 duration box plots by pickup borough, full range plus a 0-to-60-minute zoom with above-60 counts by group; C3 distance with zero separately, positive <20-mile histogram in 1-mile bins and exhaustive categorical tail intervals >=20 miles; C4 full eligible duration mean/P50/P90/P95 by recorded pickup hour with group counts. Histogram boundaries are in the JSON policy. Unequal tail-bin widths must be labeled as interval count bars, not a density histogram. C1 includes exact 60 in the tail; C2 zoom includes exact 60. Box quartiles use the same percentile convention, whiskers end at actual points inside 1.5-IQR fences, and every flier stays represented in the full panel. Do not sample fliers. Explain overlaps of plotted points. Label units, sample sizes, independent eligibility, all display restrictions and out-of-frame counts. Export a display-audit table and verify that all chart counts agree to their populations. Do not recompute headline statistics from zoomed data.

Create a simple Excel reference workbook with summary tables, chart values, reconciliation checks and the actual-observation percentile worked example; full transaction evidence can stay in the CSVs. State which cells are frozen results and which are live formulas. Independently recalculate using another implementation, check selected source records and every chart table, inspect exported artifacts if tools permit, and list tests completed versus unavailable. Export a concise one-page client interpretation. Distinguish source observations, calculated findings and teaching conventions. Do not infer causes, valid customer experience from extreme records, or total NYC demand. Do not claim native Excel, human usability or Parquet comparison tests unless actually performed.

After downloading the files, check that the all-row ledger has 56,555 rows and 58 fields in the reference implementation: the original 39 fields plus 19 derived fields. A learner output may use different derived names, but its dictionary must state the correspondence and its original fields must be unchanged. The compact workbook carries aggregate evidence and a worked example. The full transaction CSVs are part of the deliverable, not optional missing workbook detail.

Read the validated outputs

The duration view contains 56,479 eligible records and 76 zero-duration exclusions. No January records have unparseable timestamps, negative duration or duration above 24 hours. The distance view contains all 56,555 records, including 2,871 zeroes and no unknown or negative distances. The joint view has 56,479 records. These are observed results from the frozen file, not guarantees for another month.

StatisticEligible duration in minutesEligible distance in miles
Count56,47956,555
Mean18.2031.49
Median and P5011.421.79
P9026.005.60
P9533.687.783
Interquartile range10.051.98
Population standard deviation75.511,417.40
Maximum1,438.98201,421.68

The mean is pulled upward by the right tail. The median describes the middle ordered observation, while P90 and P95 describe upper-distribution thresholds. P95 is an interpolated summary, not a guarantee that exactly 5% of records exceed it or a promise about the next trip. Standard deviation is sensitive to large values; the IQR gives a complementary view of the middle half.

C1’s 5-minute histogram covers 55,918 eligible durations below 60 minutes. Its tail panel covers the remaining 561. The last tail interval contains 173 records from 720 through 1,440 minutes. These are long recorded elapsed times; the file does not explain whether the cause is a recording issue, operational behavior or something else.

C2 compares eight pickup borough/category groups. It retains literal N/A and Unknown, EWR with only three eligible records and Staten Island with five. Do not rank operational performance from these small groups. The full panel shows all 2,945 boxplot fliers, although overlaid points may look like one. The zoom leaves 559 records above 60 minutes out of frame and discloses the count for each group. The difference from C1’s 561 is the two records exactly at 60 minutes.

C3 covers 2,871 zero distances, 53,465 positive distances below 20 miles and 219 distances at least 20 miles. Forty-six recorded distances are at least 1,000 miles, including the maximum of 201,421.68. These values remain in the mean. The proper next step is source investigation, not an assertion that these were real completed journeys of those lengths.

C4 calculates mean, P50, P90 and P95 from every eligible duration in each of 24 recorded pickup hours. It does not use a 60-minute filter. Hourly differences are descriptive; route mix, trip mix and record quality may differ. They do not identify traffic effects or driver performance.

The percentile calculation you can inspect

Use PERCENTILE.INC throughout, including the boxplot quartiles. Sort n values ascending. For percentile p, calculate h = 1 + (n − 1) × p. Its integer part j selects the lower rank; its fractional part g tells you how far to interpolate toward the next value. Result = lower value + g × (upper value − lower value). The smallest and largest available observations are used at the endpoints.

The reference workbook’s Percentile check sheet uses the first ten eligible source rows, sorted by duration. Those actual values run from 28 seconds to 3,026 seconds. For P90, h = 9.1. Rank 9 is 1,025 seconds and rank 10 is 3,026 seconds, so the result is 1,025 + 0.1 × (3,026 − 1,025) = 1,225.1 seconds, or 20.418333 minutes. P50 is 13.10 minutes and P95 is 35.425833 minutes. This is a teaching sample, not the population answer.

Stage 3 Verify with Excel

First open L04_Distribution_Reference.xlsx. Main statistics are on Distribution review at A7:C19; full source/eligible/excluded reconciliations are at A24:E27; practice answers are at A43:H47. The 70 group summaries and complete chart tables are on their own sheets. Checks!F6:F66 should display 61 PASS results. These formula checks are useful but do not prove that source input values are correct.

In Percentile check, rows 8–17 contain ten actual source records. Column F is exact elapsed seconds and column G is a live division by 60. In a blank cell type =PERCENTILE.INC(G8:G17,0.9) and compare 20.4183333333 with row 23’s function and manual results. Row 22 is P50 and row 24 is P95. Formula separators may be semicolons in some Excel locales.

For a source timestamp check, copy the first displayed record’s original pickup and drop-off text to A2 and B2 of a new sheet. Use =DATE(VALUE(LEFT(A2,4)),VALUE(MID(A2,6,2)),VALUE(MID(A2,9,2)))+TIME(VALUE(MID(A2,12,2)),VALUE(MID(A2,15,2)),VALUE(MID(A2,18,2))) for the pickup in C2. Use the same formula referring to B2 for the drop-off in D2. Then =(D2-C2)*86400 should be 28 seconds to displayed precision. All source fractional seconds in this snapshot are .000; this spot-check formula is specific to that inspected format. It is not a general parser for future fractional seconds or timezone offsets.

To verify the full population, use a new Excel workbook. Choose Data, From Text/CSV, select L04_Duration_Eligible.csv and choose Transform Data. Remove an automatically added Changed Type step if necessary. Select all columns and set them to Text, then set only the derived duration_minutes column to Decimal Number using locale English (United States). Keep original text and ID columns as Text. Close and Load to a table and name it L04Duration under Table Design. Do not open and resave the frozen source CSV.

CheckExcel formula in your imported table workbook
Numeric eligible duration count=COUNT(L04Duration[duration_minutes])
Full eligible mean=AVERAGE(L04Duration[duration_minutes])
Full eligible median=MEDIAN(L04Duration[duration_minutes])
Full eligible P90=PERCENTILE.INC(L04Duration[duration_minutes],0.9)
Full eligible P95=PERCENTILE.INC(L04Duration[duration_minutes],0.95)
Population standard deviation=STDEV.P(L04Duration[duration_minutes])

Compare the count with 56,479, mean with 18.1974131978, P90 with 26 and P95 with 33.6833333333. Import the separate distance-eligible CSV similarly, convert only distance_miles, name it L04Distance and repeat: count 56,555, mean 31.4891330563, P90 5.6 and P95 7.783. Counts must agree exactly; allow 0.00000001 relative or 0.000000001 absolute numerical difference for these exports. Do not use a rounded display value as the precision benchmark.

Ordinary AVERAGE and PERCENTILE.INC do not automatically exclude rows hidden by a filter. For a subgroup check, create a separate query/table containing that subgroup or copy its visible values into a separate range after explicitly selecting visible cells only. Use the independent eligible CSV for each measure; do not use a duration-filtered table to check the overall distance distribution.

Use L04_Selected_Actual_Records.csv to trace source IDs ending 33024 (largest distance), 2324 (largest duration, confirm the selected-record table if inspecting a different export), plus the marked zero-duration and zero-distance examples. Compare the original strings, derived status and ledger membership. The field source_row is a parsed data-record ordinal, not an Excel worksheet row number; the CSV header adds one worksheet row.

Finally reconcile chart counts from Chart values and L04_Display_Audit.csv. C1 main plus tail equals 56,479; C2’s full panel covers 56,479, and its zoom has 55,920 in frame plus 559 above 60; C3 zero plus main plus tail equals 56,555; C4’s hour counts sum to 56,479. The source’s signed recorded total_amount remains USD 1,267,028.59 in the ledger: USD 1,265,116.73 accompanies duration-eligible rows and USD 1,911.86 accompanies the 76 excluded rows. No unknown total_amount rows occur; blank component amounts remain unchanged.

Review the delivered analysis as a skeptical client reviewer. Give me a concise acceptance checklist and exact Excel verification steps for a user with no programming knowledge. Tie source rows to each exclusive disposition partition; keep the 76-or-other observed zero-duration count visible rather than deleting it. Recalculate P50/P90/P95 on the ten actual eligible sample records using PERCENTILE.INC and the explicit rank formula h=1+(n-1)*p. Check duration mean and percentiles on the complete eligible CSV after importing numeric columns correctly; warn that filtering a table does not make ordinary PERCENTILE.INC ignore hidden rows. Verify one zero-duration record, one zero-distance record, the largest duration and the largest distance against original text.

Reconcile C1 main plus tail, C2 full versus zoom, C3 zero plus main plus tail and C4 hourly counts. Explain the exact 60-minute boundary difference between C1 and C2. For the diagnostic subsets duration<=60 minutes and distance<20 miles, show their counts and means alongside full eligible means, explicitly labeling the subset values as display sensitivity rather than replacement statistics. Explain why a boxplot flier is not a proven data error. Flag tiny borough groups. If a control fails, identify and repair the output then rerun affected checks. Record failures, repairs and tests actually run; leave native Excel and human testing unperformed unless observed.

Practice Compare weekdays and weekends

Use the same January files; no new source acquisition is necessary. Apply Saturday/Sunday to the recorded pickup date, without a holiday calendar. Predict which of the mean, median, P95 and maximum will be most sensitive to the long tail, then execute Prompt 4. Write a short recommendation about which measures to put in an operations discussion, not an unsupported explanation for why they differ.

Practice using the same frozen January data and unchanged eligibility and percentile rules. Classify Saturday and Sunday from the recorded pickup date as Weekend, Monday-Friday as Weekday, and unparseable pickup dates as Unknown; do not apply a holiday calendar or timezone conversion. Independently recompute the definitions and results from original timestamp/distance strings, not copied headline answers.

For Weekday and Weekend, report source rows, duration eligible rows, exclusive duration exclusions, zero-distance counts, independently eligible distance rows and any Unknown group. Report full eligible mean, median/P50, P90, P95, IQR, population standard deviation and maximum separately for duration and distance, with units. Verify both group partitions sum to their overall populations and test selected actual dates, including a weekday, Saturday and Sunday. Explain in no more than 250 words how similar means can hide different central and tail behavior and why these differences cannot be attributed to traffic, driver performance or demand from this dataset alone. Include a short evidence table and a verification log. Do not trim extremes or combine duration and distance eligibility by accident. Export My_L04_Weekday_Weekend_Comparison.csv and My_L04_Practice_Checks.json.

Before opening the instructor answers, check that weekday plus weekend source rows returns the original population and that their separate eligible counts return each corresponding overall view. Report the unknown-day count even if zero. Include source counts and zero-distance counts so a smaller weekend population is not mistaken for lower demand per day. These are trip-weighted distributions; weekday/weekend counts are not normalized for the different number of calendar dates.

Apply the method on a client project

Agree the business unit, timestamps, timezone interpretation and data period with the client. A client’s duration definition may involve overnight activity, pauses, cancellations or service windows. Record any new rule as a versioned decision and show its count and amount effect. Keep an untouched input and an all-row ledger. Preserve unknown values, use complete eligible populations for summary statistics and disclose each chart’s display limits. Investigate extreme records before calling them errors or removing them from a decision metric.

Recover when an output is wrong

If ChatGPT has not read the files, ask it to open them with calculation tools and report actual hashes and counts. If N/A disappears, reload all CSV fields as text with automatic NA recognition disabled. If the mean changes after zooming, ask for statistics recalculated over the full eligible population and a separate display-sensitivity table. If percentile answers disagree, ask for the exact sorted values, interpolation convention and unrounded calculation. Copyable repair prompts are in L04_Copyable_Prompts.txt.

Evidence and version note

This release is L04 v1.0, 24 October 2026. The reference analysis and an independent calculation were executed; the Word/PDF/PNG artifacts and workbook are inspected separately. A limited isolated-context prompt replay is recorded in the validation report. It is not an observed learner session in the ChatGPT product. Native Microsoft Excel, native Word and human usability testing have not been performed. Use the supplied blank supervised-test log to record those observations honestly. No measured learner completion time is claimed.

Full provenance and reuse details are in L04_Source_and_Reuse_Notes.txt and the retained L03 notice. Publisher sources: https://www.nyc.gov/site/tlc/about/tlc-trip-record-data.page and https://data.cityofnewyork.us/d/52n8-nrhw. Statistical function references: https://support.microsoft.com/en-us/excel/functions/percentile-inc-function and https://support.microsoft.com/en-us/excel/functions/stdev-p-function. OpenAI file-analysis guidance: https://help.openai.com/en/articles/8437071-data-analysis-with-chatgpt. These references describe the source or function; numerical findings come from the supplied frozen-file calculations.

How to get started

1
arrow-down-blue

Tell us about your project

2
arrow-down-blue

Interview candidates

(We’ll provide bios within 48 hours on average)

3

Select your consultant and start work

Find a Data & Analytics Consultant

or email us at: [email protected]