BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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?
6 REPLIES 6
Doc_Duke
Rhodochrosite | Level 12
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.
deleted_user
Not applicable
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.
GreggB
Pyrite | Level 9
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?
Paige
Quartz | Level 8
> 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.
deleted_user
Not applicable
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.
Doc_Duke
Rhodochrosite | Level 12
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.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 6 replies
  • 961 views
  • 0 likes
  • 4 in conversation