statys.utils.wrappers

Wraps common-based functions for easier development.

class statys.utils.wrappers.Distribution(*args)

A class that serves as the foundation for calculating statistical analysis. In other words, one can interpret this class as the population.

__init__(self, *args)

Initialization method.

__repr__(self)

Class’ string representation.

Returns

String representation.

Return type

(str)

property attrs(self)

Gathers all attributes from class.

Returns

Attributes encoded into a dictionary.

Return type

(Dict[str, Any])

statys.utils.wrappers.calculate_hypothesis(p: float, alpha: float)

Calculates whether hypothesis’ rejection fails or not according to a significance value.

Parameters
  • p – P-value from a statistical test.

  • alpha – Significance value.

Returns

1 if hypothesis is rejected and 0 if it failed to be rejected.

Return type

(bool)

statys.utils.wrappers.measure_pipeline(measure: callable, dist: statys.core.distribution.Distribution, **kwargs)

Wraps the pipeline of conducting a measure.

Parameters
  • measure – Pointer to a measure function.

  • dist – Distribution to be analyzed.

Returns

Test’s outputs.

Return type

(Dict[str, Any])

statys.utils.wrappers.statistical_pipeline(test: callable, dist: statys.core.distribution.Distribution, alpha: float)

Wraps the pipeline of conducting a statistical test and calculating its hypothesis.

Parameters
  • test – Pointer to a statistical test.

  • dist – Distribution to be analyzed.

  • alpha – Significance value.

Returns

Test’s outputs.

Return type

(Dict[str, Any])