# Hypothesis Testing for Diffrence of Dispersion

In
Hypothesis Testing for Diffrence of Average
, we use difference to compare 2 average.
But we use **ratio** to compare 2 dispersion.

Standard deviation is popular as the index of dispersion.
But we use **variance** to compare dispersion.

##
Hypothesis Testing for 2 Variance

F-test is used to compare 2 variance.

###
Calculation by R

**setwd("C:/Rtest")**

Data <- read.csv("Data.csv", header=T)

var.test(x=Data$X1,y=Data$X2)

##
Hypothesis Testing for More Than 2 Variance

Bartlett-test is used.

This method is used to check equality of variance before
ANOVA
.

Quality Engineering
analyze the difference of dispersion.
But it is not hypothesis testing.

###
Calculation by R

**setwd("C:/Rtest")**

Data <- read.csv("Data.csv", header=T)

bartlett.test(formula=Data$Y~Data$X)

NEXT Hypothesis Testing for Difference of Ratio