p value for two sets having variable x and y

4 visualizaciones (últimos 30 días)
joyce el beyrouthy
joyce el beyrouthy el 25 de Ag. de 2021
Editada: Scott MacKenzie el 24 de Sept. de 2021
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.

Respuestas (2)

Star Strider
Star Strider el 25 de Ag. de 2021
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 comentarios
joyce el beyrouthy
joyce el beyrouthy el 25 de Ag. de 2021
These functions didnt work out because they only accept vectors. I guess a better way to explain what I am trying to do is compare matrices because each set of data has a x and a y. so i have one matrix with x-y and the other set of data is another matrix with other x-y values.
Star Strider
Star Strider el 25 de Ag. de 2021
I am not certain what the problem is.
Perhaps sharing the data would help.
.

Iniciar sesión para comentar.


Scott MacKenzie
Scott MacKenzie el 24 de Sept. de 2021
Editada: Scott MacKenzie el 24 de Sept. de 2021
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)
p1 = 0.8889
% non-parametric test for equal medians
p2 = ranksum(set1, set2)
p2 = 0.8175

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by