Skip to content

sam::TestStrategy

Abstract class for defining test strategies. More...

#include <TestStrategy.h>

Inherited by sam::FTest, sam::TTest, sam::WilcoxonTest, sam::YuenTest

Public Types

Name
enum TestMethod
enum TestAlternative

Public Functions

Name
virtual ~TestStrategy() =0
virtual void run(Experiment * experiment) =0
virtual void run(DependentVariable & group_1, DependentVariable & group_2) =0
virtual float alpha()
std::unique_ptr< TestStrategy > build(json & test_strategy_config)

Public Attributes

Name
float alpha_

Detailed Description

class sam::TestStrategy;

Abstract class for defining test strategies.

Statistical test strategies will investigate if there is a meaningful difference between means of two samples. Every test strategy should provide a run() method. The run() method will accept a pointer to the experiment and update necessary variables, e.g., statistics & p-value.

Public Types Documentation

enum TestMethod

Enumerator Value Description
TTest TTest.
FTest FTest.
YuenTest YuenTest.
WilcoxonTest WilcoxonTest.

Specifying the significant testing method

enum TestAlternative

Enumerator Value Description
Less
Greater
TwoSided

Specify the side of the test

Public Functions Documentation

function ~TestStrategy

virtual ~TestStrategy() =0

function run

virtual void run(
    Experiment * experiment
) =0

Reimplemented by: sam::TTest::run, sam::FTest::run, sam::YuenTest::run, sam::WilcoxonTest::run

function run

virtual void run(
    DependentVariable & group_1,
    DependentVariable & group_2
) =0

Reimplemented by: sam::TTest::run, sam::FTest::run, sam::YuenTest::run, sam::WilcoxonTest::run

function alpha

inline virtual float alpha()

function build

static std::unique_ptr< TestStrategy > build(
    json & test_strategy_config
)

Public Attributes Documentation

variable alpha_

float alpha_;

Updated on 29 June 2021 at 16:13:47 CEST


Last update: 2021-09-18