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
- /
- SAS Programming
- /
- SAS Procedures
- /
- Proportion t-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

07-29-2009 08:46 PM

Okay I have a data set with the following layout

Gender Item1 Item2 Item3

0 4000 5000 3843

1 3000 5000 3454

Note: I made this set up, it's to get the general idea. I have 50 columns like this.

Gender 0 = Male, Gender 1 = Female. I want test the proportions for a difference. Where for example Men buy 4/7 of item one and Females do 3/7. I read a bunch of documentation, but all I can find is using proc freq. Can someone help me to figure out how to do this?

Gender Item1 Item2 Item3

0 4000 5000 3843

1 3000 5000 3454

Note: I made this set up, it's to get the general idea. I have 50 columns like this.

Gender 0 = Male, Gender 1 = Female. I want test the proportions for a difference. Where for example Men buy 4/7 of item one and Females do 3/7. I read a bunch of documentation, but all I can find is using proc freq. Can someone help me to figure out how to do this?

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

Posted in reply to deleted_user

07-30-2009 09:08 AM

A better topic for the SAS Statistical Procedures forum.

You seem to be missing a denominator. Or maybe you need to frame the question more completely. Are there 7 people? Probably not. Does each person examine an item and decide to buy it or not? Those answers are important to determining the correct or best test.

Just looking at the question as you have stated it, is 4/7 = 3/7? That is really a one-sample test of a proportion, is 4/7 = 0.5 . You can get that from FREQ using the BINOMIAL option.

You seem to be missing a denominator. Or maybe you need to frame the question more completely. Are there 7 people? Probably not. Does each person examine an item and decide to buy it or not? Those answers are important to determining the correct or best test.

Just looking at the question as you have stated it, is 4/7 = 3/7? That is really a one-sample test of a proportion, is 4/7 = 0.5 . You can get that from FREQ using the BINOMIAL option.

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

Posted in reply to Doc_Duke

07-30-2009 09:48 AM

DOC, sorry if i posted this in the wrong area.

Clearly 4/7 is not =.5. Like I said, this is a VERY simplified data set. I have much more complex numbers and more of them. It was just away to show how my data is laid out.

Clearly 4/7 is not =.5. Like I said, this is a VERY simplified data set. I have much more complex numbers and more of them. It was just away to show how my data is laid out.

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

Posted in reply to deleted_user

07-30-2009 10:06 AM

I think what he's saying is the null hypothesis is p=0.5 and the claim is that p is different from 0.5, i.e. is 4/7 significantly different from 0.5?

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

Posted in reply to deleted_user

07-30-2009 11:10 AM

> Clearly 4/7 is not =.5. Like I said, this is a VERY

> simplified data set. I have much more complex

> numbers and more of them. It was just away to show

> how my data is laid out.

Hard for me to believe you really have "complex numbers". Complex as in: square root of negative 1.

If you meant to say that you have a more complex dataset ... its really hard for us to know what to advise, as we can only see a very simple problem. If Doc's restatement of the issue doesn't meet your needs, then we need a much more clear description of what data you have, and what statistical comparisons you want to perform.

> simplified data set. I have much more complex

> numbers and more of them. It was just away to show

> how my data is laid out.

Hard for me to believe you really have "complex numbers". Complex as in: square root of negative 1.

If you meant to say that you have a more complex dataset ... its really hard for us to know what to advise, as we can only see a very simple problem. If Doc's restatement of the issue doesn't meet your needs, then we need a much more clear description of what data you have, and what statistical comparisons you want to perform.

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

Posted in reply to Paige

07-30-2009 11:24 AM

Numbers should never be an issue, just the process

Gender Item1 Item2 Item3

0 3495 5000 3843

1 3458 5000 3454

I need to test for a difference between 50 items by gender. I have listed 3. I need to run a test of proportions against 0 and 1 for item 1. I need to also do the same thing for item 2, all the way up to item 50. I know it's easy to eyeball these, but i have to do it for 50 items where it gets a little more complicated.

Gender Item1 Item2 Item3

0 3495 5000 3843

1 3458 5000 3454

I need to test for a difference between 50 items by gender. I have listed 3. I need to run a test of proportions against 0 and 1 for item 1. I need to also do the same thing for item 2, all the way up to item 50. I know it's easy to eyeball these, but i have to do it for 50 items where it gets a little more complicated.

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

Posted in reply to deleted_user

07-30-2009 11:39 AM

OK, if Item 1 is 3495 for Males and 3458 for Females and you want to test whether

3495/(3495+3458) is within statistical variability of 3458/(3495+3458),

then what I said earlier is correct. That is the statistical equivalent to testing whether 3495/(3495+3458) is statistically different from 0.5 and you use the BINOMIAL option on FREQ to do it.

If you want to test something else, then perhaps you can set it up as a contingency table for Item 1 so we can better understand the question.

3495/(3495+3458) is within statistical variability of 3458/(3495+3458),

then what I said earlier is correct. That is the statistical equivalent to testing whether 3495/(3495+3458) is statistically different from 0.5 and you use the BINOMIAL option on FREQ to do it.

If you want to test something else, then perhaps you can set it up as a contingency table for Item 1 so we can better understand the question.