Matlab Ttest2 changing significance level
Show older comments
I have two sets of patient age data that I want to compare with a ttest. The sets of data are of different lengths (one vector is 300 rows, the other is 900 rows), and I know their averages are close (30 and 35). That said, when I run the ttest with the default 0.05 significance level it fails to reject. This would normally be fine, I'll just increase the significance level to see where it eventually agrees with the null hypothesis (that their means and variances are equal). Unfortunately, even if I increase the significance level to 0.9999 it does not change, and I'm wondering if its an issue with my data, with the line of code that I've written, or what.
This is what I wrote originally:
[ha,pa] = ttest2(agepen,agegsw);
I eventually changed it to:
[ha,pa] = ttest2(agepen,agegsw,'alpha',0.999);
And the answers for ha and pa were exactly the same (a ridiculously tiny p value by the way, something times 10^-12). Is it my data set or am I miswriting the code?
Thanks a lot!
Accepted Answer
More Answers (0)
Categories
Find more on Noncentral t Distribution in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!