2
$\begingroup$

enter image description here

But I am curious why the standard deviation for both data is same. I think because data 2 is "100 - data 1".

$\endgroup$
1
  • 3
    $\begingroup$ $var(X+a)=var(X)$ and $var(aX)=a^2var(X)$ for a real number $a$ and a random variable $X$. With those, can you prove why $var(100-X)=var(X)$ where X is your data set? (Equal variances is the same as equal standard deviations.) $\endgroup$ – Dave Feb 15 '20 at 0:24
3
$\begingroup$

I still would like you to try to prove it, but I’ll give some intuition about those two identities I gave.

Remember that variance (and standard deviation) have something to do with how spread out your data are.

$var(X+a)=var(X)$ means that if you take data with some amount of spread and slide them up or down the number line, you do not change the spread.

$var(X)=var(-X)$ is not quite what I gave, but it’ll be part of your proof. The intuition here is that you’re just spinning it around, taking a mirror image. The data are as spread out as their reflection.

Together, $var(100-X)=var(X)$ means that you flip the data to the mirror image and then slide along the number line, but you do not change the spread.

Capisce?

$\endgroup$
2
  • $\begingroup$ what is the meaning of Capisce? $\endgroup$ – aan Feb 16 '20 at 11:41
  • 1
    $\begingroup$ that's Italian for "do you comprehend ?" $\endgroup$ – IrishStat Feb 16 '20 at 13:20
2
$\begingroup$

I believe the answer to this question can be expressed in more elemental terms. Beginning with the formula for the sample standard deviation

$$ s_{x} = \sqrt{\frac{ \sum_{i=1}^{n}{(x_i - \overline{x})^2} }{n - 1}}, $$

I want to draw your attention to the expression $(x_i - \overline{x})$ in the numerator. Ignore the summation notation for the purposes of this answer. Note, we decrement the sample mean (i.e., $\overline{x}$) from each realization of $x_{i}$. If we were to increase or decrease each $x_{i}$ by the same amount, the mean will change. However, the distance of each realization of $x_{i}$ from that central tendency remains the same. In other words, each deviation from the mean is the same.

Subtracting each $x_{i}$ from a constant (e.g., $100 - x_{i}$) flips the vector of values to its mirror image, then slides it along the number line by a constant amount. Suppose the first realization of $x_{1}$ = 20 and $\overline{x}$ = 4. In keeping with the foregoing expression,

$$ (20 - 4) = 16, $$

which is the deviation from the sample mean. Now, assume we don't move along the number line just yet and we simply put a negative sign in front of each $x_{i}$, such that we have $-(x_{i})$; this flips the sign of the mean as well. The first realization, $x_{1}$, is now $-20$. Again, substituting $-20$ into the expression,

$$ (-20-(-4)) =-16, $$

which is the same number of units away from the mean. Note, squared deviations result in a positive number, so the numerator remains the same. You can run this code in R which builds upon @knrumsey's insightful response, but breaks it down further:

x <- rnorm(10000, 30, 5) # Simulates 10,000 random deviates from the normal distribution

par(mfrow = c(2, 2))
hist(x, xlim = c(0, 100), col = "blue")
hist(-x, xlim = c(-100, 0), col = "red")  # Note the -x, it simply flips the sign (mirror image)
hist(x, xlim = c(0, 100), col = "blue")
hist(100-x, xlim = c(0, 100), col = "red")  # Subtracting x from 100 shifts values along the x-axis

enter image description here

The first row of plots shows how the realizations translate when we negate each $x_{i}$. The second row shows what happens when each $x_{i}$ is subtracted from 100; the translation first flips then slides across the number line. The spread of the distribution is unaffected by this.

$\endgroup$
2
$\begingroup$

To supplement @Dave's answer, take a look at the following histograms which have the same x-axis. Data2 is just a shifted version of Data1 and therefore the standard deviation, which is a measure of spread, shouldn't change.

enter image description here

R code to generate histograms:

x <- 100*rgamma(1000, 6, 2) #Simulate some data
hist(x, xlim=c(0,100))
hist(100-x, xlim=c(0,100))
$\endgroup$
5
  • $\begingroup$ Thanks. well-plotted histogram. May I know how do you plot the histogram? $\endgroup$ – aan Feb 15 '20 at 5:29
  • $\begingroup$ @aan see the update. $\endgroup$ – knrumsey Feb 15 '20 at 17:49
  • $\begingroup$ @knrumsey Good illustration. However, simulating from the gamma distribution would produce realizations that cluster around a mean that is much lower than what I see here given the parameters you specified. Right? $\endgroup$ – Thomas Bilach Feb 16 '20 at 20:24
  • $\begingroup$ @Tom, that is correct. I didn't put too much thought into which distribution I simulated from. Just wanted draws between 0 and 100. $\endgroup$ – knrumsey Feb 16 '20 at 20:45
  • $\begingroup$ @Thomas Bilach, realizing that I misunderstood your question. Thanks for pointing this out, I've updated the post to reflect the fact that I multiplied the data by 100. $\endgroup$ – knrumsey May 3 '20 at 0:48
1
$\begingroup$

changes period to period in DATA 1 identical to the negative changes in DATA 2

OBS DATA 1 FIRST DIF DATA 2 FIRST DIFF

1 30 NA 70 NA

2 40 10 60 -10

3 80 40 20 -40

4 30 -50 70 50

5 20 -10 80 10

6 33 13 67 -13

7 33 0 67 0

8 33 0 67 0

9 33 0 67 0

CONTINUING STEPS TO UNCOVER THE BASIC RELATIONSHIP OF DATA1 AND DATA2:

I took the series DATA1 and computed the ACF ... here it is ..

enter image description here

AND for DATA2 here

enter image description here

...note that not only are the standard deviations the same but the ACF's are the same.

$\endgroup$
13
  • 1
    $\begingroup$ This is an interesting perspective, but I believe it would need more explanation to be understood by many readers. $\endgroup$ – whuber Feb 15 '20 at 22:53
  • $\begingroup$ @IrishStat, thanks. do you mind to explain more? $\endgroup$ – aan Feb 16 '20 at 11:42
  • $\begingroup$ i added some material to my response detailing how differenced data period to period ( val2-val1,val3-val2,.. val9-val8) for both original series DATA1 and DATA2 were complements of each other $\endgroup$ – IrishStat Feb 16 '20 at 13:19
  • $\begingroup$ @IrishStat. Noted. what is the meaning of Q.E.D and OBS? $\endgroup$ – aan Feb 16 '20 at 15:58
  • 1
    $\begingroup$ An explicit connection between those assertions and the result is needed. What is interesting is your use of successive differences ("changes period to period" in an otherwise unordered dataset) to characterize the standard deviation of the dataset. In other words, you appear to be claiming that the set of equalities $$x_{i+1}-x_i = -(y_{i+1}-y_i)$$ for $i=1, 2, \ldots, n-1$ implies $$\sum_{i=1}^n(x_i-\bar x)^2=\sum_{i=1}^n(y_i-\bar y)^2.$$ That's true, but it does need to be shown: you can't just exhibit a table of numbers and declare "QED"! $\endgroup$ – whuber Feb 16 '20 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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