Input varaibles ttest2

3 views (last 30 days)
Fanny Bergman
Fanny Bergman on 14 Aug 2020
Commented: Fanny Bergman on 18 Aug 2020
Is it possible to use scalars as input in ttest2? I would like to write something like this; [h, p]=ttest2(average1, average2, variance1, variance2, N1, N2, 'Vartype', 'unequal')
What I want to do is check if there is a difference in means between two measured populations with different variances. Only problem is have large amounts of data and only save the averages and variances for each iteration through a loop, and thus have not got easy access to the full data set needed as input to ttest2. Any suggestions on how to work around this problem would be higly appreciated.
  2 Comments
Rik
Rik on 14 Aug 2020
It might be easier to manually calculate the test statistic. See the doc for more information.
Alternatively you could generate data with this average and variance, although you will have to do some assumptions about your distributions.
Fanny Bergman
Fanny Bergman on 18 Aug 2020
Thanks for your input! I think I'll go for the manual way then

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!