Propability of x being less than y

11 vues (au cours des 30 derniers jours)
Markus Similä
Markus Similä le 7 Juil 2022
Modifié(e) : Torsten le 7 Juil 2022
I have a few pairs of data points (x,y)(less than 20).
How can I calculate the overall probability of x being less than y?
The differences of x and y range from -500 to 500.
I need the p-value(null hypothesis being that the difference is 0.) and the uncertainty boundaries for the difference x-y.

Réponse acceptée

Chunru
Chunru le 7 Juil 2022
Modifié(e) : Torsten le 7 Juil 2022
In statistics toolbox, you can do the following:
x = randn(20, 2) * 200;
[h, pvalue, ci] = ttest2(x(:, 1), x(:, 2))

Plus de réponses (0)

Catégories

En savoir plus sur Descriptive Statistics and Visualization dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by