datasets

Module for managing sample/population data

  • class DataSet: contains sample or population data

  • class DataSets: base class for managing data sets

final class boring_math.probability_distributions.datasets.DataSet(*data: int | float, sample: bool = False)

Class containing sample or population data.

  • all data internally stored as floats (even integer data)

  • data sorted smallest to largest

  • methods provided to

    • read in data from a file

    • computing data statistics

    • add or remove data

__init__(*data: int | float, sample: bool = False) None
__weakref__

list of weak references to the object

classmethod read_data_from_file(file_name: str, sample: bool = False) MayBe[Self]

Read in data from a text file, return a DataSet object.

The text file should

  • have one number (float) per line and calculate statistics

    • if sample is true (default), calculate sample stats

    • if sample is false, calculate population stats

  • blank lines and lines beginning with ‘#’ are ignored

class boring_math.probability_distributions.datasets.DataSets

Base class for managing data sets.

  • data sets can be samples or populations

  • methods provided to

    • add or remove data sets

    • plot data sets

  • how they are related to each other is up to the user of the class

__init__() None
__weakref__

list of weak references to the object