0
$\begingroup$

We have a known sample of data coming from a multiple choice ordinal scale survey question with scores from the set [0,1,2,3,4,5].

In one sample, the mean of this sample was 3.9032 and the std deviation 1.3255.

We want to chart this sample with confidence intervals or some other indicator of variance/spread. However when I chart this using normal distribution, the top confidence interval is above 5 (the max possible score) because we are not dealing with a normal distribution.

Question:

What type of analysis could we use to plot a visual view of variance or spread on such a sample set over time, avoiding returning an impossible value less than 0 or greater than 5?

Additional notes:

The green line (mean) and the area is an example of the type of thing we want to create. This is time series plot of a longitudinal survey. At each point, we want to show the trending mean, and some indication of variance so the consumer can see if the trend and spread is changing over time. Please ignore the blue line.

Sample: 5 5 4 5 4 5 5 2 5 2 3 4 5 5 4 3 4 5 3 3 4 5 3 5 3 1 5 5 4 5 0

Mean: 3.9032

Sample Std Dev: 1.3255

n = 31

ExampleChart

$\endgroup$
10
  • 1
    $\begingroup$ I am not sure that the mean and variance are meaningful descriptive statistics for an ordinal scale. Can you describe the kind of plot you want to make and your purpose for showing variability on the plot? $\endgroup$
    – BruceET
    Commented Nov 19, 2018 at 20:09
  • $\begingroup$ Are you sure you are computing the confidence interval correctly? Unless you are requiring extremely high confidence or have only a tiny sample, both limits will be well within the 0-5 range. $\endgroup$
    – whuber
    Commented Nov 19, 2018 at 20:11
  • $\begingroup$ @whuber I am pretty confident that I am calculating correctly, yes the sample size here was small. n=31 $\endgroup$
    – nick_alot
    Commented Nov 19, 2018 at 20:23
  • 1
    $\begingroup$ Unless you are demanding unusually high confidence, you are not calculating correctly: it is mathematically impossible for the upper limit of a symmetric two-sided 95% confidence interval in this case to be any greater than $4.7,$ even when you use the (more accurate) Student t distribution. I suspect you might be confusing standard deviation with standard error, raising issues concerning what you're really trying to accomplish. Please clarify. $\endgroup$
    – whuber
    Commented Nov 19, 2018 at 21:54
  • 1
    $\begingroup$ Yes, I too suspect that your reference to "confidence" may be a red herring, because confidence is not a measure of spread of the data. But if your focus is then on the data spread, there is nothing untoward about a limit based on SDs (or any other measure of spread) extending beyond the range of the data--there is no mathematical reason why that shouldn't happen and it occurs frequently, especially when most of the data are close to a natural limit. If that bothers you, you are free to truncate your limits to the range. $\endgroup$
    – whuber
    Commented Nov 21, 2018 at 20:07

1 Answer 1

1
$\begingroup$

I realise this thread is getting old but I just stumbled on it and don't think there was a solution (lots of useful insights though).

One could obtain a confidence interval for the mean using bootstrapping (Efron 1979). For the mean of a single sample, one would:

  1. Simulate new data by sampling with replication.
  2. Calculate the mean of the simulated sample
  3. Repeat a few thousand times.

The 95% confidence is then simply the 2.5% and 97.5% quantiles of these thousands of means.

Example in simple R code:

nrep <- 5000
bootmeans <- vector(length = nrep)
for (i in 1:nrep){
  bootmeans[i] <- mean(sample(x, size = length(x), replace = TRUE))
}

hist(bootmeans)
abline(v = quantile(bootmeans, probs = c(0.025, 0.975)), lwd = 2, col = "blue")

enter image description here

The 95% bootstrapped confidence interval in this case is 3.42 to 4.35, and this confidence interval will never go outside the boundaries of the scale.

This is a simple non-parametric bootstrap, which we can of course refine (e.g. DiCiccio & Efron 1996, Carpenter & Bithell 2000, Coskun et al. 2013).

Hope that's useful to someone!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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