# Quality report — student-health-yrbs2023-r1

**Overall: PASS** — 87 of 87 checks passed on the finished release CSV (`data/student_health_yrbs2023.csv`, 2,289,195 bytes, SHA-256 `bea209414d4d3e0201f400d3161689a70e48b35385b8900322545047cadf6999`). The same checks are re-run on the CSV inside the release archive after packaging (repository record `specs/datasets/student-health-yrbs-2023/release/archive_verification.json`).

## Acceptance tests

| Check | Required | Observed in the release CSV | Result |
|---|---:|---:|---|
| Total respondent rows | 20,103 | 20,103 | PASS |
| Valid social media frequency, Q80 | 15,203 | 15,203 | PASS |
| Valid mental health frequency, Q84 | 15,705 | 15,705 | PASS |
| Valid school-night sleep, Q85 | 17,441 | 17,441 | PASS |
| A-F grade, Q87 codes 1-5 | 15,694 | 15,694 | PASS |
| Social media + mental health | 11,602 | 11,602 | PASS |
| Social media + grades (A-F) | 13,793 | 13,793 | PASS |
| Sleep + grades (A-F) | 13,937 | 13,937 | PASS |
| Social media + sleep + grades (A-F) | 12,516 | 12,516 | PASS |
| All four measures, with an A-F grade | 10,206 | 10,206 | PASS |
| Frequent social media use, Q80 codes 6-8 (of 15,203 valid) | 11,872 | 11,872 | PASS |
| Survey-weighted frequent social media use with design-based 95% CI, at CDC's published precision (%) | 77.0 / 73.5 / 80.1 | 77.0 / 73.5 / 80.1 | PASS |
| Same estimate at four decimals, against the independently computed result (%) | 76.9704 / 73.5068 / 80.1037 | 76.9704 / 73.5068 / 80.1037 | PASS |
| The simple unweighted share (78.09%) is reported and is NOT the benchmark | 78.09 and different from 77.0 | 78.09 | PASS |

The weighted check uses the survey design described in `docs/METHODOLOGY.md`. The published CDC value is from https://www.cdc.gov/mmwr/volumes/73/su/su7304a3.htm.

## Structure

| Check | Result | Observed |
|---|---|---|
| Header equals the documented column list, in order | PASS | 35 |
| record_number is exactly 1..20103 in file order | PASS | 1..20103 |
| Every survey_weight is positive | PASS | 0 |
| Weights sum to the sample size (CDC scaling), within 0.05 | PASS | 20103.0074 |
| survey_weight is never empty | PASS | 0 |
| stratum is never empty | PASS | 0 |
| psu is never empty | PASS | 0 |
| 16 strata, 89 PSUs, no stratum with a single PSU (no lonely-PSU rule needed) | PASS | 16 / 89 / 0 |

## CDC codebook comparison

| Check | Result | Observed |
|---|---|---|
| q80_social_media_frequency: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q80_social_media_frequency: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q84_poor_mental_health_frequency: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q84_poor_mental_health_frequency: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q85_school_night_sleep_hours: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q85_school_night_sleep_hours: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q87_self_reported_grades: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q87_self_reported_grades: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| qn80_social_media_several_times_a_day_or_more: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| qn80_social_media_several_times_a_day_or_more: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| qn84_poor_mental_health_most_of_the_time_or_always: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| qn84_poor_mental_health_most_of_the_time_or_always: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| qn85_sleep_8_or_more_hours: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| qn85_sleep_8_or_more_hours: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| qn87_grades_mostly_a_or_b: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| qn87_grades_mostly_a_or_b: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q1_age: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q1_age: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q2_sex: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q2_sex: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q3_grade_level: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q3_grade_level: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q4_hispanic_or_latino: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q4_hispanic_or_latino: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q5_race_selected: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q5_race_selected: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| race_ethnicity: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| race_ethnicity: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q76_days_active_60_minutes: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q76_days_active_60_minutes: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q77_pe_class_days: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q77_pe_class_days: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q78_sports_teams: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q78_sports_teams: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q97_muscle_strengthening_days: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q97_muscle_strengthening_days: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q75_breakfast_days: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q75_breakfast_days: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q69_fruit_frequency: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q69_fruit_frequency: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q70_green_salad_frequency: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q70_green_salad_frequency: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q74_soda_frequency: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q74_soda_frequency: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q96_plain_water_frequency: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q96_plain_water_frequency: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q24_bullied_at_school: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q24_bullied_at_school: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q25_electronically_bullied: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q25_electronically_bullied: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q103_feel_close_to_people_at_school: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q103_feel_close_to_people_at_school: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |
| q86_usual_sleeping_place: unweighted frequency of every code and of missing equals CDC's codebook | PASS | all equal |
| q86_usual_sleeping_place: weighted percentage of every code within rounding (0.05 pt) of CDC's codebook | PASS | all within |

## Consistency with CDC definitions

| Check | Result | Observed |
|---|---|---|
| qn80_social_media_several_times_a_day_or_more equals CDC's numerator/denominator definition applied to q80_social_media_frequency | PASS | 0 |
| qn84_poor_mental_health_most_of_the_time_or_always equals CDC's numerator/denominator definition applied to q84_poor_mental_health_frequency | PASS | 0 |
| qn85_sleep_8_or_more_hours equals CDC's numerator/denominator definition applied to q85_school_night_sleep_hours | PASS | 0 |
| qn87_grades_mostly_a_or_b equals CDC's numerator/denominator definition applied to q87_self_reported_grades | PASS | 0 |
| q80_social_media_frequency_label is empty exactly when its code is empty | PASS | 0 |
| q84_poor_mental_health_frequency_label is empty exactly when its code is empty | PASS | 0 |
| q85_school_night_sleep_hours_label is empty exactly when its code is empty | PASS | 0 |
| q87_self_reported_grades_label is empty exactly when its code is empty | PASS | 0 |
| race_ethnicity equals CDC's documented rule applied to q4 and q5 (users guide, Calculated Variables) | PASS | {"mismatches": 0, "examples": []} |
| q87 keeps A-F (1-5), 'None of these grades' (6), 'Not sure' (7) and blank distinct | PASS | {"6": 79, "7": 762, "blank": 3568} |

## Independent raw re-read

| Check | Result | Observed |
|---|---|---|
| Every code, design and race cell equals an independent fixed-width re-read of the verified CDC file | PASS | {"cells_checked": 603090, "mismatches": 0} |

## What these checks do not establish

- They verify that the file faithfully reproduces CDC's data and published figures. They do not validate the survey itself: self-report error, nonresponse bias and question wording are properties of the source.
- The codebook comparison covers every included CDC variable; `record_number` and the `_label` columns are checked for structure and consistency.
- This dataset carries no certification claim.
