- anocova (To test for an overall difference): www.mathworks.com/help/stats/anocova.html
- multcompare (To find which specific pairs are different): www.mathworks.com/help/stats/multcompare.html
predint : How can I check if there is a significant difference among 5 approximate lines?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello, If anyone has any information, please let me know about, how I can check if there is a significant difference between the five approximate lines?
I have data of the experiment of coffee tasting.
I asked the participants to taste 5 different coffees for 1 minute and evaluate the taste on a 10-point scale.
The independent variable is the 10-point rating of "taste," and the dependent variable is the amount of coffee drunk in increments of 1 second and the rate of increase in the amount of coffee drunk in increments of 1 second during 30 seconds.
After approximating the data with the fit function for each type of coffee, the data were run through prendit to obtain five approximate lines and 95% confidence intervals.
In addition to finding significance, is there any other function that can give me a numerical representation of "which lines are different"?
By eye, "the third and fourth approximate lines are almost the same up to 30 seconds", "there is a big difference in the angle between the second and the sixth for the first 10 seconds", "the first to the fifth have a maximum value of 10, and the sixth and after have a maximum value of around 7." I can understand these differences sensibly, but I would like to know if they are significant and how much and where the differences are numerically significant.
0 commentaires
Réponses (1)
Harsh
le 24 Juil 2025
Hi @phi
To statistically prove the differences you're seeing between the coffee tasting trend lines, you can follow a straightforward, two-step statistical approach.
First, to determine if there is any significant difference among your five lines, the ideal tool is an Analysis of Covariance (ANCOVA). In MATLAB, you can use the "anocova" function for this. It will formally test whether the slopes or intercepts of your fitted lines are statistically different as a group.
Second, to find out exactly which specific lines are different from each other (e.g., Coffee 2 vs. Coffee 4), you would run a post-hoc test immediately after the ANCOVA. The "multcompare" function is perfect for this, as it provides a clear table showing the pairwise differences and their significance. This directly answers your question about getting a numerical representation of which lines are different.
Please refer to the following documentation to understand more about these funcitons-
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!