Skip to content

Contrib/Piedmont/StevensStatistics/9-HypothesisTestingTwoSamples/9.1.2.pg #1428

@dlglin

Description

@dlglin

Problem Seed: 1133

With this seed the @d array is all zeros, which means that $s is 0, so the calculation of $t leads to a division by zero error.

I see two ways to fix this:

  1. If you want to allow a data set where the left and right are always identical, then add a conditional that sets $t=0 if $s==0, skipping the more general calculation of $t.
  2. Beef up the do... until loop to skip cases where $s==0, which would mean a student would never get a case when the standard deviation is 0.

Tagging @d-torrance since this is a Piedmont Contrib problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions