BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
pawandh
Fluorite | Level 6

how alpha and z value is related ?

If alpha is 0.05 then what will be the value of z?

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Perhaps you mean "In SAS, how can I compute the z-score from the alpha value?

The answer is to use the QUANTILE function.  Reeza already gave the explanation of a two-sided critical value,

so here is the SAS code. 

 

ZLeft (=-1.96) is the value such that the area under the normal density curve to the left of ZLeft is 0.025.

ZRightt (= 1.96) is the value such that the area under the normal density curve to the right of ZRight is 0.025.

The area under the curve between ZLeft and ZRight is 0.95.

For a probability distribution such as the normal distribution "area under the curve on an interval" is equivalent to "probability that a random variable will take a value in that interval."

 

data A;
alpha = 0.05;
zLeft  = quantile("Normal", alpha/2); 
zRight = quantile("Normal", 1-alpha/2); 
run;

proc print; run;

View solution in original post

2 REPLIES 2
Reeza
Super User

In what context?

Also, is it a one sided or two sided test?

 

Check the basic definitions. 

 

Z Score: http://stattrek.com/statistics/dictionary.aspx?definition=z_score

 

Alpha : http://stattrek.com/statistics/dictionary.aspx?definition=Alpha

 

Back in the day you'd have the read the Z cut off value from the table:

https://www.math.ucdavis.edu/~soshniko/135a/materials/standardnormaltable.pdf

 

So if alpha was 0.05 and it was a two sided score, divide alpha in half for 0.025. Look up that value (or 1-0.025=0.0975) in the table and the corresponding Z critical value is 1.96 (or -1.96). You can use this number to compare to the Z score you calculate in your data, if the Z-Score is less than the cutoff you accept your null hypothesis, otherwise you reject your null hypothesis.  

 

In the inverse manner, you can calculate your Z-Score, find the area under the curve and that is your p-value, which is compared to your cutoff level.

 

The one vs two sides is important here, if it was a one sided test, you would look up 0.05 in the table which would give you a critical value of ~1.645

 

I think I'm mangling this but hopefully it helps to clear up things. 

http://www.statisticshowto.com/what-is-the-critical-value-of-z/

http://www.statisticshowto.com/find-a-critical-value/

 

This is more of a stats than SAS question...

 

 

 

Rick_SAS
SAS Super FREQ

Perhaps you mean "In SAS, how can I compute the z-score from the alpha value?

The answer is to use the QUANTILE function.  Reeza already gave the explanation of a two-sided critical value,

so here is the SAS code. 

 

ZLeft (=-1.96) is the value such that the area under the normal density curve to the left of ZLeft is 0.025.

ZRightt (= 1.96) is the value such that the area under the normal density curve to the right of ZRight is 0.025.

The area under the curve between ZLeft and ZRight is 0.95.

For a probability distribution such as the normal distribution "area under the curve on an interval" is equivalent to "probability that a random variable will take a value in that interval."

 

data A;
alpha = 0.05;
zLeft  = quantile("Normal", alpha/2); 
zRight = quantile("Normal", 1-alpha/2); 
run;

proc print; run;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 17946 views
  • 3 likes
  • 3 in conversation