Turn on suggestions

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

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Sample size calculation for two unequal groups

Options

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 02-03-2020 01:19 AM
(3691 views)

Hi All,

I am new to proc power procedure and need your help calculating sample size for two groups of unequal sizes.

I have a population split into two groups 60% test and 40% control.

Wanted to calculate sample size for my two unequal groups with couple scenarios:

I want to test the Difference in means between two groups of 30 bps,50bps and 100 bps where mean1=0.65 .With alpha 0.05 and power 0.80.

Any help would be greatly appreciated.

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

You also need a hypothetical standard deviation for the population. Here is a link to the doc for the TWOSAMPLEMEANS statement in PROC POWER.

I do not understand the phrase "two groups of 30 bps,50bps and 100 bps" or " where mean1=0.65."

However, the following shows how to specify two groups where the mean of the Test group is 30 and the mean of the Control group is 35. The groups have a common standard deviation (4.8) and the total sample size will be a multiple of 5, with 3/5 of subjects assigned to the Test group and 2/5 assigned to the Control group.

```
proc power;
twosamplemeans
groupmeans = (30 35) /* population means in each group */
groupweights = (3 2) /* 60-40 ratio */
stddev = 4.8 /* or use GROUPSTDDEVS= */
power = 0.8
alpha = 0.05
ntotal = .
sides = 2;
run;
```

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi,

I am trying to compare mean loss rates for two groups. Test and control have 60% 40% split.

My total population is 23 000.

My mean loss rate for group test is 0.65.

I want to see what sample size I need in order to detect 20,30,40,50,100 bps difference between test and control means.

I dont have vriance available. Wanted to use alpha 0.05 and power 80.

Would code below still work for my objective?

Thank you so much

I am trying to compare mean loss rates for two groups. Test and control have 60% 40% split.

My total population is 23 000.

My mean loss rate for group test is 0.65.

I want to see what sample size I need in order to detect 20,30,40,50,100 bps difference between test and control means.

I dont have vriance available. Wanted to use alpha 0.05 and power 80.

Would code below still work for my objective?

Thank you so much

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Yes, provided that the sample sizes are much much smaller than the total population. And you still need an estimate for the standard deviation.

The Getting Started example in the documentation analyzes a problem very similar to yours.

I don't understand the "mean loss rate" or the values of the "bps difference", but it looks like you might want to use the MEANDIFF option to specify all those rates. Here is an example that has fake values:

```
proc power;
twosamplemeans
meandiff = 0.02 0.03 0.04 0.05 0.1
groupweights = (3 2) /* 60-40 ratio */
stddev = 0.04
power = 0.8
alpha = 0.05
ntotal = .
sides = 2;
run;
```

**SAS Innovate 2025** is scheduled for May 6-9 in Orlando, FL. Sign up to be **first to learn** about the agenda and registration!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.