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

t-test is equal for paired and unpaired samples #420

Open
MawiraIke opened this issue Feb 22, 2020 · 1 comment
Open

t-test is equal for paired and unpaired samples #420

MawiraIke opened this issue Feb 22, 2020 · 1 comment

Comments

@MawiraIke
Copy link
Contributor

The Welch's test is used to calculate the t-test for paired samples in incanter.stats.

(let [t-stat (if one-sample?
                 (/ (- x-mean mu) (/ (sqrt x-var) (sqrt n1)))
                 ;; calculate Welch's t test
                 (/ (- x-mean y-mean) (sqrt (+ (/ x-var n1) (/ y-var n2)))))

A dependent t-test for paired samples can be used since the samples are dependent. The Welch's test then can be used for independent samples.
Fixing this on my fork and making a PR.

@MawiraIke
Copy link
Contributor Author

MawiraIke commented Feb 23, 2020

While fixing this issue i made the observation that var-equal option in (t test ) function in incanter.stats is not used. Perhaps it was to be used to determine samples with equal variances and then use a Student T-test and not Welch's test? The current operation is all calculations are done using the Welch's test unless it is a one sample.

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

1 participant