turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- How to conduct z test

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-22-2017 09:36 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-22-2017 10:21 PM

Google.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-22-2017 10:25 PM

Hi Reeza,

Sorry, my question didnt give much clarification. I want to know a proc by which z test can be conducted as like for t-test there is a proc ttest.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-22-2017 10:39 PM

I don't think there is one. A z test is only appropriate if you have the full population, which is rare, and at large numbers they'll give the same results anyways.

What kind of Z test do you need? There are some examples of people having hardcoded data steps to do this, but it's rare for a reason.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-23-2017 05:38 AM

What are the data and what question are you trying to answer?

The only z test that I can think of that is used in practice is the test for difference between two proportions. You can conduct that test by using PROC FREQ, as shown by Usage Note 22561.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-23-2017 08:08 AM

Arun_shSAS wrote:

Hi Reeza,

Sorry, my question didnt give much clarification. I want to know a proc by which z test can be conducted as like for t-test there is a proc ttest.

This really doesn't give us useful information. Can you state what hypothesis you are trying to test, and what your data is, and what distribution you have, and things like that? Just start from scratch, and describe the ENTIRE WHOLE COMPLETE problem for us, leaving nothing out, and do not be stingy with words.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-24-2017 06:12 PM

If you are trying to compare two means with a z test, you can just trick PROC MIXED into doing this, because a t distribution with infinite df is equivalent to a standard normal distribution. If you have data in long form, with a separate record for the treatment and control (as an example, with a variable called treat for identifying treatment (say 0 for control and 1 for treated), you can use:

proc mixed data=...;

class treat;

model y = treat / ddf = 10000 solution;

run;

The Solution output gives the "t statistic", but with df=10000, this is really giving you a z test for the mean difference. Of course, this would be very misleading if you have a small number of observations.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-25-2017 05:50 AM

Please provide details about what problem you are trying to solve. Do you want

1. A z-test for a one-sample mean for which the population mean and variance are known? (textbook problem)

2. A z-test for comparing the means of two samples for which the population variances are known? (textbook problem)

3. A z-test for the difference of proportions?

4. Something else?