Show distributions, same height different variances

trinker

ggplot2orBust
#1
I want show two distributions on the same pot that have identical height but different variances. I understand logically why my approach below doesn't result in equal heights. Now how can I force it to have equal heights.

Code:
if (!require("pacman")) install.packages("pacman")
pacman::p_load(ggplot2)

ggplot() + 
    stat_function(data = data.frame(x = c(-5, 5)), aes(x = x), fun = function(x) dnorm(x, sd = .5),
        size=1, color="red") +
    stat_function(data = data.frame(y = c(-5, 5)), aes(x =y), fun = function(x) dnorm(x, sd = 2), 
        size=1, color="tan")
 

vinux

Dark Knight
#2
I want show two distributions on the same pot that have identical height but different variances. I understand logically why my approach below doesn't result in equal heights. Now how can I force it to have equal heights.
It doesn't make any sense. It is like you have two circles of different radius and scaling it as same radius (the circles will overlap).
 

trinker

ggplot2orBust
#3
That part I get it's making it do what I want it to do that I can't achieve. This is more as an icon not for actual visualization purposes, so statistically it doesn't have to make sense. I'll mock up a hand drawing and post that. Then maybe you folks can help me wrongly abuse stats to get the image I'm after.
 

vinux

Dark Knight
#5
This will work to achieve the above graph
Code:
ggplot() + 
   stat_function(data = data.frame(x = c(-5, 5)), aes(x = x), fun = function(x) dnorm(x, sd = .5)/dnorm(0, sd = .5),
                size=1, color="red") +
   stat_function(data = data.frame(y = c(-5, 5)), aes(x =y), fun = function(x) dnorm(x, sd = 2)/dnorm(0, sd = 2), 
                size=1, color="tan")
 

BGM

TS Contributor
#6
Just want to remind one crucial fact when we learn the acceptance-rejection sampling: When you have two continuous distributions with identical support, one of the pdf cannot completely cover, i.e. larger than the other one within the entire support. The reason is simple: both pdf will integrate to 1 within the entire support, and if one of them cover the other one, it will contradict to this simple fact. So the graph you required cannot be the graph of two normal pdfs plotting together, and as indicated by vinux, this can be done by multiplying a larger-than-1 factor to the one with fatter tail.