🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 04-19-2020 07:24 AM
(1795 views)
Hello, i don't know where is my error.
Suppose i have a normal distribution, and to calculate critical values :
data criticalvalue;
alpha=0.05;
normal_left = round(quantile('NORMAL', alpha), .001);
normal_right = round(quantile('NORMAL', 1-alpha), .001);
normal_two = round(quantile('NORMAL', 1-alpha/2), .001);
run;
Now, i wan to calculate p-values, based on critical values :
data p_values;
zstat = -1.645;
normal_left = probnorm(zstat);
normal_right = probnorm(abs(zstat));
normal_two = 2*(1 - probnorm(abs(zstat)));
run;
My question is : why p-value normal_two is not equal to probability for two_sided when i calculated critical value(1-alpha/2)
? In p-value i got 0.1, and probability for critical value i got 0.975. So, what's wrong?
Thank you
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Or to show the symmetry:
71 data _null_; 72 alpha=0.05; 73 q_left = round(quantile('NORMAL', alpha), .001); 74 q_right = round(quantile('NORMAL', 1-alpha), .001); 75 q_two = round(quantile('NORMAL', 1-alpha/2), .001); 76 p_left = probnorm(q_left); 77 p_right = 1 - probnorm(q_right); 78 p_two = 2 * (1 - probnorm(q_two)); 79 put (_all_) (=/); 80 run; alpha=0.05 q_left=-1.645 q_right=1.645 q_two=1.96 p_left=0.0499849055 p_right=0.0499849055 p_two=0.0499957903
PG
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It's not a linear translation, you have the wrong value of zstat.
data p_values;
zstat = -1.645;
normal_left = probnorm(zstat);
normal_right = probnorm(abs(zstat));
normal_two = 1-probnorm(1.96);
run;
--
Paige Miller
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Or another solution
data p_values;
zstat = -1.645;
normal_left = probnorm(zstat);
normal_right = probnorm(abs(zstat));
normal_two = 1-probnorm(quantile('NORMAL', 1-alpha/2));
run;
--
Paige Miller
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Or to show the symmetry:
71 data _null_; 72 alpha=0.05; 73 q_left = round(quantile('NORMAL', alpha), .001); 74 q_right = round(quantile('NORMAL', 1-alpha), .001); 75 q_two = round(quantile('NORMAL', 1-alpha/2), .001); 76 p_left = probnorm(q_left); 77 p_right = 1 - probnorm(q_right); 78 p_two = 2 * (1 - probnorm(q_two)); 79 put (_all_) (=/); 80 run; alpha=0.05 q_left=-1.645 q_right=1.645 q_two=1.96 p_left=0.0499849055 p_right=0.0499849055 p_two=0.0499957903
PG