Skip to main content
add doi
Source Link

Classical and Bayesian approaches to parameter estimation are often compared. See, for example What's the difference between a confidence interval and a credible interval?

What I cannot find is "the Bayesian version" of the following result. Consider a prediction interval for the next sample drawn from a normal distribution, and the probability of being wrong is alpha. No assumptions about the mean and the variance are needed.

Here is a proof. After observing $z_1$, ..., $z_n$, the sample mean and the sample variance are

$$m = \frac{1}{n}\sum_{i = 1}^{n} z_i, \quad s^2 = \frac{1}{n} \sum_{n = 1}^{n} (z_i - m)^2$$.

The random variable $$ \frac{z_{n + 1} - m}{s} \sqrt{\frac{n + 1}{n}} $$

has $t$-distribution with $n - 1$ degrees of freedom and $z_{n + 1}$ will be in the interval

$$m \pm t^{\alpha/2}_{n - 1} s\sqrt{\frac{n}{n + 1}}$$.

with probably $1 - \alpha$, where $t^{\alpha/2}$ is the value of percent point function (inverse of cdf) for $t$-distribution.

And a demonstration in python

#!/usr/bin/python3
import math
import random
import scipy.stats
import statistics
mu = 1.0
sigma = 1.0
alpha = 0.20
N = 1000
def rnd():
    return random.gauss(mu, sigma)
def interval(z):
    n = len(z) + 1
    m = statistics.mean(z)
    s = statistics.stdev(z)
    t = scipy.stats.t.ppf(1 - alpha/2, n - 2)
    d = t * s * math.sqrt(n/(n - 1))
    return m - d, m + d
z = [rnd(), rnd()]
wrong = 0
for i in range(N):
    x, y = interval(z)
    z0 = rnd()
    wrong += not x < z0 <= y
    z.append(z0)
print(wrong/N)

References

Fisher, R. A. (1935). The fiducial argument in statistical inference. Annals of eugenics, 6(4), 391-398. https://doi.org/10.1111/j.1469-1809.1935.tb02120.x

Shafer, G., & Vovk, V. (2008). A Tutorial on Conformal Prediction. Journal of Machine Learning Research, 9(3) (section 2.1)

Jaynes, E. T., & Kempthorne, O. (1976). Confidence intervals vs Bayesian intervals. In Foundations of probability theory, statistical inference, and statistical theories of science (pp. 175-257). Springer, Dordrech. https://doi.org/10.1007/978-94-010-1436-6_6

Classical and Bayesian approaches to parameter estimation are often compared. See, for example What's the difference between a confidence interval and a credible interval?

What I cannot find is "the Bayesian version" of the following result. Consider a prediction interval for the next sample drawn from a normal distribution, and the probability of being wrong is alpha. No assumptions about the mean and the variance are needed.

Here is a proof. After observing $z_1$, ..., $z_n$, the sample mean and the sample variance are

$$m = \frac{1}{n}\sum_{i = 1}^{n} z_i, \quad s^2 = \frac{1}{n} \sum_{n = 1}^{n} (z_i - m)^2$$.

The random variable $$ \frac{z_{n + 1} - m}{s} \sqrt{\frac{n + 1}{n}} $$

has $t$-distribution with $n - 1$ degrees of freedom and $z_{n + 1}$ will be in the interval

$$m \pm t^{\alpha/2}_{n - 1} s\sqrt{\frac{n}{n + 1}}$$.

with probably $1 - \alpha$, where $t^{\alpha/2}$ is the value of percent point function (inverse of cdf) for $t$-distribution.

And a demonstration in python

#!/usr/bin/python3
import math
import random
import scipy.stats
import statistics
mu = 1.0
sigma = 1.0
alpha = 0.20
N = 1000
def rnd():
    return random.gauss(mu, sigma)
def interval(z):
    n = len(z) + 1
    m = statistics.mean(z)
    s = statistics.stdev(z)
    t = scipy.stats.t.ppf(1 - alpha/2, n - 2)
    d = t * s * math.sqrt(n/(n - 1))
    return m - d, m + d
z = [rnd(), rnd()]
wrong = 0
for i in range(N):
    x, y = interval(z)
    z0 = rnd()
    wrong += not x < z0 <= y
    z.append(z0)
print(wrong/N)

References

Fisher, R. A. (1935). The fiducial argument in statistical inference. Annals of eugenics, 6(4), 391-398. https://doi.org/10.1111/j.1469-1809.1935.tb02120.x

Shafer, G., & Vovk, V. (2008). A Tutorial on Conformal Prediction. Journal of Machine Learning Research, 9(3) (section 2.1)

Classical and Bayesian approaches to parameter estimation are often compared. See, for example What's the difference between a confidence interval and a credible interval?

What I cannot find is "the Bayesian version" of the following result. Consider a prediction interval for the next sample drawn from a normal distribution, and the probability of being wrong is alpha. No assumptions about the mean and the variance are needed.

Here is a proof. After observing $z_1$, ..., $z_n$, the sample mean and the sample variance are

$$m = \frac{1}{n}\sum_{i = 1}^{n} z_i, \quad s^2 = \frac{1}{n} \sum_{n = 1}^{n} (z_i - m)^2$$.

The random variable $$ \frac{z_{n + 1} - m}{s} \sqrt{\frac{n + 1}{n}} $$

has $t$-distribution with $n - 1$ degrees of freedom and $z_{n + 1}$ will be in the interval

$$m \pm t^{\alpha/2}_{n - 1} s\sqrt{\frac{n}{n + 1}}$$.

with probably $1 - \alpha$, where $t^{\alpha/2}$ is the value of percent point function (inverse of cdf) for $t$-distribution.

And a demonstration in python

#!/usr/bin/python3
import math
import random
import scipy.stats
import statistics
mu = 1.0
sigma = 1.0
alpha = 0.20
N = 1000
def rnd():
    return random.gauss(mu, sigma)
def interval(z):
    n = len(z) + 1
    m = statistics.mean(z)
    s = statistics.stdev(z)
    t = scipy.stats.t.ppf(1 - alpha/2, n - 2)
    d = t * s * math.sqrt(n/(n - 1))
    return m - d, m + d
z = [rnd(), rnd()]
wrong = 0
for i in range(N):
    x, y = interval(z)
    z0 = rnd()
    wrong += not x < z0 <= y
    z.append(z0)
print(wrong/N)

References

Fisher, R. A. (1935). The fiducial argument in statistical inference. Annals of eugenics, 6(4), 391-398. https://doi.org/10.1111/j.1469-1809.1935.tb02120.x

Shafer, G., & Vovk, V. (2008). A Tutorial on Conformal Prediction. Journal of Machine Learning Research, 9(3) (section 2.1)

Jaynes, E. T., & Kempthorne, O. (1976). Confidence intervals vs Bayesian intervals. In Foundations of probability theory, statistical inference, and statistical theories of science (pp. 175-257). Springer, Dordrech. https://doi.org/10.1007/978-94-010-1436-6_6

Post Reopened by Jarle Tufto, kjetil b halvorsen
deleted 16 characters in body
Source Link
Jarle Tufto
  • 11.8k
  • 2
  • 36
  • 51

Classical and Bayesian approaches to parameter estimation are often compared. See, for example What's the difference between a confidence interval and a credible interval?

What I cannot find is "the Bayesian version" of the following result. Consider a confidence interval as a prediction interval for the next sample drawn from a normal distribution, and the probability of being wrong is alpha. No assumptions about the mean and the variance are needed.

Here is a proof. After observing $z_1$, ..., $z_n$, the sample mean and the sample variance are

$$m = \frac{1}{n}\sum_{i = 1}^{n} z_i, \quad s^2 = \frac{1}{n} \sum_{n = 1}^{n} (z_i - m)^2$$.

The random variable $$ \frac{z_{n + 1} - m}{s} \sqrt{\frac{n + 1}{n}} $$

has $t$-distribution with $n - 1$ degrees of freedom and $z_{n + 1}$ will be in the interval

$$m \pm t^{\alpha/2}_{n - 1} s\sqrt{\frac{n}{n + 1}}$$.

with probably $1 - \alpha$, where $t^{\alpha/2}$ is the value of percent point function (inverse of cdf) for $t$-distribution.

And a demonstration in python

#!/usr/bin/python3
import math
import random
import scipy.stats
import statistics
mu = 1.0
sigma = 1.0
alpha = 0.20
N = 1000
def rnd():
    return random.gauss(mu, sigma)
def interval(z):
    n = len(z) + 1
    m = statistics.mean(z)
    s = statistics.stdev(z)
    t = scipy.stats.t.ppf(1 - alpha/2, n - 2)
    d = t * s * math.sqrt(n/(n - 1))
    return m - d, m + d
z = [rnd(), rnd()]
wrong = 0
for i in range(N):
    x, y = interval(z)
    z0 = rnd()
    wrong += not x < z0 <= y
    z.append(z0)
print(wrong/N)

References

Fisher, R. A. (1935). The fiducial argument in statistical inference. Annals of eugenics, 6(4), 391-398. https://doi.org/10.1111/j.1469-1809.1935.tb02120.x

Shafer, G., & Vovk, V. (2008). A Tutorial on Conformal Prediction. Journal of Machine Learning Research, 9(3) (section 2.1)

Classical and Bayesian approaches to parameter estimation are often compared. See, for example What's the difference between a confidence interval and a credible interval?

What I cannot find is "the Bayesian version" of the following result. Consider a confidence interval as a prediction for the next sample drawn from a normal distribution, and the probability of being wrong is alpha. No assumptions about the mean and the variance are needed.

Here is a proof. After observing $z_1$, ..., $z_n$, the sample mean and the sample variance are

$$m = \frac{1}{n}\sum_{i = 1}^{n} z_i, \quad s^2 = \frac{1}{n} \sum_{n = 1}^{n} (z_i - m)^2$$.

The random variable $$ \frac{z_{n + 1} - m}{s} \sqrt{\frac{n + 1}{n}} $$

has $t$-distribution with $n - 1$ degrees of freedom and $z_{n + 1}$ will be in the interval

$$m \pm t^{\alpha/2}_{n - 1} s\sqrt{\frac{n}{n + 1}}$$.

with probably $1 - \alpha$, where $t^{\alpha/2}$ is the value of percent point function (inverse of cdf) for $t$-distribution.

And a demonstration in python

#!/usr/bin/python3
import math
import random
import scipy.stats
import statistics
mu = 1.0
sigma = 1.0
alpha = 0.20
N = 1000
def rnd():
    return random.gauss(mu, sigma)
def interval(z):
    n = len(z) + 1
    m = statistics.mean(z)
    s = statistics.stdev(z)
    t = scipy.stats.t.ppf(1 - alpha/2, n - 2)
    d = t * s * math.sqrt(n/(n - 1))
    return m - d, m + d
z = [rnd(), rnd()]
wrong = 0
for i in range(N):
    x, y = interval(z)
    z0 = rnd()
    wrong += not x < z0 <= y
    z.append(z0)
print(wrong/N)

References

Fisher, R. A. (1935). The fiducial argument in statistical inference. Annals of eugenics, 6(4), 391-398. https://doi.org/10.1111/j.1469-1809.1935.tb02120.x

Shafer, G., & Vovk, V. (2008). A Tutorial on Conformal Prediction. Journal of Machine Learning Research, 9(3) (section 2.1)

Classical and Bayesian approaches to parameter estimation are often compared. See, for example What's the difference between a confidence interval and a credible interval?

What I cannot find is "the Bayesian version" of the following result. Consider a prediction interval for the next sample drawn from a normal distribution, and the probability of being wrong is alpha. No assumptions about the mean and the variance are needed.

Here is a proof. After observing $z_1$, ..., $z_n$, the sample mean and the sample variance are

$$m = \frac{1}{n}\sum_{i = 1}^{n} z_i, \quad s^2 = \frac{1}{n} \sum_{n = 1}^{n} (z_i - m)^2$$.

The random variable $$ \frac{z_{n + 1} - m}{s} \sqrt{\frac{n + 1}{n}} $$

has $t$-distribution with $n - 1$ degrees of freedom and $z_{n + 1}$ will be in the interval

$$m \pm t^{\alpha/2}_{n - 1} s\sqrt{\frac{n}{n + 1}}$$.

with probably $1 - \alpha$, where $t^{\alpha/2}$ is the value of percent point function (inverse of cdf) for $t$-distribution.

And a demonstration in python

#!/usr/bin/python3
import math
import random
import scipy.stats
import statistics
mu = 1.0
sigma = 1.0
alpha = 0.20
N = 1000
def rnd():
    return random.gauss(mu, sigma)
def interval(z):
    n = len(z) + 1
    m = statistics.mean(z)
    s = statistics.stdev(z)
    t = scipy.stats.t.ppf(1 - alpha/2, n - 2)
    d = t * s * math.sqrt(n/(n - 1))
    return m - d, m + d
z = [rnd(), rnd()]
wrong = 0
for i in range(N):
    x, y = interval(z)
    z0 = rnd()
    wrong += not x < z0 <= y
    z.append(z0)
print(wrong/N)

References

Fisher, R. A. (1935). The fiducial argument in statistical inference. Annals of eugenics, 6(4), 391-398. https://doi.org/10.1111/j.1469-1809.1935.tb02120.x

Shafer, G., & Vovk, V. (2008). A Tutorial on Conformal Prediction. Journal of Machine Learning Research, 9(3) (section 2.1)

added 166 characters in body
Source Link

ConsiderClassical and Bayesian approaches to parameter estimation are often compared. See, for example What's the difference between a confidence interval and a credible interval?

What I cannot find is "the Bayesian version" of the following result. Consider a confidence interval as a prediction for the next sample drawn from a normal distribution, and the probability of being wrong is alpha. No assumptions about the mean and the variance are needed. Is there a Bayesian interpretation of this result?

Here is a proof. After observing $z_1$, ..., $z_n$, the sample mean and the sample variance are

$$m = \frac{1}{n}\sum_{i = 1}^{n} z_i, \quad s^2 = \frac{1}{n} \sum_{n = 1}^{n} (z_i - m)^2$$.

The random variable $$ \frac{z_{n + 1} - m}{s} \sqrt{\frac{n + 1}{n}} $$

has $t$-distribution with $n - 1$ degrees of freedom and $z_{n + 1}$ will be in the interval

$$m \pm t^{\alpha/2}_{n - 1} s\sqrt{\frac{n}{n + 1}}$$.

with probably $1 - \alpha$, where $t^{\alpha/2}$ is the value of percent point function (inverse of cdf) for $t$-distribution.

And a demonstration in python

#!/usr/bin/python3
import math
import random
import scipy.stats
import statistics
mu = 1.0
sigma = 1.0
alpha = 0.20
N = 1000
def rnd():
    return random.gauss(mu, sigma)
def interval(z):
    n = len(z) + 1
    m = statistics.mean(z)
    s = statistics.stdev(z)
    t = scipy.stats.t.ppf(1 - alpha/2, n - 2)
    d = t * s * math.sqrt(n/(n - 1))
    return m - d, m + d
z = [rnd(), rnd()]
wrong = 0
for i in range(N):
    x, y = interval(z)
    z0 = rnd()
    wrong += not x < z0 <= y
    z.append(z0)
print(wrong/N)

References

Fisher, R. A. (1935). The fiducial argument in statistical inference. Annals of eugenics, 6(4), 391-398. https://doi.org/10.1111/j.1469-1809.1935.tb02120.x

Shafer, G., & Vovk, V. (2008). A Tutorial on Conformal Prediction. Journal of Machine Learning Research, 9(3) (section 2.1)

Consider a confidence interval as a prediction for the next sample drawn from a normal distribution, and the probability of being wrong is alpha. No assumptions about the mean and the variance are needed. Is there a Bayesian interpretation of this result?

Here is a proof. After observing $z_1$, ..., $z_n$, the sample mean and the sample variance are

$$m = \frac{1}{n}\sum_{i = 1}^{n} z_i, \quad s^2 = \frac{1}{n} \sum_{n = 1}^{n} (z_i - m)^2$$.

The random variable $$ \frac{z_{n + 1} - m}{s} \sqrt{\frac{n + 1}{n}} $$

has $t$-distribution with $n - 1$ degrees of freedom and $z_{n + 1}$ will be in the interval

$$m \pm t^{\alpha/2}_{n - 1} s\sqrt{\frac{n}{n + 1}}$$.

with probably $1 - \alpha$, where $t^{\alpha/2}$ is the value of percent point function (inverse of cdf) for $t$-distribution.

And a demonstration in python

#!/usr/bin/python3
import math
import random
import scipy.stats
import statistics
mu = 1.0
sigma = 1.0
alpha = 0.20
N = 1000
def rnd():
    return random.gauss(mu, sigma)
def interval(z):
    n = len(z) + 1
    m = statistics.mean(z)
    s = statistics.stdev(z)
    t = scipy.stats.t.ppf(1 - alpha/2, n - 2)
    d = t * s * math.sqrt(n/(n - 1))
    return m - d, m + d
z = [rnd(), rnd()]
wrong = 0
for i in range(N):
    x, y = interval(z)
    z0 = rnd()
    wrong += not x < z0 <= y
    z.append(z0)
print(wrong/N)

References

Fisher, R. A. (1935). The fiducial argument in statistical inference. Annals of eugenics, 6(4), 391-398. https://doi.org/10.1111/j.1469-1809.1935.tb02120.x

Shafer, G., & Vovk, V. (2008). A Tutorial on Conformal Prediction. Journal of Machine Learning Research, 9(3) (section 2.1)

Classical and Bayesian approaches to parameter estimation are often compared. See, for example What's the difference between a confidence interval and a credible interval?

What I cannot find is "the Bayesian version" of the following result. Consider a confidence interval as a prediction for the next sample drawn from a normal distribution, and the probability of being wrong is alpha. No assumptions about the mean and the variance are needed.

Here is a proof. After observing $z_1$, ..., $z_n$, the sample mean and the sample variance are

$$m = \frac{1}{n}\sum_{i = 1}^{n} z_i, \quad s^2 = \frac{1}{n} \sum_{n = 1}^{n} (z_i - m)^2$$.

The random variable $$ \frac{z_{n + 1} - m}{s} \sqrt{\frac{n + 1}{n}} $$

has $t$-distribution with $n - 1$ degrees of freedom and $z_{n + 1}$ will be in the interval

$$m \pm t^{\alpha/2}_{n - 1} s\sqrt{\frac{n}{n + 1}}$$.

with probably $1 - \alpha$, where $t^{\alpha/2}$ is the value of percent point function (inverse of cdf) for $t$-distribution.

And a demonstration in python

#!/usr/bin/python3
import math
import random
import scipy.stats
import statistics
mu = 1.0
sigma = 1.0
alpha = 0.20
N = 1000
def rnd():
    return random.gauss(mu, sigma)
def interval(z):
    n = len(z) + 1
    m = statistics.mean(z)
    s = statistics.stdev(z)
    t = scipy.stats.t.ppf(1 - alpha/2, n - 2)
    d = t * s * math.sqrt(n/(n - 1))
    return m - d, m + d
z = [rnd(), rnd()]
wrong = 0
for i in range(N):
    x, y = interval(z)
    z0 = rnd()
    wrong += not x < z0 <= y
    z.append(z0)
print(wrong/N)

References

Fisher, R. A. (1935). The fiducial argument in statistical inference. Annals of eugenics, 6(4), 391-398. https://doi.org/10.1111/j.1469-1809.1935.tb02120.x

Shafer, G., & Vovk, V. (2008). A Tutorial on Conformal Prediction. Journal of Machine Learning Research, 9(3) (section 2.1)

added 300 characters in body
Source Link
Loading
deleted 2 characters in body
Source Link
Loading
added 579 characters in body
Source Link
Loading
Post Closed as "Needs details or clarity" by Jarle Tufto, whuber
Source Link
Loading