BookmarkSubscribeRSS Feed
☑ This topic is solved. 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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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