How to calculate critical value for a sign test












1












$begingroup$


I would like to use the sign test on some data in R, I know how to do this however how would i calculate the critical value of the data? If I don't know het distribution of the data what command should I use to get the critical value ? Do I use qnorm(alfa/2) or do I use qt or can't I calculate the critical value if I don't know the distribution?










share|cite|improve this question









$endgroup$












  • $begingroup$
    Can you say specifically what sign test: One or two-sided? Is $H_0$ specified in terms of population median $eta?$ Are data continuous of discrete? Do you have particular data in mind? Are there enough observations to use a normal aprx? // If norm aprx is OK, then you can use qnorm to get p-value, not critical value. You might use qnorm to get critical value. Student's t distribution has nothing to do with sign tests, so you wouldn't use qt for anything. // If you can state $H_0, H_a$ and give sample data, maybe one of us can show details.
    $endgroup$
    – BruceET
    Dec 20 '18 at 1:10


















1












$begingroup$


I would like to use the sign test on some data in R, I know how to do this however how would i calculate the critical value of the data? If I don't know het distribution of the data what command should I use to get the critical value ? Do I use qnorm(alfa/2) or do I use qt or can't I calculate the critical value if I don't know the distribution?










share|cite|improve this question









$endgroup$












  • $begingroup$
    Can you say specifically what sign test: One or two-sided? Is $H_0$ specified in terms of population median $eta?$ Are data continuous of discrete? Do you have particular data in mind? Are there enough observations to use a normal aprx? // If norm aprx is OK, then you can use qnorm to get p-value, not critical value. You might use qnorm to get critical value. Student's t distribution has nothing to do with sign tests, so you wouldn't use qt for anything. // If you can state $H_0, H_a$ and give sample data, maybe one of us can show details.
    $endgroup$
    – BruceET
    Dec 20 '18 at 1:10
















1












1








1





$begingroup$


I would like to use the sign test on some data in R, I know how to do this however how would i calculate the critical value of the data? If I don't know het distribution of the data what command should I use to get the critical value ? Do I use qnorm(alfa/2) or do I use qt or can't I calculate the critical value if I don't know the distribution?










share|cite|improve this question









$endgroup$




I would like to use the sign test on some data in R, I know how to do this however how would i calculate the critical value of the data? If I don't know het distribution of the data what command should I use to get the critical value ? Do I use qnorm(alfa/2) or do I use qt or can't I calculate the critical value if I don't know the distribution?







probability statistics statistical-inference






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 19 '18 at 14:05









swaffelayswaffelay

203




203












  • $begingroup$
    Can you say specifically what sign test: One or two-sided? Is $H_0$ specified in terms of population median $eta?$ Are data continuous of discrete? Do you have particular data in mind? Are there enough observations to use a normal aprx? // If norm aprx is OK, then you can use qnorm to get p-value, not critical value. You might use qnorm to get critical value. Student's t distribution has nothing to do with sign tests, so you wouldn't use qt for anything. // If you can state $H_0, H_a$ and give sample data, maybe one of us can show details.
    $endgroup$
    – BruceET
    Dec 20 '18 at 1:10




















  • $begingroup$
    Can you say specifically what sign test: One or two-sided? Is $H_0$ specified in terms of population median $eta?$ Are data continuous of discrete? Do you have particular data in mind? Are there enough observations to use a normal aprx? // If norm aprx is OK, then you can use qnorm to get p-value, not critical value. You might use qnorm to get critical value. Student's t distribution has nothing to do with sign tests, so you wouldn't use qt for anything. // If you can state $H_0, H_a$ and give sample data, maybe one of us can show details.
    $endgroup$
    – BruceET
    Dec 20 '18 at 1:10


















$begingroup$
Can you say specifically what sign test: One or two-sided? Is $H_0$ specified in terms of population median $eta?$ Are data continuous of discrete? Do you have particular data in mind? Are there enough observations to use a normal aprx? // If norm aprx is OK, then you can use qnorm to get p-value, not critical value. You might use qnorm to get critical value. Student's t distribution has nothing to do with sign tests, so you wouldn't use qt for anything. // If you can state $H_0, H_a$ and give sample data, maybe one of us can show details.
$endgroup$
– BruceET
Dec 20 '18 at 1:10






$begingroup$
Can you say specifically what sign test: One or two-sided? Is $H_0$ specified in terms of population median $eta?$ Are data continuous of discrete? Do you have particular data in mind? Are there enough observations to use a normal aprx? // If norm aprx is OK, then you can use qnorm to get p-value, not critical value. You might use qnorm to get critical value. Student's t distribution has nothing to do with sign tests, so you wouldn't use qt for anything. // If you can state $H_0, H_a$ and give sample data, maybe one of us can show details.
$endgroup$
– BruceET
Dec 20 '18 at 1:10












1 Answer
1






active

oldest

votes


















1












$begingroup$

Comment: Here is a quick example with output from Minitab.
If this is not the kind of data, $H_0,$ and $H_a$ you have in mind,
then please be clear about what changes need to be made in order
to help with the sign test you have in mind.



Data Display 

x
7 16 23 28 55 70 87 92 129 160

Sign Test for Median

Sign test of median = 20.00 versus > 20.00

n Below Equal Above P Median
x 10 2 0 8 0.0547 62.50


In R, under $H_0,$ the exact binomial probability of 8 or more 'Above', $P(A ge 8) = 1 - P(A le 7),$
is the P-value:



1 - pbinom(7, 10, .5)
[1] 0.0546875


Using a normal approximation to $mathsf{Binom}(10, .5),$ you can get the critical value $7.6$ for a "5% level" test:



qnorm(.95, 5, sqrt(10/4))
[1] 7.600742


The quotes are because it is not possible to have a test exactly at the 5% level using the discrete binomial distribution. This
difficulty is "swept under the rug" using a normal approximation.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    This page, under Related at the right may be helpful.
    $endgroup$
    – BruceET
    Dec 20 '18 at 2:21













Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3046428%2fhow-to-calculate-critical-value-for-a-sign-test%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$

Comment: Here is a quick example with output from Minitab.
If this is not the kind of data, $H_0,$ and $H_a$ you have in mind,
then please be clear about what changes need to be made in order
to help with the sign test you have in mind.



Data Display 

x
7 16 23 28 55 70 87 92 129 160

Sign Test for Median

Sign test of median = 20.00 versus > 20.00

n Below Equal Above P Median
x 10 2 0 8 0.0547 62.50


In R, under $H_0,$ the exact binomial probability of 8 or more 'Above', $P(A ge 8) = 1 - P(A le 7),$
is the P-value:



1 - pbinom(7, 10, .5)
[1] 0.0546875


Using a normal approximation to $mathsf{Binom}(10, .5),$ you can get the critical value $7.6$ for a "5% level" test:



qnorm(.95, 5, sqrt(10/4))
[1] 7.600742


The quotes are because it is not possible to have a test exactly at the 5% level using the discrete binomial distribution. This
difficulty is "swept under the rug" using a normal approximation.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    This page, under Related at the right may be helpful.
    $endgroup$
    – BruceET
    Dec 20 '18 at 2:21


















1












$begingroup$

Comment: Here is a quick example with output from Minitab.
If this is not the kind of data, $H_0,$ and $H_a$ you have in mind,
then please be clear about what changes need to be made in order
to help with the sign test you have in mind.



Data Display 

x
7 16 23 28 55 70 87 92 129 160

Sign Test for Median

Sign test of median = 20.00 versus > 20.00

n Below Equal Above P Median
x 10 2 0 8 0.0547 62.50


In R, under $H_0,$ the exact binomial probability of 8 or more 'Above', $P(A ge 8) = 1 - P(A le 7),$
is the P-value:



1 - pbinom(7, 10, .5)
[1] 0.0546875


Using a normal approximation to $mathsf{Binom}(10, .5),$ you can get the critical value $7.6$ for a "5% level" test:



qnorm(.95, 5, sqrt(10/4))
[1] 7.600742


The quotes are because it is not possible to have a test exactly at the 5% level using the discrete binomial distribution. This
difficulty is "swept under the rug" using a normal approximation.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    This page, under Related at the right may be helpful.
    $endgroup$
    – BruceET
    Dec 20 '18 at 2:21
















1












1








1





$begingroup$

Comment: Here is a quick example with output from Minitab.
If this is not the kind of data, $H_0,$ and $H_a$ you have in mind,
then please be clear about what changes need to be made in order
to help with the sign test you have in mind.



Data Display 

x
7 16 23 28 55 70 87 92 129 160

Sign Test for Median

Sign test of median = 20.00 versus > 20.00

n Below Equal Above P Median
x 10 2 0 8 0.0547 62.50


In R, under $H_0,$ the exact binomial probability of 8 or more 'Above', $P(A ge 8) = 1 - P(A le 7),$
is the P-value:



1 - pbinom(7, 10, .5)
[1] 0.0546875


Using a normal approximation to $mathsf{Binom}(10, .5),$ you can get the critical value $7.6$ for a "5% level" test:



qnorm(.95, 5, sqrt(10/4))
[1] 7.600742


The quotes are because it is not possible to have a test exactly at the 5% level using the discrete binomial distribution. This
difficulty is "swept under the rug" using a normal approximation.






share|cite|improve this answer











$endgroup$



Comment: Here is a quick example with output from Minitab.
If this is not the kind of data, $H_0,$ and $H_a$ you have in mind,
then please be clear about what changes need to be made in order
to help with the sign test you have in mind.



Data Display 

x
7 16 23 28 55 70 87 92 129 160

Sign Test for Median

Sign test of median = 20.00 versus > 20.00

n Below Equal Above P Median
x 10 2 0 8 0.0547 62.50


In R, under $H_0,$ the exact binomial probability of 8 or more 'Above', $P(A ge 8) = 1 - P(A le 7),$
is the P-value:



1 - pbinom(7, 10, .5)
[1] 0.0546875


Using a normal approximation to $mathsf{Binom}(10, .5),$ you can get the critical value $7.6$ for a "5% level" test:



qnorm(.95, 5, sqrt(10/4))
[1] 7.600742


The quotes are because it is not possible to have a test exactly at the 5% level using the discrete binomial distribution. This
difficulty is "swept under the rug" using a normal approximation.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Dec 20 '18 at 2:00

























answered Dec 20 '18 at 1:31









BruceETBruceET

35.7k71440




35.7k71440












  • $begingroup$
    This page, under Related at the right may be helpful.
    $endgroup$
    – BruceET
    Dec 20 '18 at 2:21




















  • $begingroup$
    This page, under Related at the right may be helpful.
    $endgroup$
    – BruceET
    Dec 20 '18 at 2:21


















$begingroup$
This page, under Related at the right may be helpful.
$endgroup$
– BruceET
Dec 20 '18 at 2:21






$begingroup$
This page, under Related at the right may be helpful.
$endgroup$
– BruceET
Dec 20 '18 at 2:21




















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3046428%2fhow-to-calculate-critical-value-for-a-sign-test%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Tonle Sap (See)

I get strange results when I access the Sqlitedatabase with Unity C# via XAMPP

Guatemaltekische Davis-Cup-Mannschaft