Skip to main content
Bounty Ended with 25 reputation awarded by CommunityBot
added 1319 characters in body
Source Link
Eoin
  • 9.9k
  • 1
  • 24
  • 47

There is a simple counterexample to your suggestion. Imagine a case where some units are affected by large measurement error, while others have only small measurement error. It is more statistically efficient to collect more data from the units with greater measurement error than to collect the same amount from each unit (although.

Although the details depend on the model in question, here's a proof for a simple model. Say you have two patients, each patient's data are normally distributed with a patient-specific mean ($\mu_1$ and $\mu_2$) and standard deviation ($\sigma_1$ and $\sigma_2$), and you're interested in estimating the means. The error variance for each patient in this model is $\frac{\sigma_i^2}{n_i}$, where $n_i$ is the number of observations for patient $i$. You can collect $n = 100$ observations, and you want to minimise the total error variance, $\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{100 - n_1}$, since this should also minimise the expected sum of squared errors.

Let's say $\sigma_1 = 1$ and $\sigma_2 = 4$. We could find the value of $n_1$ that minimises the total error variance using calculus, but let's cheat and just use a computer.

total_squared_error = function(n1, n = 100, s1 = 1, s2 = 4){
  (s1^2 / n1) + (s2^2 / (n - n1))
}
plot(total_squared_error, 
     from = 1, to = 50, xlab = 'Observations for patient 1', ylab = 'Total RSE')

enter image description here

This shows that the lowest expected total squared error is achieved when $n_1 = 20$.

optimize(total_squared_error, c(1, 99))
$minimum
[1] 19.99999

$objective
[1] 0.25

There is a simple counterexample to your suggestion. Imagine a case where some units are affected by large measurement error, while others have only small measurement error. It is more statistically efficient to collect more data from the units with greater measurement error than to collect the same amount from each unit (although the details depend on the model in question).

There is a simple counterexample to your suggestion. Imagine a case where some units are affected by large measurement error, while others have only small measurement error. It is more statistically efficient to collect more data from the units with greater measurement error than to collect the same amount from each unit.

Although the details depend on the model in question, here's a proof for a simple model. Say you have two patients, each patient's data are normally distributed with a patient-specific mean ($\mu_1$ and $\mu_2$) and standard deviation ($\sigma_1$ and $\sigma_2$), and you're interested in estimating the means. The error variance for each patient in this model is $\frac{\sigma_i^2}{n_i}$, where $n_i$ is the number of observations for patient $i$. You can collect $n = 100$ observations, and you want to minimise the total error variance, $\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{100 - n_1}$, since this should also minimise the expected sum of squared errors.

Let's say $\sigma_1 = 1$ and $\sigma_2 = 4$. We could find the value of $n_1$ that minimises the total error variance using calculus, but let's cheat and just use a computer.

total_squared_error = function(n1, n = 100, s1 = 1, s2 = 4){
  (s1^2 / n1) + (s2^2 / (n - n1))
}
plot(total_squared_error, 
     from = 1, to = 50, xlab = 'Observations for patient 1', ylab = 'Total RSE')

enter image description here

This shows that the lowest expected total squared error is achieved when $n_1 = 20$.

optimize(total_squared_error, c(1, 99))
$minimum
[1] 19.99999

$objective
[1] 0.25
Source Link
Eoin
  • 9.9k
  • 1
  • 24
  • 47

There is a simple counterexample to your suggestion. Imagine a case where some units are affected by large measurement error, while others have only small measurement error. It is more statistically efficient to collect more data from the units with greater measurement error than to collect the same amount from each unit (although the details depend on the model in question).