Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Add hypothesis test tutorial #317

Open
KronosTheLate opened this issue Jul 21, 2022 · 2 comments
Open

[FR] Add hypothesis test tutorial #317

KronosTheLate opened this issue Jul 21, 2022 · 2 comments

Comments

@KronosTheLate
Copy link

I would LOVE to see a baysean Turing.jl implementation of some standard frequentist hypothesis tests. E.g. if the mean of some dataset is above 0, or if the difference in mean between both paired and unpaired data are e.g. above 5. The paired case would be the same as the single dataset case, which could be mentioned in a single sentence, making "paired test" searchable.

@yebai
Copy link
Member

yebai commented Jul 24, 2022

Thanks, @KronosTheLate for the suggestions - would you like to make your suggestion a bit more concrete, e.g. by listing an existing method/implementation for such a test?

@KronosTheLate
Copy link
Author

KronosTheLate commented Jul 24, 2022

Something like the following, with the following being performed in a frequentist approach:

julia> using StableRNGs, Random

julia> rng = StableRNG(123);

julia> Random.seed!(rng, 123);

julia> xs = rand(Normal(0.5, 1), 50);

julia> using HypothesisTests

julia> OneSampleTTest(xs)
One sample t-test
-----------------
Population details:
    parameter of interest:   Mean
    value under h_0:         0
    point estimate:          0.559113
    95% confidence interval: (0.2593, 0.8589)

Test summary:
    outcome with 95% confidence: reject h_0
    two-sided p-value:           0.0005

Details:
    number of observations:   50
    t-statistic:              3.7479190960339515
    degrees of freedom:       49
    empirical standard error: 0.1491795406494802

I am looking for some way of comparing two hypotheses, e.g. mean=0 to mean=1, or mean > 0 vs mean < 0, in a bayesian framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants