TMP-SCI-204 · Planned course · Unfinished learning resource

Unit 8 explained key and formative rubrics

This key distinguishes reproduced defective output, corrected computations and scientific validity. All input batches are fictional and all comparator draws are synthetic. Equivalent reduced fractions and clearly labeled sensible decimals are accepted. Preserve original evidence and label alternatives. A trace-only answer cannot earn execution-only points; the quiz and project remain separate formative groups without a calibrated pass threshold or accreditation claim.

Readiness

R1

Reproduction means another actual execution under documented source, input, options and environment produces the expected output. Verification asks whether the implementation meets its stated contract, using independent arithmetic, edge cases, invariants and discriminating tests. Scientific validation asks whether the model and inputs adequately represent the intended real process, requiring relevant empirical and domain evidence.

A printed report alone establishes only what was reported. It does not establish an independent rerun, correct code or a valid real-process model. The supplied legacy execution record and hashes document the author's particular reproduction; they are not the learner's execution. Even byte-identical independently reproduced output can preserve the same defect perfectly.

R2

The pooled rate is (2+1)/(8+2)=3/10. The unweighted mean is (2/8+1/2)/2=(1/4+1/2)/2=3/8. Pooling weights each opportunity equally; the unweighted mean gives each batch half the weight despite different opportunity counts. Neither label may be substituted for the other. Rounding each batch percentage first is unnecessary and can introduce a separate numerical discrepancy.

R3

A known zero supplies observed information: no successes among six opportunities. Its numerator contribution is zero and its denominator contribution is six. A missing count supplies no known numerator; under the stated default analysis that batch is withheld from the observed-only rate and separately represented in the complete-eligible missing scenario. Replacing missing with zero asserts an outcome that was not observed. Dropping zero as though it were missing removes valid denominator evidence and can inflate an apparent success rate.

R4

Reject the packet before filtering. Seven binary successes from four opportunities violates the row contract, even if the row would later be excluded as flagged. Otherwise the default filter could conceal invalid source data and a later policy change could expose inconsistent behavior. Validation is about whether the packet is structurally and numerically meaningful under its stated semantics; QC inclusion is a separate analytical policy. Neither substitutes for the other.

Guided reconstruction

G1

A complete issue record identifies these five items:

  1. Accepted zero omitted: truth-value filtering loses B1. Test that an accepted zero count with positive opportunities remains included.
  2. QC ignored: B3 is admitted despite flagged status. Test default exclusion and explicit sensitivity inclusion of the same valid row.
  3. Wrong rate label: an equal-batch mean is called pooled. Use unequal denominators and differing rates such as R2, where the formulas give distinct results.
  4. Stream restarted per batch: identical-length batches receive the same prefix because the generator is reinitialized. Compare all raw draws with one independently generated continuous stream across planned rows, including excluded ones.
  5. Scientific overclaim: reproduced output is called a validated real-process probability. Check whether actual empirical evidence, trial semantics and model assumptions have been evaluated; numerical replay alone cannot establish that claim.

Each correction needs a test directed at its mechanism. A single changed final number does not identify which of several edits mattered. Identical batch counts alone do not prove a reset bug, because they can occur in a correctly generated sequence too.

G2

The truth-value filter rejects zero B1 and missing B4, retaining B2,B3,B5. It never reads QC. Their individual rates are 6/8=3/4, 3/4 and 2/4=1/2; their unweighted mean is (3/4+3/4+1/2)/3=2/3. That is what the legacy labels as pooled. Reinitializing seed 11 before each selected row gives synthetic counts four for B2's first eight draws and one for each of B3/B5's identical first-four-draw prefixes.

This explains the retained defective output. It does not endorse it. An actual reproduction should match the retained source/input/report hashes and command result; a hand trace predicts the output but is not an execution. Keep the original report while presenting corrected results separately.

G3

Default included IDs are B1,B2,B5; flagged exclusion is B3; missing eligible ID is B4. There are five planned rows, three included, one flagged and one missing, so 5=3+1+1. All rows must first pass their value/ID/QC contracts. Eligible rows are B1,B2,B4,B5, a different set from included rows. A flagged-and-missing row would receive only the flagged reason under default precedence, avoiding double-counting exclusions.

G4

Default included successes total 8 and opportunities total 14, hence pooled 4/7. The mean of included batch rates is (0+3/4+1/2)/3=5/12. Among legacy-admitted B2,B3,B5 only, successes total 11 and opportunities total 16, so their actual pooled rate is 11/16, not the legacy mean 2/3. This separates the weighting defect from the admission defects: even holding the legacy set fixed, its label is incorrect. Correcting just the label would still leave the wrong default population.

G5

The default eligible population has 20 opportunities: 14 with known counts and 6 in missing B4. Known successes total 8. If the missing count is any integer from 0 to 6, complete-eligible successes lie between 8 and 14, giving rate bounds 8/20=2/5 and 14/20=7/10. Flagged B3 is outside this population. The bounds do not say the count is zero or six, assign a probability within the interval, explain missingness, estimate a confidence interval or validate the real process. If opportunity counts or binary semantics are wrong, this conditional calculation does not repair them.

G6

Eight is the sum of fictional recorded successes in included B1,B2,B5. Seven is the sum of their particular synthetic counts 0,4,3. The other seven is the supplied model expectation 14×1/2. The synthetic count happens to equal its expectation for this seed and packet; that need not happen generally. Both comparator quantities refer to the same included 14 opportunities, so the population alignment is explicit.

B4's synthetic count 5 belongs to an imagined run under the chosen p. It is not a recovered observation. Inserting it into the missing field would convert a model assumption into purported input evidence and erase the actual gap. No match or mismatch among these three values independently establishes physical independence, model adequacy or a real-process p.

Independent checks

I1

Examples of three small discriminating tests:

Give unique valid IDs and the same valid supplied model fields. Independent hand-derived expected values make these stronger than assertions that merely copy the implementation's own calculation. Additional tests should cover missing, impossible excluded rows and stream order, but those do not replace the three requested isolated checks.

I2

Including flagged B3 adds 3 successes and 4 opportunities: observed totals 11/18, pooled 11/18. Individual included rates are 0,3/4,3/4,1/2, whose mean is 1/2. Eligible opportunities now 24; B4 still contributes 6 missing opportunities. The complete-eligible bounds are 11/24 and 17/24.

Raw simulations remain the same for every row because all planned rows were already drawn in order. Included synthetic successes become 0+4+3+3=10, giving 10/18=5/9; the expected included count is 18×1/2=9. Source data and random draw assignment are unchanged; inclusion policy and the populations summarized change. The option is sensitivity, not evidence that B3 is now reliable or should be selected because its mean happens to equal the supplied p.

I3

If B4 is genuinely known to be zero in a separate hypothetical packet, default included successes remain 8 but opportunities rise to 20. Pooled rate = 2/5. Four included batch rates are 0,3/4,0,1/2, giving mean 5/16. There is no remaining eligible missing count, so both missing-scenario endpoints equal 2/5. Flagged B3 remains excluded.

This is a new asserted observation in an explicitly labeled alternative, not a recovery from the original missing field. In actual work it would require reliable evidence for that zero. Without such evidence, replacing null would be an unjustified imputation. Preserve both packets so the difference and its justification remain visible.

I4

Reversing rows preserves observed success/opportunity totals, pooled rate, mean batch rate, eligibility totals and conditional missing bounds under the same policy. ID lists and the audit order reverse; whole-report byte equality is therefore not expected. Different batch lengths consume different portions of one stream, so per-ID raw draws and synthetic counts may change. Some may coincide; no requirement says each must differ.

Changing only the QC inclusion option leaves input order, opportunities, denominator, seed and all random calls fixed in this design. Therefore raw simulated values assigned to each row must match across policy runs; only the included comparator aggregate changes. These are intentionally aligned comparisons, not independent generated samples. Preserve original order and options when claiming reproduction.

I5

An actual record includes commands, interpreter/version, exit results and fresh output directories. Run the corrected source on worked input, then invoke its saved audit_pipeline.py and input.json with the same include-flagged option into a different directory. Require both manifests to parse with complete status, require all four payloads and recompute their hashes. Compare report.json and summary.txt; invocation/destination paths may make manifests differ. Run all 16 supplied tests and save the result.

The unit test that repeats analysis via an imported module checks repeat behavior and snapshots; it is not by itself a saved-source subprocess replay. The actual replay must invoke the saved file. A trace-only plan can describe expected 4/7 and 5/12 results and checks but cannot claim Python ran. Refusing an existing output and preserving its bytes is useful recovery evidence, not a substitute for the required successful run.

I6

For a missing-only example use a valid accepted row with six opportunities and successes=null. No observed row is included, so pooled and mean rates are null. There are six eligible opportunities whose count could be 0–6, so complete-eligible bounds are[0,1]. The expected included comparator count is 0 because its included opportunity set is empty; that is distinct from an observed rate of zero.

For an all-flagged valid packet under default policy, there are no eligible opportunities. Observed rates are null and both bounds are null because there is no denominator. A known accepted zero-success row with positive opportunities instead has observed rate 0. This distinction prevents silently converting absence of eligible evidence into a measured failure rate.

Claim and evidence audit

H1

A defensible replacement is: “The retained legacy output was reproduced under its documented conditions, including its admission, weighting and reseeding defects. The separate corrected pipeline meets the stated bounded computational checks on the supplied fictional packets. No real-process probability or empirical model validity has been established.” If the learner only traced, replace “was reproduced” with “was traced” for their own work. Tests, hash matches and exact fractions support specific computational claims, not every scientific use someone could make of the result.

H2

Selecting a QC option after seeing which result matches p confounds analytical policy with a desired answer. Report the default policy and the reasons it was chosen, retain and label every planned sensitivity result, and explain the different populations. Agreement with a supplied comparator is not a reason to treat flagged data as reliable. A transparent plan defines policy and comparison questions before outcome inspection; any exploratory changes should be disclosed rather than presented as preplanned confirmation.

H3

A mismatched report hash fails the manifest's completion/integrity check, regardless of whether the displayed number looks plausible. Preserve the directory as incomplete or inconsistent, identify whether writing was interrupted or bytes changed, and rerun into a new directory after diagnosis. A later complete record needs a parseable complete manifest, all four payloads with matching hashes, correct source/input/options/environment and the relevant computation/tests. Manually editing the hash to bless a guessed report would not establish the missing execution. Hashes alone still do not authenticate authorship or scientific validity.

Quiz rubric: 30 formative points

Q1 [6]

Default decisions are A included, B included, C flagged, D missing, E included. Known successes = 0+3+3=6; included opportunities = 3+6+3=12. Pooled rate = 1/2. Mean batch rate=(0+1/2+1)/3=1/2. The formulas coincide for this distribution of rates and weights, not because they are generally identical. Award 2 for decisions/population,1 for totals,1 for pooled rate,1 for mean rate and 1 for explaining the coincidence. R2 or the worked fixture provides a counterexample to interchangeability.

Q2 [6]

With C included, successes 8 and opportunities 14 give pooled 4/7. Mean batch rate=(0+1/2+1+1)/4=5/8. Default eligible opportunities 16 include four missing opportunities, so bounds[6/16,10/16]=[3/8,5/8]. With flagged inclusion, eligible opportunities 18 give bounds[8/18,12/18]=[4/9,2/3]. Award 2 for sensitivity totals/rates,2 for both bound pairs and 2 for explicitly naming default versus sensitivity populations and the missing-count assumption. Neither bound pair is a confidence interval or imputed count.

Q3 [6]

Default included IDs A,B,E have synthetic counts 1,5,2, totaling 8 over 12 opportunities, synthetic rate 2/3. Expected included count under p = 1/2 is 6. Fictional recorded successes also total 6, giving observed rate 1/2. Award 2 for synthetic count/rate,1 for expectation,1 for distinguishing observed input and supplied model, and 2 for bounded interpretation. Equality of expectation and observed count in this example is not model validation, and a synthetic count 8 is not an error merely because it differs from 6. No probability estimate for a real detector follows.

Q4 [6]

The legacy admits B,C,E because each success count is positive. Their rates are 1/2,1,1, whose unweighted mean is 5/6. Their actual pooled rate is(3+2+3)/(6+2+3)=8/11. It loses accepted zero A and ignores flagged C; D is missing and should not contribute an observed count, but the legacy's generic truth test cannot distinguish its meaning from A. Award 1 for admitted IDs,1 for legacy mean,1 for actual pooled rate and 3 for the zero/QC/weighting diagnoses. Reproducing 5/6 would reproduce the defect, not correct it.

Q5 [6]

Use fresh destinations, preserve source/input, retain the include_flagged option and interpreter, check manifests/payload hashes, and compare report/summary under matching conditions. Preserve any interrupted output and use a new directory after diagnosis. Award 1 each for safe paths/snapshots, option/environment provenance, completion/hash checks, meaningful comparisons and recovery/honest evidence. The sixth point requires actual supported quiz execution and saved-source replay. Trace-only ceiling 5/6. Copying an output folder or citing the author's record is not learner execution.

Capstone project rubric: 40 formative points

P1 [8]

Default included IDs P1,P2,P5,P6 contribute successes 0+6+3+8=17 and opportunities 4+12+6+10=32, pooled 17/32. P3 is flagged; P4 is missing. Included rates 0,1/2,1/2,4/5 have unweighted mean 9/20. Eligible opportunities 37 include five missing opportunities, giving bounds[17/37,22/37]. Planned 6= included 4 + flagged 1 + missing 1.

Award 2 for contract/semantics and policy,2 for decisions/totals,2 for both rates and 2 for bounds plus reused reasoning checks. Useful connections include Unit 1/5 denominator and missing distinctions, Unit 2 boundaries/provenance, Unit 3 exact arithmetic, Unit 4 independent checks, Unit 6 computational-versus-physical validity and Unit 7 controlled streams. Listing unit names without actually applying their reasoning is not enough for the explanation component.

P2 [8]

Three conceptual points cover a safe preservation/new-directory plan; a correct option/environment/hash/comparison plan; and honest execution status with recovery handling. The other five require actual evidence: 1 for successful base and sensitivity runs,1 for invoking the sensitivity run's saved source/input with --include-flagged,1 for verifying manifest payload hashes across those runs,1 for equal replay report/summary outputs under matching options, and 1 for the recorded 16-test result. Maximum trace-only score 3/8.

Omitting the flag during replay changes the analysis even with identical input bytes and source. The expected policy-specific report may differ, so that is not a successful reproduction of the flagged run. Report command/exit evidence and do not quietly relabel a different result as equivalent. Preserved legacy evidence remains separate from corrected outputs.

P3 [8]

Alternative A, original data with flagged P3 admitted: successes 20, opportunities 35, pooled 4/7. Rates 0,1/2,1,1/2,4/5 average 14/25. Eligible opportunities 40 include five missing opportunities, so bounds[20/40,25/40]=[1/2,5/8].

Alternative B, default QC with P4 reliably observed as zero: successes 17, opportunities 37, pooled 17/37. Rates 0,1/2,0,1/2,4/5 average 9/25. No eligible missing count remains, so both bounds equal 17/37. Flagged P3 remains excluded.

Award 3 for each alternative's rates/bounds and 2 for explaining the distinction and preserving labeled inputs/options. Alternative A changes inclusion policy; B changes information about a count. Neither is automatically an authorized factual correction to real data, and the hypothetical zero must not be presented as recovered from the original packet. Both are different from inserting a simulated count into the missing field.

P4 [8]

Default included synthetic counts are P1=3,P2=10,P5=3,P6=6, totaling 22. Their synthetic rate 22/32=11/16. Model expected count is 32×2/3=64/3. Recorded successes total 17, giving 17/32. These three counts have different origins: fictional input, one seeded synthetic realization and model expectation.

Award 2 for correct included synthetic count/rate,2 for expectation and observed comparison,2 for explaining model-versus-data distinctions and 2 for the missing-data limitation. P4's generated 4 is not an observation and cannot close its missing count. No fit test, causal claim, operational reliability guarantee or inferred real p is supplied. A defensible statement reports the disagreement for this specified packet/model/seed and names untested common-p/independence and data-quality assumptions.

P5 [8]

A strong dossier preserves legacy source/input/report identities and labels them intentionally defective. It links zero retention, QC decisions, rate weighting and stream construction to discriminating regression tests, then gives corrected source/input/options/output identities and actual execution status. Its readable findings state the population, denominator, missing assumptions and exact or clearly rounded quantities rather than only a percentage.

Award 2 for preserved issue/evidence history,2 for defect-to-test links,2 for accessible conclusions and explicit scientific limits, and 2 for honest execution/recovery plus concrete next validation work. A relevant next step is to define and collect actual binary opportunities with trustworthy batch/item identifiers and QC criteria, examine dependence/common probability and obtain competent domain review. This unit does not itself authorize data collection or supply that empirical validation. Integration/readiness, learner execution access and specialist moderation are separate from a passing local capstone artifact.

Delayed transfer

D1

With repeated inspections, the pooled numerator and denominator describe successful inspection events among recorded opportunities. They do not automatically describe the fraction of distinct physical items that pass once, pass every inspection or ever pass. Repeated events from one item may also be dependent. A revised analysis needs stable item identifiers, inspection/time identifiers, a declared item-level outcome rule, duplicate/visit handling and an appropriate dependence model. The current row sums alone cannot recover those identities. Do not silently deduplicate or claim a population-item proportion without that information.

D2

Four binary successes from three opportunities violates successes≤opportunities and must be rejected under the current contract. Multiple defects per item are counts with different semantics, not one success/failure indicator per item. A defect rate 4/3 defects per inspected item can be meaningful, but it is not a probability and may exceed one. A new schema/model must define defects, items and repeated counting, use appropriate denominators and update validation, tests and interpretation. Clamping four to three would destroy information; simply relabeling the existing Bernoulli comparator would misrepresent its model.