Skip to main content
changes confidence interval to prediction interval
Source Link
caas
  • 535
  • 1
  • 4
  • 7

How to add confidenceprediction intervals to describe the variability in monthly samples of data?

The data analyzed here is a sample of individuals collected on a monthly basis. What would be the best way to compute "confidence"prediction intervals" for the monthly sample means, in order to indicate the natural variability that can be expected from this value month after month?

Here is an example:

  • All individuals are sampled with replacement from the same population whose mean is expected be the same across all months;
  • $y_i$ for individual $i$ is the variable of interest, with $ y_i \sim N(y,\sigma)$, both $y$ and $\sigma$ are unknown;
  • $N_m$ is the sample size for month $m$;
  • $\bar y_m$ is the sample mean for month $m$.

What would be the best way to compute a 95% confidenceprediction interval for $\bar y_m$?

I thought of doing the following:

  • $\bar y $ is the sample mean across the whole sample;
  • $\bar \sigma $ is the standard deviation across the whole sample;
  • For each month $j$, I compute the interval as $[ \bar y - 1.96 \frac{\bar \sigma}{ \sqrt{N_m}} ; \bar y + 1.96 \frac{\bar \sigma}{ \sqrt{N_m}} ]$.

I'm afraid this is not statistically correct. Simulations I've been doing show that this interval contains the monthly value more than 95 times out of 100. I assume this is caused by the fact that I do not consider the uncertainty in the estimation of $\bar y$.

What would be the correct way to proceed?

Thanks.

How to add confidence intervals to describe the variability in monthly samples of data?

The data analyzed here is a sample of individuals collected on a monthly basis. What would be the best way to compute "confidence intervals" for the monthly sample means, in order to indicate the natural variability that can be expected from this value month after month?

Here is an example:

  • All individuals are sampled with replacement from the same population whose mean is expected be the same across all months;
  • $N_m$ is the sample size for month $m$;
  • $\bar y_m$ is the sample mean for month $m$.

What would be the best way to compute a 95% confidence interval for $\bar y_m$?

I thought of doing the following:

  • $\bar y $ is the sample mean across the whole sample;
  • $\bar \sigma $ is the standard deviation across the whole sample;
  • For each month $j$, I compute the interval as $[ \bar y - 1.96 \frac{\bar \sigma}{ \sqrt{N_m}} ; \bar y + 1.96 \frac{\bar \sigma}{ \sqrt{N_m}} ]$.

I'm afraid this is not statistically correct. Simulations I've been doing show that this interval contains the monthly value more than 95 times out of 100. I assume this is caused by the fact that I do not consider the uncertainty in the estimation of $\bar y$.

What would be the correct way to proceed?

Thanks.

How to add prediction intervals to describe the variability in monthly samples of data?

The data analyzed here is a sample of individuals collected on a monthly basis. What would be the best way to compute "prediction intervals" for the monthly sample means, in order to indicate the natural variability that can be expected from this value month after month?

Here is an example:

  • All individuals are sampled with replacement from the same population whose mean is expected be the same across all months;
  • $y_i$ for individual $i$ is the variable of interest, with $ y_i \sim N(y,\sigma)$, both $y$ and $\sigma$ are unknown;
  • $N_m$ is the sample size for month $m$;
  • $\bar y_m$ is the sample mean for month $m$.

What would be the best way to compute a 95% prediction interval for $\bar y_m$?

I thought of doing the following:

  • $\bar y $ is the sample mean across the whole sample;
  • $\bar \sigma $ is the standard deviation across the whole sample;
  • For each month $j$, I compute the interval as $[ \bar y - 1.96 \frac{\bar \sigma}{ \sqrt{N_m}} ; \bar y + 1.96 \frac{\bar \sigma}{ \sqrt{N_m}} ]$.

I'm afraid this is not statistically correct. Simulations I've been doing show that this interval contains the monthly value more than 95 times out of 100. I assume this is caused by the fact that I do not consider the uncertainty in the estimation of $\bar y$.

What would be the correct way to proceed?

Thanks.

deleted 4 characters in body
Source Link
caas
  • 535
  • 1
  • 4
  • 7

The data analyzed here is a sample of individuals collected on a monthly basis. What would be the best way to compute "confidence intervals" for the monthly sample means, in order to indicate the natural variability that can be expected from this value month after month?

Here is an example:

  • All individuals are sampled with replacement from the same population whose mean is expected be the same across all months;
  • $N_m$ is the sample size for month $m$;
  • $\bar y_m$ is the sample mean for month $m$.

What would be the best way to compute a 95% confidence interval for $\bar y_m$?

I thought of doing the following:

  • $\bar y = $$\bar y $ is the sample mean across the whole sample;
  • $\bar \sigma = $$\bar \sigma $ is the standard deviation across the whole sample;
  • For each month $j$, I compute the interval as $[ \bar y - 1.96 \frac{\sigma}{ \sqrt{N_m}} ; \bar y + 1.96 \frac{\sigma}{ \sqrt{N_m}} ]$$[ \bar y - 1.96 \frac{\bar \sigma}{ \sqrt{N_m}} ; \bar y + 1.96 \frac{\bar \sigma}{ \sqrt{N_m}} ]$.

I'm afraid this is not statistically correct. Simulations I've been doing show that this interval contains the monthly value more than 95 times out of 100. I assume this is caused by the fact that I do not consider the uncertainty in the estimation of $\bar y$.

What would be the correct way to proceed?

Thanks.

The data analyzed here is a sample of individuals collected on a monthly basis. What would be the best way to compute "confidence intervals" for the monthly sample means, in order to indicate the natural variability that can be expected from this value month after month?

Here is an example:

  • All individuals are sampled with replacement from the same population whose mean is expected be the same across all months;
  • $N_m$ is the sample size for month $m$;
  • $\bar y_m$ is the sample mean for month $m$.

What would be the best way to compute a 95% confidence interval for $\bar y_m$?

I thought of doing the following:

  • $\bar y = $ is the sample mean across the whole sample;
  • $\bar \sigma = $ is the standard deviation across the whole sample;
  • For each month $j$, I compute the interval as $[ \bar y - 1.96 \frac{\sigma}{ \sqrt{N_m}} ; \bar y + 1.96 \frac{\sigma}{ \sqrt{N_m}} ]$.

I'm afraid this is not statistically correct. Simulations I've been doing show that this interval contains the monthly value more than 95 times out of 100. I assume this is caused by the fact that I do not consider the uncertainty in the estimation of $\bar y$.

What would be the correct way to proceed?

Thanks.

The data analyzed here is a sample of individuals collected on a monthly basis. What would be the best way to compute "confidence intervals" for the monthly sample means, in order to indicate the natural variability that can be expected from this value month after month?

Here is an example:

  • All individuals are sampled with replacement from the same population whose mean is expected be the same across all months;
  • $N_m$ is the sample size for month $m$;
  • $\bar y_m$ is the sample mean for month $m$.

What would be the best way to compute a 95% confidence interval for $\bar y_m$?

I thought of doing the following:

  • $\bar y $ is the sample mean across the whole sample;
  • $\bar \sigma $ is the standard deviation across the whole sample;
  • For each month $j$, I compute the interval as $[ \bar y - 1.96 \frac{\bar \sigma}{ \sqrt{N_m}} ; \bar y + 1.96 \frac{\bar \sigma}{ \sqrt{N_m}} ]$.

I'm afraid this is not statistically correct. Simulations I've been doing show that this interval contains the monthly value more than 95 times out of 100. I assume this is caused by the fact that I do not consider the uncertainty in the estimation of $\bar y$.

What would be the correct way to proceed?

Thanks.

equations formatting, removed R code
Source Link
caas
  • 535
  • 1
  • 4
  • 7

The data analyzed here is a sample of individuals collected on a monthly basis. What would be the best way to compute confidence intervals"confidence intervals" for the monthly sample means, in order to indicate the natural variability that can be expected from this value month after month?

Note: I do not wish to compute confidence intervals for the population mean, but for the sample means, assuming that the population mean is the same accross all months.

Here is an example dataset, where d$y is the value of interest, and d$m is the month:

d <- data.frame( y=rnorm(1000,6,6), m=factor(sample(seq(12),1000,replace=T)) )
  • All individuals are sampled with replacement from the same population whose mean is expected be the same across all months;
  • $N_m$ is the sample size for month $m$;
  • $\bar y_m$ is the sample mean for month $m$.

I would like it to be of the form mean(d$y) + ub(d$m) and mean(d$y) + ub(d$m). How to compute ub and lb?What would be the best way to compute a 95% confidence interval for $\bar y_m$?

I thought of doing the following for each month j:

  • the size of$\bar y = $ is the sample for month j is n <- NROW(subset(d,m==j))mean across the whole sample;
  • ub <- +qnorm(.975) * sd(d$y) / sqrt(n)$\bar \sigma = $ is the standard deviation across the whole sample;
  • lb <- -qnorm(.975) * sd(d$y) / sqrt(n) For each month $j$, I compute the interval as $[ \bar y - 1.96 \frac{\sigma}{ \sqrt{N_m}} ; \bar y + 1.96 \frac{\sigma}{ \sqrt{N_m}} ]$.

I'm afraid this is not statistically correct. WhatSimulations I've been doing show that this interval contains the monthly value more than 95 times out of 100. I assume this is caused by the correct way to proceed?fact that I do not consider the uncertainty in the estimation of $\bar y$.

What would be the correct way to proceed?

Thanks.

The data analyzed here is a sample of individuals collected on a monthly basis. What would be the best way to compute confidence intervals for the monthly sample means, in order to indicate the natural variability that can be expected from this value month after month?

Note: I do not wish to compute confidence intervals for the population mean, but for the sample means, assuming that the population mean is the same accross all months.

Here is an example dataset, where d$y is the value of interest, and d$m is the month:

d <- data.frame( y=rnorm(1000,6,6), m=factor(sample(seq(12),1000,replace=T)) )

I would like it to be of the form mean(d$y) + ub(d$m) and mean(d$y) + ub(d$m). How to compute ub and lb?

I thought of doing the following for each month j:

  • the size of the sample for month j is n <- NROW(subset(d,m==j))
  • ub <- +qnorm(.975) * sd(d$y) / sqrt(n)
  • lb <- -qnorm(.975) * sd(d$y) / sqrt(n)

I'm afraid this is not statistically correct. What is the correct way to proceed?

Thanks.

The data analyzed here is a sample of individuals collected on a monthly basis. What would be the best way to compute "confidence intervals" for the monthly sample means, in order to indicate the natural variability that can be expected from this value month after month?

Here is an example:

  • All individuals are sampled with replacement from the same population whose mean is expected be the same across all months;
  • $N_m$ is the sample size for month $m$;
  • $\bar y_m$ is the sample mean for month $m$.

What would be the best way to compute a 95% confidence interval for $\bar y_m$?

I thought of doing the following:

  • $\bar y = $ is the sample mean across the whole sample;
  • $\bar \sigma = $ is the standard deviation across the whole sample;
  • For each month $j$, I compute the interval as $[ \bar y - 1.96 \frac{\sigma}{ \sqrt{N_m}} ; \bar y + 1.96 \frac{\sigma}{ \sqrt{N_m}} ]$.

I'm afraid this is not statistically correct. Simulations I've been doing show that this interval contains the monthly value more than 95 times out of 100. I assume this is caused by the fact that I do not consider the uncertainty in the estimation of $\bar y$.

What would be the correct way to proceed?

Thanks.

Source Link
caas
  • 535
  • 1
  • 4
  • 7
Loading