In the two examples for the signtest function of non-parametric estimation in matlab shown in https://www.mathworks.com/help/stats/signtest.html#bti4471-7, the p-values do not affect the hypothesis tesing outcome. Is this correct? Please help with a clarification if you used it often, it is very much appreciated. AUSER

 採用された回答

Star Strider
Star Strider 2019 年 11 月 12 日

0 投票

From the documentation:
[p,h] = signtest(___) also returns a logical value indicating the test decision. The value h = 1 indicates a rejection of the null hypothesis, and h = 0 indicates a failure to reject the null hypothesis at the 5% significance level.
Also see the documentation for h.

5 件のコメント

Liping Ai
Liping Ai 2019 年 11 月 12 日
Thank you! Here is my question. The decision h is supposed to be made according to the p-value and the set significance level. But in the two examples, the p-values appear to be irrelevant.
Star Strider
Star Strider 2019 年 11 月 12 日
As I read the documentation, it uses the p-value and the Alpha significance level to determine the value of ‘h’.
Liping Ai
Liping Ai 2019 年 11 月 13 日
If it is so, would you point out the relationship between the p-value/alpha-significance-level and "h" value in the two examples? It appears to me that "h" value stays the same regardless if the p-value is above or under the alpha-significance-level in the two examples.
Walter Roberson
Walter Roberson 2019 年 11 月 13 日
You can examine the code
edit signtest
Near the end you will see
h = (p<=alpha);
Star Strider
Star Strider 2019 年 11 月 13 日
@Walter — Thank you!

サインインしてコメントする。

その他の回答 (2 件)

Liping Ai
Liping Ai 2019 年 11 月 13 日

0 投票

The error is with the example not the code then, could be a typo with the documentation. Thank you!
Liping Ai
Liping Ai 2019 年 11 月 15 日

0 投票

The code in the last answer pinpoints the error location and nature.

タグ

質問済み:

2019 年 11 月 12 日

回答済み:

2019 年 11 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by