Normal distribution

2 posts

  • Creating a typical textbook illustration of statistical power using either ggplot or base graphics

    A common way of illustrating the idea behind statistical power in null hypothesis significance testing, is by plotting the sampling distributions of the null hypothesis and the alternative hypothesis. Typically, these illustrations highlight the regions that correspond to making a type II error, type I error and correctly rejecting the null hypothesis (i.e. the test’s power). In this post I will show how to create such “power plots” using both ggplot and R’s base graphics.

  • Short R script to plot effect sizes (Cohen's d) and shade overlapping area

    In this short post I take a look at how to use R and ggplot2 to visualize effect sizes (Cohen’s d) and how to shade the overlapping area of two distributions.