Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
2 added 29 characters in body
source | link

Like @Glen_b said, you can compare your data with the data you're sure is normal - the data you generated yourself, and then rely on your gut feeling :)

The following is an example from OpenIntro Statistics textbook

Let's have a look at this Q-Q Plot:

qq1

Is it normal? Let's compare it with normally distributed data:

qq2

This one looks better than our data, so our data doesn't seem normal. Let's make sure by simulating it several times and plotting side-by-side

qq3

So our gut feeling tells us that the sample is not likely to be distributed normally.

Here's the R code to do this

load(url("http://www.openintro.org/stat/data/bdims.RData"))
fdims = subset(bdims, bdims$sex == 0)

qqnorm(fdims$wgt, col=adjustcolor("orange", 0.4), pch=19)
qqline(fdims$wgt)

qqnormsim = function(dat, dim=c(2,2)) {
  par(mfrow=dim)
  qqnorm(dat, col=adjustcolor("orange", 0.4), 
         pch=19, cex=0.7, main="Normal QQ Plot (Data)")
  qqline(dat)
  for (i in 1:(prod(dim) - 1)) {
    simnorm = rnorm(n=length(dat), mean=mean(dat), sd=sd(dat))
    qqnorm(simnorm, col=adjustcolor("orange", 0.4), 
           pch=19, cex=0.7,
           main="Normal QQ Plot (Sim)")
    qqline(simnorm)
  }
  par(mfrow=c(1, 1))
}
qqnormsim(fdims$wgt)
load(url("http://www.openintro.org/stat/data/bdims.RData"))
fdims = subset(bdims, bdims$sex == 0)

qqnorm(fdims$wgt, col=adjustcolor("orange", 0.4), pch=19)
qqline(fdims$wgt)

qqnormsim = function(dat, dim=c(2,2)) {
  par(mfrow=dim)
  qqnorm(dat, col=adjustcolor("orange", 0.4), 
         pch=19, cex=0.7, main="Normal QQ Plot (Data)")
  qqline(dat)
  for (i in 1:(prod(dim) - 1)) {
    simnorm = rnorm(n=length(dat), mean=mean(dat), sd=sd(dat))
    qqnorm(simnorm, col=adjustcolor("orange", 0.4), 
           pch=19, cex=0.7,
           main="Normal QQ Plot (Sim)")
    qqline(simnorm)
  }
  par(mfrow=c(1, 1))
}
qqnormsim(fdims$wgt)

Like @Glen_b said, you can compare your data with the data you're sure is normal - the data you generated yourself, and then rely on your gut feeling :)

The following is an example from OpenIntro Statistics textbook

Let's have a look at this Q-Q Plot:

qq1

Is it normal? Let's compare it with normally distributed data:

qq2

This one looks better than our data, so our data doesn't seem normal. Let's make sure by simulating it several times and plotting side-by-side

qq3

So our gut feeling tells us that the sample is not likely to be distributed normally.

Here's the R code to do this

load(url("http://www.openintro.org/stat/data/bdims.RData"))
fdims = subset(bdims, bdims$sex == 0)

qqnorm(fdims$wgt, col=adjustcolor("orange", 0.4), pch=19)
qqline(fdims$wgt)

qqnormsim = function(dat, dim=c(2,2)) {
  par(mfrow=dim)
  qqnorm(dat, col=adjustcolor("orange", 0.4), 
         pch=19, cex=0.7, main="Normal QQ Plot (Data)")
  qqline(dat)
  for (i in 1:(prod(dim) - 1)) {
    simnorm = rnorm(n=length(dat), mean=mean(dat), sd=sd(dat))
    qqnorm(simnorm, col=adjustcolor("orange", 0.4), 
           pch=19, cex=0.7,
           main="Normal QQ Plot (Sim)")
    qqline(simnorm)
  }
  par(mfrow=c(1, 1))
}
qqnormsim(fdims$wgt)

Like @Glen_b said, you can compare your data with the data you're sure is normal - the data you generated yourself, and then rely on your gut feeling :)

The following is an example from OpenIntro Statistics textbook

Let's have a look at this Q-Q Plot:

qq1

Is it normal? Let's compare it with normally distributed data:

qq2

This one looks better than our data, so our data doesn't seem normal. Let's make sure by simulating it several times and plotting side-by-side

qq3

So our gut feeling tells us that the sample is not likely to be distributed normally.

Here's the R code to do this

load(url("http://www.openintro.org/stat/data/bdims.RData"))
fdims = subset(bdims, bdims$sex == 0)

qqnorm(fdims$wgt, col=adjustcolor("orange", 0.4), pch=19)
qqline(fdims$wgt)

qqnormsim = function(dat, dim=c(2,2)) {
  par(mfrow=dim)
  qqnorm(dat, col=adjustcolor("orange", 0.4), 
         pch=19, cex=0.7, main="Normal QQ Plot (Data)")
  qqline(dat)
  for (i in 1:(prod(dim) - 1)) {
    simnorm = rnorm(n=length(dat), mean=mean(dat), sd=sd(dat))
    qqnorm(simnorm, col=adjustcolor("orange", 0.4), 
           pch=19, cex=0.7,
           main="Normal QQ Plot (Sim)")
    qqline(simnorm)
  }
  par(mfrow=c(1, 1))
}
qqnormsim(fdims$wgt)
1
source | link

Like @Glen_b said, you can compare your data with the data you're sure is normal - the data you generated yourself, and then rely on your gut feeling :)

The following is an example from OpenIntro Statistics textbook

Let's have a look at this Q-Q Plot:

qq1

Is it normal? Let's compare it with normally distributed data:

qq2

This one looks better than our data, so our data doesn't seem normal. Let's make sure by simulating it several times and plotting side-by-side

qq3

So our gut feeling tells us that the sample is not likely to be distributed normally.

Here's the R code to do this

load(url("http://www.openintro.org/stat/data/bdims.RData"))
fdims = subset(bdims, bdims$sex == 0)

qqnorm(fdims$wgt, col=adjustcolor("orange", 0.4), pch=19)
qqline(fdims$wgt)

qqnormsim = function(dat, dim=c(2,2)) {
  par(mfrow=dim)
  qqnorm(dat, col=adjustcolor("orange", 0.4), 
         pch=19, cex=0.7, main="Normal QQ Plot (Data)")
  qqline(dat)
  for (i in 1:(prod(dim) - 1)) {
    simnorm = rnorm(n=length(dat), mean=mean(dat), sd=sd(dat))
    qqnorm(simnorm, col=adjustcolor("orange", 0.4), 
           pch=19, cex=0.7,
           main="Normal QQ Plot (Sim)")
    qqline(simnorm)
  }
  par(mfrow=c(1, 1))
}
qqnormsim(fdims$wgt)