Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The best way to compare two different groups is using <strong>analysis of variance</strong>. Analysis of variance (ANOVA) is a collection of statistical models used to analyze the differences between group means and their associated procedures (such as "variation" among and between groups). You should use ANOVA. also there are some functions included in MATLAB like: anova1, ...</p> <pre><code>p = anova1(X,group) </code></pre> <p>The standard ANOVA table divides the variability of the data into two parts:</p> <p>1- Variability due to the differences among the column means (variability between groups) 2- Variability due to the differences between the data in each column and the column mean (variability within groups)</p> <p>Example 1 (from mathworks) Create X with columns that are constants plus random normal disturbances with mean zero and standard deviation one:</p> <pre><code>X = meshgrid(1:5) X = 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 X = X + normrnd(0,1,5,5) X = 1.3550 2.0662 2.4688 5.9447 5.4897 2.0693 1.7611 1.4864 4.8826 6.3222 2.1919 0.7276 3.1905 4.8768 4.6841 2.7620 1.8179 3.9506 4.4678 4.9291 -0.3626 1.1685 3.5742 2.1945 5.9465 </code></pre> <p>Perform one-way ANOVA:</p> <pre><code>p = anova1(X) p = 7.9370e-006 </code></pre> <p>You can see the anova table:</p> <p><img src="https://i.stack.imgur.com/fCKmc.gif" alt="enter image description here"></p> <p>and also a box-plot related to the analysis:</p> <p><img src="https://i.stack.imgur.com/j5kXV.gif" alt="enter image description here"></p> <p>There are of course more function in MATLAB that you can check.</p> <p>Actually I don't get the meaning of your image, you can easily add the line after plotting the scatter. using 'hold on' command.</p> <p>Check these links for more information and examples. <a href="http://www.statsoft.com/textbook/anova-manova/" rel="nofollow noreferrer">link - 1</a> <a href="http://case.truman.edu/Documents/SPSS%20One-Way%20ANOVA.pdf" rel="nofollow noreferrer">link - 2</a> <a href="http://www.alivelearn.net/?p=1494" rel="nofollow noreferrer">link - 3</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload