BookmarkSubscribeRSS Feed
Khaladdin
Quartz | Level 8

Hi all,

 

I want to compare two percentages. I think Chi-Square test is appropriate for this. So, I have the following datasets;

 

Group    Number of Success         Total number

1                   5                                     10

2                   4                                      30

 

I need to compute the percantages of number of success in the first and second group and then compare them whether the difference between this comparision is statistically significant by using Chi-Square test. So the should be one more column:

 

Group    Number of Success         Total number            Percentages

1                   5                                     10                              50%   (5/10*100)

2                   3                                      30                             10%   (3/30*100)

 

And then I want to see whether the difference between percantages (50% and 10%) is statistically significant by using Chi-Square test. 

 

 

3 REPLIES 3
Reeza
Super User

Chi Square would use the raw numbers from the 2x2 table, not the percentages. 

 

To compare percentages you can use PROC TTEST but you need to make sure to include the correct N and possibly the standard deviation. You also need to factor in a continuity correction.

 

I recommend PROC FREQ instead of trying to test the percentages. The data lends itself to that format naturally. 

Khaladdin
Quartz | Level 8
Dear Reeza,

Many thanks for reply. Could you please explain how to use PROC FREQ? could you please give me the sample codes?
PaigeMiller
Diamond | Level 26

An example showing how to use PROC FREQ to compare two proportions is:

http://support.sas.com/kb/22/561.html

--
Paige Miller

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Discussion stats
  • 3 replies
  • 2520 views
  • 0 likes
  • 3 in conversation