Which stasticial test is best to use in my case?

3 ビュー (過去 30 日間)
Sepp
Sepp 2018 年 4 月 20 日
回答済み: TED MOSBY 2024 年 9 月 20 日
Hello
I've conducted an experiment with around 100 people. I have 48 male and 52 female. Now I would like to accept or reject the following three hypothesis (i.e. to determine the p-value):
  1. There is a difference in performance between male and female (The people had to perform some tasks which gives me a continuous performance value for every person, i.e. I have a value per person).
  2. There is a difference in performance between groups of people (independent of the gender). The performance metric is the same as under 1. but now I have divided the people in four different groups. The groups have unequal sizes.
  3. There is a difference in performance depending on the age of people (I have also recorded the age of the people). I have ages from 18 to 30. For example, for age 18 I only have one person, for other ages there are multiple persons.
What statistical test (like t-test, ANOVA, chi-squared, Friedmann, Kruskal-Wallis, Mann-Whitney) would be appropriate for the three cases described above?
Second, does it matter if I choose There is a difference in performance between male and female or the negation There is no difference in performance between male and female as the null hypothesis?

回答 (1 件)

TED MOSBY
TED MOSBY 2024 年 9 月 20 日
Hi,
I found some matlab functions for all the 3 cases, have a look at these below:
1. Difference in Performance Between Male and Female
Test: Use the "ttest2" function for an independent samples t-test if the data is normally distributed. If not, use "ranksum" for the Mann-Whitney U test.
MATLAB Function:
h = ttest2(malePerformance, femalePerformance)
for t-test.
p = ranksum(malePerformance, femalePerformance)
for Mann-Whitney U test.
2. Difference in Performance Between Groups
Test: Use "anova1" for one-way ANOVA if the data is normally distributed and variances are equal. If not, use "kruskalwallis" for a non-parametric test.
MATLAB Function:
p = anova1(performanceGroups, groups)
for ANOVA.
p = kruskalwallis(performanceGroups, groups)
 for Kruskal-Wallis test.
3. Difference in Performance Depending on Age
Test: Use "fitlm" for linear regression if age is treated as a continuous variable. If age is treated as categorical, use "anova1" or "kruskalwallis".
MATLAB Function:
mdl = fitlm(ages, performance)
  •  for linear regression.
p = anova1(performance, ageGroups)
% or 
p = kruskalwallis(performance, ageGroups)
  •  if age is categorical.
Null Hypothesis Consideration
  • Null Hypothesis: In MATLAB, the null hypothesis is generally the default assumption of no effect or no difference. For example, "ttest2" assumes no difference in means between two groups as the null hypothesis.
Refer these links for the above MATLAB functions used.
Hope this helps!

カテゴリ

Help Center および File ExchangeHypothesis Tests についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by