Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an independent variable is a manipulation/predictor which is applied in increasing degrees of strength across groups. The independent variable alters the amount of variation in the dependent variable.

Because we are looking at variance, I cannot use Spearman's Rho to calculate correlation without a weird hack (detailed below).

What is the best way to measure the correlation of variance?

In non-mathematical terms, I am testing if increasing the use of a metaphor/mental model unifies responses. If the mental model alters the way people think about a problem, then increasing the "reminders" of this mental model should unify the responses.

There are 5 independent groups, 0-4, ranked according to the number of "reminders" in each one. As the reminders are qualitatively different, I must use ranks.

If one examines the SD of each group according to rank, they line up almost perfectly:

SD - group

drop down

  • .639 - drop down menu

radio buttons

  • .604 - vertical
  • .484 - horizontal


  • .5515
  • .4504 - colored

Group Averages

  • .639
  • .544
  • .501

That's a difference of ~15% and ~8%, albeit a very rough and indirect way of measuring change in variance. However, Bartlett and Levene's tests confirm a statistically significant difference in the variance between the groups.

However, neither Spearman nor Kendall look at variance directly, so a difference of -1 and +1 will negate each other using these measures. If I combine the two extreme scores (0-1-2 -> 0-1) then I get a Spearman's of .142 with a sig <.001.

While I think this is a defensible hack, it doesn't seem to match up with my ad-hoc analysis above.

share|improve this question
Why did you consider absolute values if you are interested in the dispersion of the response distribution on the original scale? – chl Mar 11 '13 at 12:02
I am testing for extremes on a Likert scale, so strong agreement/disagreement are no different since they are both strong feelings. – Indolering Mar 12 '13 at 0:18
Thanks. So you mean that the shape of the response distribution (in particular, its variance, or maybe its spread) differs depending on the level of your independent variable? However, you end up with a 3-level discrete response variable (taking values in {0,1,2}): what would a variance test, usually applied on a continuous measure, mean in that case? What about your independent variable: Is it continuous or discrete like your outcome? – chl Mar 12 '13 at 20:05
The independent variables are discrete; "slider", "colored" slider, and "drop-down". – Indolering Mar 13 '13 at 2:45
@chl I've reformulated this question, would you mind taking another crack? – Indolering Mar 23 '14 at 23:25
up vote 2 down vote accepted

You could model the variance explicitly specifying a shared mean and only the variance with a Maximum Likelihood Formation such as

$$ \max_{\hat\gamma_0,\hat\gamma_1} (\sum_{i=1}(ln(D(x_i, \hat\mu, \hat\gamma_0+\hat\gamma_1 rank)))$$

Where D is the PDF of a distribution of your choice in which the mean is specified as the first argument ($\mu$) and the second argument specifies the variance.

I show how to do this in R using a normal distribution.

This will not directly give you a correlation between rank and variance but you can approximate such a correlation by transforming the coefficient (using $cor(x,y)=cov(x,y)/sd(x)sd(y)$ and $\hat \beta=cov(x,y)/var(x))$ $$\hat {cor}_{rank,var}=\hat\gamma_1 \hat {sd({\gamma_1})}/\hat {sd}({rank})$$

Note, because $\hat \beta=cov(x,y)/var(x))$ is only true in OLS the above transformation is at best only an approximation.

But really, you don't need the "correlation" when you have a more interesting statistic generated directly from the MLE estimation: "How does variance change with respect to a one unit change in ranking?"

share|improve this answer
Well, this is proof that I need SE Q/A. From what I can tell, this looks correct. I need to run it past my professor before I really grok the answer, however. As to your latter comment, I'm guessing that it hits on the problem I had with Spearman's Rho. – Indolering Mar 24 '14 at 21:21

One option is to report the ratio of the larger to the smaller standard deviations or the ratio of the larger to the smaller variance for the two groups. Such a metric is more comparable than the raw difference in standard deviation or variance with different studies that are on different scales.

share|improve this answer

Perhaps this solution is overly simplistic. If so, could you please provide a reference to prove me wrong?

What if we just take regression of DV with respect to case/control CV and all confounders, and then apply Levene's test to residuals? Since we only care about variability in dv between groups defined by values of cv, let's regress out all confounding factors iv1, iv2, etc. as follows:

d <- read.xlsx('DV-CV-and-confounders.xlsx',1)
m <- lm(dv ~ cv*(iv1 + iv2), data = d, na.action = na.omit)
levene.test(m$residuals, cv, 
        location="median", correction.method="zero.correction", 
share|improve this answer

Sounds like an analysis of a 3x3 table. How about a log-linear analysis with appropriate odds ratios of the effects?

Further edits

Loglinear regression analysis is used to describe the pattern of data in a contingency table. A model is constructed to predict the natural log of the frequency of each cell in the contingency table. For a 2x2 table, that means the model is $\ln f = br * row + bc * col + bi * int + a $.

Your data appears to be a 3x3, three response levels (0,1,2) by three conditions (slider,colored slider,dropdown). You would construct a model to predict the natural log of the frequency of each cell in the contingency table.

share|improve this answer
Could you elaborate on your answer? Even pointing to some examples would help. – Indolering Mar 19 '13 at 2:50
This sounds like a Chi^2 table, so just drop in the SD's instead of the mean? – Indolering Mar 20 '13 at 4:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.