47 virtual ~
Sample() =
default;
51 bool operator==(
const Sample&)
const =
delete;
55 virtual SizeType
get_size()
const = 0;
58 virtual ValueType
get_mean()
const = 0;
64 virtual void enumerate(
const Enumerator& enumerator)
const = 0;
83 enum class HypothesisStatus
90 typedef std::function<HypothesisStatus(double)> Hypothesis;
98 zero_point_five_percent,
100 two_point_five_percent,
106 typedef std::function<HypothesisStatus(Confidence)> HypothesisForWellKnownConfidence;
Executing the test returns a set of hypothesis that have to be evaluated at the desired confidence le...
Definition: Statistics.h:171
Hypothesis both_means_are_equal
H0, both means are equal.
Definition: Statistics.h:174
std::function< void(ValueType)> Enumerator
Definition: Statistics.h:44
The Sample class models the interface to a sample of raw observations and their statistical propertie...
Definition: Statistics.h:36
Definition: OnlineAccountClient.h:39
Result for_normality(const Sample &sample)
for_normality evaluates a given sample to check if its underlying distribution is normal...
Definition: Statistics.cpp:37
Implements the Anderson-Darling test for normality for the case of empirical mean and variance...
Definition: Statistics.h:109
virtual void enumerate(const Enumerator &enumerator) const =0
Top-level namespace for all things Unity-related.
Definition: Version.h:49
virtual ValueType get_variance() const =0
virtual ValueType get_mean() const =0
std::size_t SizeType
Definition: Statistics.h:40
virtual SizeType get_size() const =0
Implements different variants of the Student's T-test (see http://en.wikipedia.org/wiki/Student's_t-t...
Definition: Statistics.h:165
double t
The t value of the test.
Definition: Statistics.h:173
Hypothesis sample1_mean_lt_sample2_mean
H1, sample1 mean < sample2 mean.
Definition: Statistics.h:175
Executing the test returns a set of hypothesis that have to be evaluated at the desired confidence le...
Definition: Statistics.h:115
Hypothesis sample1_mean_gt_sample2_mean
H2, sample1 mean > sample2 mean.
Definition: Statistics.h:176
Result one_sample(const Sample &sample, Sample::ValueType mean, Sample::ValueType std_dev)
one_sample calculates the Student's T test for one sample and a known mean and std. dev..
Definition: Statistics.cpp:90
Result two_independent_samples(const Sample &sample1, const Sample &sample2)
two_independent_samples calculates the Student's T test for two samples
Definition: Statistics.cpp:124
double ValueType
Definition: Statistics.h:42
HypothesisForWellKnownConfidence data_fits_normal_distribution
H0, data is normally distributed.
Definition: Statistics.h:117