G-power and Sample size determination

Hello everyone, last week I attended an eight days workshop at Science Tech Institute, Lucknow. There I learned about G-power software and sample size determination. 

Ever wonder how a sample size is determined considering research question? 

In this blog I have discussed few things on sample size and G power software.

Sampling distribution

In layman language sampling distribution describes the distribution of sample that is drawn from specified population.

While in statistics term, sampling distribution is collection of values of population parameters over a specified number of possible samples with respect to specified sampling plan and estimation procedure.


Sample size formula




Two terms should come in one’s mind: power analysis and precision analysis

  • Power analysis related to hypothesis testing: more the power the larger the sample size.
  • Precision analysis related to estimation procedure: the larger the sample size more precise estimates can be obtained.

Effect size: it gives the measure about how much the difference is between mean (average) prior intervention and after intervention. Substantive significance is reported by the effect size. It does not take the variability associated with the characteristic which we are working with.

  • When an intervention effect significance is to be measured one should report effect size and P- value associated with it.

Confidence interval gives us values that from this lowest control limit value to upper or maximum control limit the true value of population parameter will lies in this range.

Half width formula



In the above figure, apart from sample mean x bar the rest is half width formula.

  • Half width increases with standard deviation.
  • It decreases with increase in sample size.

Adjusting sample sizes for non-responses:

If for example you are conducting a survey then suppose you estimate 10% of total respondents wouldn’t give response or are unable to answer to the questions so in such cases an adjustment is done to the sample size.

100 respondents 10% of them might give no response so

100 + 0.1x = x

So, x = 111.11 ~ 112

Considering 10% of total respondents might not give responses you survey over 112 respondents rather than 100 respondents.

Design Effect:

Basic sample size formula is used when you sample out by simple random sampling method but out there for every case study or research question different sampling methods are used and so the calculation for sample size differs in every case.

Analysis method tells us which type of sampling method one should use what is the study design plan. All the formulas to compute sample are based on one criterion that population follows normal distribution. The design effect value lies between 1-3. G power is used to compute sample size based on research question.

Below here two examples are given that were discussed.

1. A survey has indicated that average weight of men over 55 years of age with newly diagnosed heart disease is 90 kg. however, the average weight is suspected to be lower than 90 kg. How large a sample be necessary to test, at 5% level of significance with the power of 90%, whether the average weight is unchanged versus alternative, that it is decreased from 90kg to 85kg?

Install G-power >  Click on G-power icon on PC

Install it from here 👉https://stats.idre.ucla.edu/other/gpower/

G*power

  • Now here go to “Tests” Tab as mentioned in above problem it is one sided t-test so select Means > “One- Sample : Difference from constant”.


  • So as shown in figure, under statistical test “Means: Different from constant (one-sample case)” will be displayed.
  • Click on “Determine=>” box to determine effect size.


  • Put the mentioned values of null hypothesis and alternate hypothesis and standard deviation values.
  • Click on “Calculate” then click on “Calculate and Transfer to main Window”.
  • Mention the alpha value and power and click on “Calculate” 




So, to achieve 90% of power and consider 5% of alpha level, the researcher should sample out over 139 respondents to test the hypothesis.


2.  Suppose the success rate for surgical treatment of a particular heart  condition is widely reported in literature to be 0.70. A new medical treatment has been proposed which alleged to offer equivalent success. A hospital without the necessary surgical facilities has decided to use this new treatment on all new patients presenting with this condition. How many patients must be studied to test hypothesis at 0.05 level if it is desired to have 90% power of detecting  a difference in proportion of success of 10% points or greater

  • Now here go to “Tests” Tab as mentioned in above problem it is one sided t-test so select Proportions  > “One- Sample : Difference from constant”.
  • So as shown in figure, under statistical test “Proportions: Different from constant (binomial, one-sample case)” will be displayed.
  • Click on “Determine=>” box to determine effect size.



  • Put the mentioned values of null hypothesis and alternate hypothesis and standard deviation values.
  • Click on “Calculate” then click on “Calculate and Transfer to main Window”.
  • Mention the alpha value and power and click on “Calculate”


So, to achieve 90% of power and consider 5% of alpha level, the researcher should sample out over 164 respondents that had undergone new treatment to treat same condition.

 There were examples discussed in the workshop and many other concepts related to sample size. Here, I want to share the knowledge and demonstration how G-power software is used for determining   sample size.


Hope you find this informative.


Comments