p value for two sets having variable x and y
8 ビュー (過去 30 日間)
古いコメントを表示
Hello all. I have a question about statistics. I have two sets of data. each set of data has an x and a y value (in more details, for each concentration "x" a surface charge "y" is measured experimentally. and this was done for two different membranes in the experiment). SO: I have a set of x and y for system 1 and a set of x and y for system 2.
My question is: how can make sure that these two sets are significantly different?
I am familiar with the t-test and getting the value of p. how does that work when "x" is not the same for the two sets of data??
Happy to elaborate further if this is not clear and thank you in advance.
0 件のコメント
回答 (2 件)
Star Strider
2021 年 8 月 25 日
The most appropriate measure might be the ranksum test if the experiments are unpaired (for example an intervention and control group), and signrank if paired (the same group before and after an intervention).
The advantage of these is that the groups have to have the same distribution, however that distribution may be unknown.
There may be other options as well, however on the basis of the information provided, these would seem to be appropriate.
.
3 件のコメント
Star Strider
2021 年 8 月 25 日
I am not certain what the problem is.
Perhaps sharing the data would help.
.
Scott MacKenzie
2021 年 9 月 24 日
編集済み: Scott MacKenzie
2021 年 9 月 24 日
Since for each system, y is the measured response for x, you can reduce the data for that set to x-y. Also, since the systems use different membranes, the data sets are independent or unpaired. Depending on the assumptions for the underlying data you can use either ttest2, the parametric two-sample t-test, or ranksum, the non-parametric test for unpaired data. Generally, these two tests give the same or similar results. Since the samples are independent, there is no need to have the same number of measurements in each set. Here's an example:
% 10 measurements for system 1
x1 = rand(10,1);
y1 = rand(10,1);
set1 = x1-y1;
% 12 measurements for system 2
x2 = rand(12,1);
y2 = rand(12,1);
set2 = x2-y2;
% parametric test for equal means and variances
[~, p1] = ttest2(set1, set2)
% non-parametric test for equal medians
p2 = ranksum(set1, set2)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Hypothesis Tests についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!