How do you find the standard error of the difference between two sample means?

\begin{align} 8.9 &\pm 1.72 \times 4.121 \quad \leftrightarrow \quad (1.81, 15.99) \end{align} This is a sharper confidence interval than computed previously! We are 90% confident that the treatment improved some quality by 1.81 to 15.99 units.

You seem to be thinking that $\sqrt{\text{Var}(\bar X-\bar Y)} = \sqrt{\text{Var}(\bar X)} + \sqrt{\text{Var}(\bar Y)}$.

This is not the case for independent variables.

For $X,Y$ independent, $\text{Var}(\bar X-\bar Y) = \text{Var}(\bar X) + \text{Var}(\bar Y)$

Further,

$\text{Var}(\bar X) = \text{Var}(\frac{1}{n}\sum_iX_i) = \frac{1}{n^2}\text{Var}(\sum_iX_i)= \frac{1}{n^2}\sum_i\text{Var}(X_i)= \frac{1}{n^2}\cdot n\cdot\sigma^2_1= \sigma^2_1/n$

(if the $X_i$ are independent of each other).

http://en.wikipedia.org/wiki/Variance#Basic_properties

In summary: the correct term:

How do you find the standard error of the difference between two sample means?

$\color{red}{(1)}$ has $\sigma^2/n$ terms because we're looking at averages and that's the variance of an average of independent random variables;

$\color{red}{(2)}$ has a $+$ because the two samples are independent, so their variances (of the averages) add; and

$\color{red}{(3)}$ has a square root because we want the standard deviation of the distribution of the difference in sample means (the standard error of the difference in means). The part under the bar of the square root is the variance of the difference (the square of the standard error). Taking square roots of squared standard errors gives us standard errors.

The reason why we don't just add standard errors is standard errors don't add - the standard error of the difference in means is NOT the sum of the standard errors of the sample means for independent samples - the sum will always be too large. The variances do add, though, so we can use that to work out the standard errors.


Here's some intuition about why it's not standard deviations that add, rather than variances.

To make things a little simpler, just consider adding random variables.

If $Z = X+Y$, why is $\sigma_Z < \sigma_X+\sigma_Y$?

Imagine $Y = kX$ (for $k\neq 0$); that is, $X$ and $Y$ are perfectly linearly dependent. That is, they always 'move together' in the same direction and in proportion.

Then $Z = (k+1)X$ - which is simply a rescaling. Clearly $\sigma_Z = (k+1)\sigma_X = \sigma_X+\sigma_Y$.

That is, when $X$ and $Y$ are perfectly positively linearly dependent, always moving up or down together, standard deviations add.

When they don't always move up or down together, sometimes they move opposite directions. That means that their movements partly 'cancel out', yielding a smaller standard deviation than the direct sum.

Create table of data and summary stats

This is not a standard R format but just used for illustartion and displaying data

# The data
df.rats <- data.frame(old = c(20.8,2.8,50.0,33.3,29.4,38.9, 29.4,52.6,14.3),
           young = c(45.5,55.0, 60.7, 61.5, 61.1, 65.5,42.9,37.5, NA))


#Means
## Calcualte means
mean.old <- with(df.rats, mean(old))
mean.young <- with(df.rats, mean(young, na.rm = T))

##put means into a vector
means.rats <- c(mean.old,mean.young)

## add means to dataframe
df.rats2 <- rbind(df.rats, means.rats)

##name the row that the means are in
row.names(df.rats2)[dim(df.rats2)[1]] <- "means"

#Standard deviation
##calc sd and add it to the dataframe
sd.old <- with(df.rats, sd(old))
sd.young <- with(df.rats, sd(young, na.rm = T))
sd.rats <- c(sd.old,sd.young)
df.rats2 <- rbind(df.rats2, sd.rats)
row.names(df.rats2)[dim(df.rats2)[1]] <- "SD"

#Sample size
n.old <- 9
n.young <- 8
n.rats <- c(n.old,n.young)
df.rats2 <- rbind(df.rats2, n.rats)
row.names(df.rats2)[dim(df.rats2)[1]] <- "N"


#Difference between means
## Calculate difference btween the means
diff.means <- df.rats2["means",2]-
  df.rats2["means",1]

## Add difference two dataframe
df.rats2 <- rbind(df.rats2, c(diff.means,NA))

##Label row
row.names(df.rats2)[dim(df.rats2)[1]] <- "Diff. means"

If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

The standard deviation (SD) measures the amount of variability, or dispersion, from the individual data values to the mean. SD is a frequently-cited statistic in many applications from math and statistics to finance and investing.

Standard error of the mean (SEM) measures how far the sample mean (average) of the data is likely to be from the true population mean. The SEM is always smaller than the SD.

Key Takeaways

  • Standard deviation (SD) measures the dispersion of a dataset relative to its mean.
  • SD is used frequently in statistics, and in finance is often used as a proxy for the volatility or riskiness of an investment.
  • The standard error of the mean (SEM) measures how much discrepancy is likely in a sample’s mean compared with the population mean.
  • The SEM takes the SD and divides it by the square root of the sample size.
  • The SEM will always be smaller than the SD.

1:25

Click Play to Learn the Difference Between Standard Error and Standard Deviation

Standard Error of the Mean vs. Standard Deviation

Standard deviation and standard error are both used in all types of statistical studies, including those in finance, medicine, biology, engineering, and psychology. In these studies, the SD and the estimated SEM are used to present the characteristics of sample data and explain statistical analysis results.

However, some researchers occasionally confuse the SD and the SEM. Such researchers should remember that the calculations for SD and SEM include different statistical inferences, each of them with its own meaning. SD is the dispersion of individual data values. In other words, SD indicates how accurately the mean represents sample data.

However, the meaning of SEM includes statistical inference based on the sampling distribution. SEM is the SD of the theoretical distribution of the sample means (the sampling distribution).

A sampling distribution is a probability distribution of a sample statistic taken from a greater population. Researchers typically use sample data to estimate the population data, and the sampling distribution explains how the sample mean will vary from sample to sample. The standard error of the mean is the standard deviation of the sampling distribution of the mean.

Calculating SD and SEM

standard deviation σ=∑i=1n(xi−xˉ)2n−1variance=σ2standard error (σxˉ)=σnwhere:xˉ=the sample’s meann=the sample size\begin{aligned} &\text{standard deviation } \sigma = \sqrt{ \frac{ \sum_{i=1}^n{\left(x_i - \bar{x}\right)^2} }{n-1} } \\ &\text{variance} = {\sigma ^2 } \\ &\text{standard error }\left( \sigma_{\bar x} \right) = \frac{{\sigma }}{\sqrt{n}} \\ &\textbf{where:}\\ &\bar{x}=\text{the sample's mean}\\ &n=\text{the sample size}\\ \end{aligned}standard deviation σ=n1i=1n(xixˉ)2variance=σ2standard error (σxˉ)=nσwhere:xˉ=the sample’s meann=the sample size

Standard Deviation

The formula for the SD requires a few steps:

  1. First, take the square of the difference between each data point and the sample mean, finding the sum of those values.
  2. Next, divide that sum by the sample size minus one, which is the variance.
  3. Finally, take the square root of the variance to get the SD.

Standard Error of the Mean

SEM is calculated simply by taking the standard deviation and dividing it by the square root of the sample size.

Standard error gives the accuracy of a sample mean by measuring the sample-to-sample variability of the sample means. The SEM describes how precise the mean of the sample is as an estimate of the true mean of the population. As the size of the sample data grows larger, the SEM decreases vs. the SD; hence, as the sample size increases, the sample mean estimates the true mean of the population with greater precision.

In contrast, increasing the sample size does not make the SD necessarily larger or smaller; it just becomes a more accurate estimate of the population SD.

Standard Error and Standard Deviation in Finance

In finance, the SEM daily return of an asset measures the accuracy of the sample mean as an estimate of the long-run (persistent) mean daily return of the asset.

On the other hand, the SD of the return measures deviations of individual returns from the mean. Thus, SD is a measure of volatility and can be used as a risk measure for an investment. Assets with greater day-to-day price movements have a higher SD than assets with lesser day-to-day movements. Assuming a normal distribution, around 68% of daily price changes are within one SD of the mean, with around 95% of daily price changes within two SDs of the mean.

How Are Standard Deviation and Standard Error of the Mean Different?

Standard deviation measures the variability from specific data points to the mean. Standard error of the mean measures the precision of the sample mean to the population mean that it is meant to estimate.

Is the Standard Error Equal to the Standard Deviation?

No, the standard deviation (SD) will always be larger than the standard error (SE). This is because the standard error divides the standard deviation by the square root of the sample size. If the sample size is one, however, they will be the same - but a sample size of one is also rarely useful.

How Can You Compute the SE From the SD?

If you have the standard error (SE) and want to compute the standard deviation (SD) from it, simply multiply it by the square root of the sample size.

Why Do We Use Standard Error Instead of Standard Deviation?

Standard error is more commonly used when evaluating confidence intervals or statistical significance using statistical analysis.

What Is the Empirical Rule, and How Does It Relate to Standard Deviation?

A normal distribution is also known as a standard bell curve, since it looks like a bell in graph form. According to the empirical rule, or the 68-95-99.7 rule, 68% of all data observed under a normal distribution will fall within one standard deviation of the mean. Similarly, 95% falls within two standard deviations and 99.7% within three.

What is the standard error of the difference between two means?

The standard error for the difference between two means is larger than the standard error of either mean. It quantifies uncertainty. The uncertainty of the difference between two means is greater than the uncertainty in either mean. So the SE of the difference is greater than either SEM, but is less than their sum.

Can you calculate standard error from 2 samples?

Yes, it does. The equation for calculating the SE work for two values. But the ideal situation would be to use the raw data in your graph or table (namely the two values that you have) than representing the mean ± SE.

What is the formula for the standard error on the difference between two independent sample means?

The standard error of the mean for n independent observations is σ√n where σ is the standard deviation. So if we have two independent samples we have the standard errors for the means of group 1 and group 2. σμ1=σ1√n1.