idx
int64
1
56k
question
stringlengths
15
155
answer
stringlengths
2
29.2k
question_cut
stringlengths
15
100
answer_cut
stringlengths
2
200
conversation
stringlengths
47
29.3k
conversation_cut
stringlengths
47
301
19,401
What is the probability of 4 person in group of 18 can have same birth month?
This is a balls-into-bins problem. The probability that the maximum occupancy of any bin is $m$, given $n$ bins and $r$ randomly allocated balls is the coefficient of $x^r$ in $\begingroup \Large \begin{equation} \left(\sum _{i=0}^m \frac{x^i}{i!}\right)^n\end{equation} \endgroup$ multiplied by $\begingroup \Large \begin{equation} r! n^{-r}\end{equation} \endgroup$ Evaluating this for the "4 or more" and "exactly 4" cases yields $$\frac{555795868793273}{962938848411648} \approx 0.577187$$ and $$\frac{19807122209875}{47552535724032} \approx 0.416531$$ respectively for your query.
What is the probability of 4 person in group of 18 can have same birth month?
This is a balls-into-bins problem. The probability that the maximum occupancy of any bin is $m$, given $n$ bins and $r$ randomly allocated balls is the coefficient of $x^r$ in $\begingroup \Large \beg
What is the probability of 4 person in group of 18 can have same birth month? This is a balls-into-bins problem. The probability that the maximum occupancy of any bin is $m$, given $n$ bins and $r$ randomly allocated balls is the coefficient of $x^r$ in $\begingroup \Large \begin{equation} \left(\sum _{i=0}^m \frac{x^i}{i!}\right)^n\end{equation} \endgroup$ multiplied by $\begingroup \Large \begin{equation} r! n^{-r}\end{equation} \endgroup$ Evaluating this for the "4 or more" and "exactly 4" cases yields $$\frac{555795868793273}{962938848411648} \approx 0.577187$$ and $$\frac{19807122209875}{47552535724032} \approx 0.416531$$ respectively for your query.
What is the probability of 4 person in group of 18 can have same birth month? This is a balls-into-bins problem. The probability that the maximum occupancy of any bin is $m$, given $n$ bins and $r$ randomly allocated balls is the coefficient of $x^r$ in $\begingroup \Large \beg
19,402
Why does the standard deviation not decrease when I do more measurements? [duplicate]
The standard deviation is a measurement of the "spread" of your data. The analogy I like to use is target shooting. If you're an accurate shooter, your shots cluster very tightly around the bullseye (small standard deviation). If you're not accurate, they are more spread out (large standard deviation). Some data is fundamentally "all over the place", and some is fundamentally tightly clustered about the mean. If you take more measurements, you are getting a more accurate picture of the spread. You shouldn't expect to get less spread--just less error in your measurement of a fundamental characteristic of the data. If you have an inaccurate shooter take five shots, and an accurate shooter take five shots, you will get a not-too-reliable idea of their accuracy. Maybe the inaccurate shooter got lucky a few times, so the pattern is tighter than you would expect from him over the long haul. Similarly, maybe you caught the accurate shooter at a bad time and just happened to get two bad shots in the five, skewing the results. If, instead, you have them each take a thousand shots, then you will be much more confident that you are getting a good look at their actual accuracy. It's not the accuracy of the shooter changing as you get more data--it's the confidence you have in the picture you are getting of their accuracy.
Why does the standard deviation not decrease when I do more measurements? [duplicate]
The standard deviation is a measurement of the "spread" of your data. The analogy I like to use is target shooting. If you're an accurate shooter, your shots cluster very tightly around the bullseye
Why does the standard deviation not decrease when I do more measurements? [duplicate] The standard deviation is a measurement of the "spread" of your data. The analogy I like to use is target shooting. If you're an accurate shooter, your shots cluster very tightly around the bullseye (small standard deviation). If you're not accurate, they are more spread out (large standard deviation). Some data is fundamentally "all over the place", and some is fundamentally tightly clustered about the mean. If you take more measurements, you are getting a more accurate picture of the spread. You shouldn't expect to get less spread--just less error in your measurement of a fundamental characteristic of the data. If you have an inaccurate shooter take five shots, and an accurate shooter take five shots, you will get a not-too-reliable idea of their accuracy. Maybe the inaccurate shooter got lucky a few times, so the pattern is tighter than you would expect from him over the long haul. Similarly, maybe you caught the accurate shooter at a bad time and just happened to get two bad shots in the five, skewing the results. If, instead, you have them each take a thousand shots, then you will be much more confident that you are getting a good look at their actual accuracy. It's not the accuracy of the shooter changing as you get more data--it's the confidence you have in the picture you are getting of their accuracy.
Why does the standard deviation not decrease when I do more measurements? [duplicate] The standard deviation is a measurement of the "spread" of your data. The analogy I like to use is target shooting. If you're an accurate shooter, your shots cluster very tightly around the bullseye
19,403
Why does the standard deviation not decrease when I do more measurements? [duplicate]
This question seems trivial to statisticians, but I managed to make this mistake twice, and after a colleague of mine also made the same mistake, I decided to write the answer, in order to help myself and other people making the same mistake. The standard deviation does not become lower when the number of measurements grows.. The standard deviation is just the square root of the average of the square distance of measurements from the mean. So, for example, if the "real" value that is measured is 1, half of the measurements are 1.05, and half of the measurements are 0.95, then the mean will be 1, which is just the correct value, and the std will be 0.05, regardless of the number of experiments. The thing that does become lower when the number of measurements grows is the confidence interval, which is inversely proportional to the square root of the number of measurements. For example, the radius of the 95% confidence interval is approximately: $$1.96 \cdot \frac{SD({\rm Measurements})}{\sqrt{{\rm Count(Measurements)}}}$$ So, the question comes from confusing between the standard deviation and the confidence interval.
Why does the standard deviation not decrease when I do more measurements? [duplicate]
This question seems trivial to statisticians, but I managed to make this mistake twice, and after a colleague of mine also made the same mistake, I decided to write the answer, in order to help myself
Why does the standard deviation not decrease when I do more measurements? [duplicate] This question seems trivial to statisticians, but I managed to make this mistake twice, and after a colleague of mine also made the same mistake, I decided to write the answer, in order to help myself and other people making the same mistake. The standard deviation does not become lower when the number of measurements grows.. The standard deviation is just the square root of the average of the square distance of measurements from the mean. So, for example, if the "real" value that is measured is 1, half of the measurements are 1.05, and half of the measurements are 0.95, then the mean will be 1, which is just the correct value, and the std will be 0.05, regardless of the number of experiments. The thing that does become lower when the number of measurements grows is the confidence interval, which is inversely proportional to the square root of the number of measurements. For example, the radius of the 95% confidence interval is approximately: $$1.96 \cdot \frac{SD({\rm Measurements})}{\sqrt{{\rm Count(Measurements)}}}$$ So, the question comes from confusing between the standard deviation and the confidence interval.
Why does the standard deviation not decrease when I do more measurements? [duplicate] This question seems trivial to statisticians, but I managed to make this mistake twice, and after a colleague of mine also made the same mistake, I decided to write the answer, in order to help myself
19,404
Why does the standard deviation not decrease when I do more measurements? [duplicate]
The mean and standard deviation are population properties. As you increase your number of observations you will on average get more precise estimates from your sample for both the population mean and standard deviation. It sounds like you are confusing the standard error of the mean with the standard deviation. The standard error of the mean is the standard deviation of your estimate of the mean. The standard error of the mean (i.e., the precision of your estimate of the mean) does get smaller as sample size increases. http://en.wikipedia.org/wiki/Standard_error#Standard_error_of_the_mean
Why does the standard deviation not decrease when I do more measurements? [duplicate]
The mean and standard deviation are population properties. As you increase your number of observations you will on average get more precise estimates from your sample for both the population mean and
Why does the standard deviation not decrease when I do more measurements? [duplicate] The mean and standard deviation are population properties. As you increase your number of observations you will on average get more precise estimates from your sample for both the population mean and standard deviation. It sounds like you are confusing the standard error of the mean with the standard deviation. The standard error of the mean is the standard deviation of your estimate of the mean. The standard error of the mean (i.e., the precision of your estimate of the mean) does get smaller as sample size increases. http://en.wikipedia.org/wiki/Standard_error#Standard_error_of_the_mean
Why does the standard deviation not decrease when I do more measurements? [duplicate] The mean and standard deviation are population properties. As you increase your number of observations you will on average get more precise estimates from your sample for both the population mean and
19,405
Optimization and Machine Learning
The way I look at it is that statistics / machine learning tells you what you should be optimizing, and optimization is how you actually do so. For example, consider linear regression with $Y = X\beta + \varepsilon$ where $E(\varepsilon) = 0$ and $Var(\varepsilon) = \sigma^2I$. Statistics tells us that this is (often) a good model, but we find our actual estimate $\hat \beta$ by solving an optimization problem $$ \hat \beta = \textrm{argmin}_{b \in \mathbb R^p} ||Y - Xb||^2. $$ The properties of $\hat \beta$ are known to us through statistics so we know that this is a good optimization problem to solve. In this case it is an easy optimization but this still shows the general principle. More generally, much of machine learning can be viewed as solving $$ \hat f = \textrm{argmin}_{f \in \mathscr F} \frac 1n \sum_{i=1}^n L(y_i, f(x_i)) $$ where I'm writing this without regularization but that could easily be added. A huge amount of research in statistical learning theory (SLT) has studied the properties of these argminima, whether or not they are asymptotically optimal, how they relate to the complexity of $\mathscr F$, and many other such things. But when you actually want to get $\hat f$, often you end up with a difficult optimization and it's a whole separate set of people who study that problem. I think the history of SVM is a good example here. We have the SLT people like Vapnik and Cortes (and many others) who showed how SVM is a good optimization problem to solve. But then it was others like John Platt and the LIBSVM authors who made this feasible in practice. To answer your exact question, knowing some optimization is certainly helpful but generally no one is an expert in all these areas so you learn as much as you can but some aspects will always be something of a black box to you. Maybe you haven't properly studied the SLT results behind your favorite ML algorithm, or maybe you don't know the inner workings of the optimizer you're using. It's a lifelong journey.
Optimization and Machine Learning
The way I look at it is that statistics / machine learning tells you what you should be optimizing, and optimization is how you actually do so. For example, consider linear regression with $Y = X\beta
Optimization and Machine Learning The way I look at it is that statistics / machine learning tells you what you should be optimizing, and optimization is how you actually do so. For example, consider linear regression with $Y = X\beta + \varepsilon$ where $E(\varepsilon) = 0$ and $Var(\varepsilon) = \sigma^2I$. Statistics tells us that this is (often) a good model, but we find our actual estimate $\hat \beta$ by solving an optimization problem $$ \hat \beta = \textrm{argmin}_{b \in \mathbb R^p} ||Y - Xb||^2. $$ The properties of $\hat \beta$ are known to us through statistics so we know that this is a good optimization problem to solve. In this case it is an easy optimization but this still shows the general principle. More generally, much of machine learning can be viewed as solving $$ \hat f = \textrm{argmin}_{f \in \mathscr F} \frac 1n \sum_{i=1}^n L(y_i, f(x_i)) $$ where I'm writing this without regularization but that could easily be added. A huge amount of research in statistical learning theory (SLT) has studied the properties of these argminima, whether or not they are asymptotically optimal, how they relate to the complexity of $\mathscr F$, and many other such things. But when you actually want to get $\hat f$, often you end up with a difficult optimization and it's a whole separate set of people who study that problem. I think the history of SVM is a good example here. We have the SLT people like Vapnik and Cortes (and many others) who showed how SVM is a good optimization problem to solve. But then it was others like John Platt and the LIBSVM authors who made this feasible in practice. To answer your exact question, knowing some optimization is certainly helpful but generally no one is an expert in all these areas so you learn as much as you can but some aspects will always be something of a black box to you. Maybe you haven't properly studied the SLT results behind your favorite ML algorithm, or maybe you don't know the inner workings of the optimizer you're using. It's a lifelong journey.
Optimization and Machine Learning The way I look at it is that statistics / machine learning tells you what you should be optimizing, and optimization is how you actually do so. For example, consider linear regression with $Y = X\beta
19,406
Optimization and Machine Learning
In practice, a lot of packages take care of the optimization and most of the math details for you. For example, TensorFlow can do backprop+stochastic gradient descent for training neural nets for you automatically (you just have to specify learning rate). scikit-learn's ML tools will generally not require you to actually know stuff about how the optimization actually occurs, but maybe just set some tuning parameters and it takes care of the rest (e.g. number of iterations the optimizer runs for). For example, you can train a SVM without knowing any math in scikit-learn-- just feed in the data, kernel type, and move on. That being said, knowing basic optimization (e.g. at the level of Boyd and Vandenberghe's Convex Optimization / Bertsekas' Nonlinear programming) can be helpful in algorithm / problem design and analysis, especially if you're working on theory stuff. Or, implementing the optimization algorithms yourself. Note that the textbook optimization methods often need tweaks to actually work in practice in modern settings; for example, you might not use classic Robbins-Munroe stochastic gradient descent, but a faster accelerated variant. Nevertheless, you can gain some insights from working with the optimization problems.
Optimization and Machine Learning
In practice, a lot of packages take care of the optimization and most of the math details for you. For example, TensorFlow can do backprop+stochastic gradient descent for training neural nets for you
Optimization and Machine Learning In practice, a lot of packages take care of the optimization and most of the math details for you. For example, TensorFlow can do backprop+stochastic gradient descent for training neural nets for you automatically (you just have to specify learning rate). scikit-learn's ML tools will generally not require you to actually know stuff about how the optimization actually occurs, but maybe just set some tuning parameters and it takes care of the rest (e.g. number of iterations the optimizer runs for). For example, you can train a SVM without knowing any math in scikit-learn-- just feed in the data, kernel type, and move on. That being said, knowing basic optimization (e.g. at the level of Boyd and Vandenberghe's Convex Optimization / Bertsekas' Nonlinear programming) can be helpful in algorithm / problem design and analysis, especially if you're working on theory stuff. Or, implementing the optimization algorithms yourself. Note that the textbook optimization methods often need tweaks to actually work in practice in modern settings; for example, you might not use classic Robbins-Munroe stochastic gradient descent, but a faster accelerated variant. Nevertheless, you can gain some insights from working with the optimization problems.
Optimization and Machine Learning In practice, a lot of packages take care of the optimization and most of the math details for you. For example, TensorFlow can do backprop+stochastic gradient descent for training neural nets for you
19,407
Central limit theorem and the Pareto distribution
The statement is not true in general -- the Pareto distribution does have a finite mean if its shape parameter ($\alpha$ at the link) is greater than 1. When both the mean and the variance are finite ($\alpha>2$), the usual forms of the central limit theorem - e.g. classical, Lyapunov, Lindeberg will apply See the description of the classical central limit theorem here The quote is kind of weird, because the central limit theorem (in any of the mentioned forms) doesn't apply to the sample mean itself, but to a standardized mean (and if we try to apply it to something whose mean and variance are not finite we'd need to very carefully explain what we're actually talking about, since the numerator and denominator involve things which don't have finite limits). Nevertheless (in spite of not quite being correctly expressed for talking about central limit theorems) it does have something of an underlying point -- if the shape parameter is small enough, the sample mean won't converge to the population mean (the weak law of large numbers doesn't hold, since the integral defining the mean is not finite). As kjetil rightly points out in comments, if we're to avoid the rate of convergence being terrible (i.e. to be able to use it in practice), we need some kind of bound on "how far way"/"how quickly" the approximation kicks in. It's no use having an adequate approximation for $n> 10^{10^{100}}$ (say) if we want some practical use from a normal approximation. The central limit theorem is about the destination but tells us nothing about how fast we get there; there are, however, results like the Berry-Esseen theorem theorem which do bound the rate (in a particular sense). In the case of Berry-Esseen, it bounds the largest distance between distribution function of the standardized mean and the standard normal cdf in terms of the third absolute moment, $E(|X|^3)$. So in the case of the Pareto, if $\alpha\gt 3$, we can at least get some bound on just how bad the approximation might be at some $n$, and how quickly we're getting there. (On the other hand, bounding the difference in cdfs isn't necessarily an especially "practical" thing to bound -- what you're interested may not relate especially well to a bound on the difference in tail area). Nevertheless, it is something (and in at least some situations a cdf bound is more directly useful).
Central limit theorem and the Pareto distribution
The statement is not true in general -- the Pareto distribution does have a finite mean if its shape parameter ($\alpha$ at the link) is greater than 1. When both the mean and the variance are finite
Central limit theorem and the Pareto distribution The statement is not true in general -- the Pareto distribution does have a finite mean if its shape parameter ($\alpha$ at the link) is greater than 1. When both the mean and the variance are finite ($\alpha>2$), the usual forms of the central limit theorem - e.g. classical, Lyapunov, Lindeberg will apply See the description of the classical central limit theorem here The quote is kind of weird, because the central limit theorem (in any of the mentioned forms) doesn't apply to the sample mean itself, but to a standardized mean (and if we try to apply it to something whose mean and variance are not finite we'd need to very carefully explain what we're actually talking about, since the numerator and denominator involve things which don't have finite limits). Nevertheless (in spite of not quite being correctly expressed for talking about central limit theorems) it does have something of an underlying point -- if the shape parameter is small enough, the sample mean won't converge to the population mean (the weak law of large numbers doesn't hold, since the integral defining the mean is not finite). As kjetil rightly points out in comments, if we're to avoid the rate of convergence being terrible (i.e. to be able to use it in practice), we need some kind of bound on "how far way"/"how quickly" the approximation kicks in. It's no use having an adequate approximation for $n> 10^{10^{100}}$ (say) if we want some practical use from a normal approximation. The central limit theorem is about the destination but tells us nothing about how fast we get there; there are, however, results like the Berry-Esseen theorem theorem which do bound the rate (in a particular sense). In the case of Berry-Esseen, it bounds the largest distance between distribution function of the standardized mean and the standard normal cdf in terms of the third absolute moment, $E(|X|^3)$. So in the case of the Pareto, if $\alpha\gt 3$, we can at least get some bound on just how bad the approximation might be at some $n$, and how quickly we're getting there. (On the other hand, bounding the difference in cdfs isn't necessarily an especially "practical" thing to bound -- what you're interested may not relate especially well to a bound on the difference in tail area). Nevertheless, it is something (and in at least some situations a cdf bound is more directly useful).
Central limit theorem and the Pareto distribution The statement is not true in general -- the Pareto distribution does have a finite mean if its shape parameter ($\alpha$ at the link) is greater than 1. When both the mean and the variance are finite
19,408
Central limit theorem and the Pareto distribution
I will add an answer showing how bad the approximation from the central limit theorem (CLT) can be for the Pareto distribution, even in a case where the assumptions for CLT is fulfilled. The assumption is that there must be a finite variance, which for the Pareto means that $\alpha > 2$. For a more theoretical discussion of why this is so, see my answer here: What is the difference between finite and infinite variance I will simulate data from the Pareto distribution with parameter $\alpha=2.1$, so that the variance "just barely exists". Redo my simulations with $\alpha=3.1$ to see the difference! Here is some R code: ### Pareto dist and the central limit theorem ### require(actuar) # for (dpqr)pareto1() require(MASS) # for Scott() require(scales) # for alpha() # We use (dpqr)pareto1(x,alpha,1) # alpha <- 2.1 # variance just barely exist E <- function(alpha) ifelse(alpha <= 1,Inf,alpha/(alpha-1)) VAR <- function(alpha) ifelse(alpha <= 2, Inf, alpha/((alpha-1)^2 * (alpha-2))) R <- 10000 e <- E(alpha) sigma <- sqrt(VAR(alpha)) sim <- function(n) { replicate(R, {x <- rpareto1(n,alpha,1) x <- x-e mean(x)*sqrt(n)/sigma },simplify=TRUE) } sim1 <- sim(10) sim2 <- sim(100) sim3 <- sim(1000) sim4 <- sim(10000) # do take some time ... ### These are standardized so have all ### theoretically variance 1. ### But due to the long tail, the empirical variances are ### (surprisingly!) much lower: sd(sim1) sd(sim2) sd(sim3) sd(sim4) ### Now we plot the histograms: hist(sim1, prob=TRUE, breaks="Scott", col=alpha("grey05", 0.95), main="simulated Pareto means", xlim=c(-1.8,16)) hist(sim2, prob=TRUE, breaks="Scott", col=alpha("grey30", 0.5), add=TRUE) hist(sim3, prob=TRUE, breaks="Scott", col=alpha("grey60", 0.5), add=TRUE) hist(sim4, prob=TRUE, breaks="Scott", col=alpha("grey90", 0.5), add=TRUE) plot(dnorm, from=-1.8, to=5, col=alpha("red", 0.5), add=TRUE) And here is the plot: One can see that even at sample size $n=10000$ we are far away from the normal approximation. That the empirical variances are so much lower than the true theoretical variance $\sigma^2=1$ is due to the fact that we have a very large contribution to the variance from parts of the distribution in the extreme right tail that do not show up in most samples. This is to be expected always, when the variance "just barely exists". A practical way to think about that is the following. Pareto distributions is often proposed to model distributions of income (or wealth). The expectation of income (or wealth) will have a very large contribution from the very few billionaires. Sampling with practical sample sizes will have a very small probability of including any billionaires in the sample!
Central limit theorem and the Pareto distribution
I will add an answer showing how bad the approximation from the central limit theorem (CLT) can be for the Pareto distribution, even in a case where the assumptions for CLT is fulfilled. The assumptio
Central limit theorem and the Pareto distribution I will add an answer showing how bad the approximation from the central limit theorem (CLT) can be for the Pareto distribution, even in a case where the assumptions for CLT is fulfilled. The assumption is that there must be a finite variance, which for the Pareto means that $\alpha > 2$. For a more theoretical discussion of why this is so, see my answer here: What is the difference between finite and infinite variance I will simulate data from the Pareto distribution with parameter $\alpha=2.1$, so that the variance "just barely exists". Redo my simulations with $\alpha=3.1$ to see the difference! Here is some R code: ### Pareto dist and the central limit theorem ### require(actuar) # for (dpqr)pareto1() require(MASS) # for Scott() require(scales) # for alpha() # We use (dpqr)pareto1(x,alpha,1) # alpha <- 2.1 # variance just barely exist E <- function(alpha) ifelse(alpha <= 1,Inf,alpha/(alpha-1)) VAR <- function(alpha) ifelse(alpha <= 2, Inf, alpha/((alpha-1)^2 * (alpha-2))) R <- 10000 e <- E(alpha) sigma <- sqrt(VAR(alpha)) sim <- function(n) { replicate(R, {x <- rpareto1(n,alpha,1) x <- x-e mean(x)*sqrt(n)/sigma },simplify=TRUE) } sim1 <- sim(10) sim2 <- sim(100) sim3 <- sim(1000) sim4 <- sim(10000) # do take some time ... ### These are standardized so have all ### theoretically variance 1. ### But due to the long tail, the empirical variances are ### (surprisingly!) much lower: sd(sim1) sd(sim2) sd(sim3) sd(sim4) ### Now we plot the histograms: hist(sim1, prob=TRUE, breaks="Scott", col=alpha("grey05", 0.95), main="simulated Pareto means", xlim=c(-1.8,16)) hist(sim2, prob=TRUE, breaks="Scott", col=alpha("grey30", 0.5), add=TRUE) hist(sim3, prob=TRUE, breaks="Scott", col=alpha("grey60", 0.5), add=TRUE) hist(sim4, prob=TRUE, breaks="Scott", col=alpha("grey90", 0.5), add=TRUE) plot(dnorm, from=-1.8, to=5, col=alpha("red", 0.5), add=TRUE) And here is the plot: One can see that even at sample size $n=10000$ we are far away from the normal approximation. That the empirical variances are so much lower than the true theoretical variance $\sigma^2=1$ is due to the fact that we have a very large contribution to the variance from parts of the distribution in the extreme right tail that do not show up in most samples. This is to be expected always, when the variance "just barely exists". A practical way to think about that is the following. Pareto distributions is often proposed to model distributions of income (or wealth). The expectation of income (or wealth) will have a very large contribution from the very few billionaires. Sampling with practical sample sizes will have a very small probability of including any billionaires in the sample!
Central limit theorem and the Pareto distribution I will add an answer showing how bad the approximation from the central limit theorem (CLT) can be for the Pareto distribution, even in a case where the assumptions for CLT is fulfilled. The assumptio
19,409
Central limit theorem and the Pareto distribution
I like already given answers but think they are bit too technical for a "lay person explanation" so I will try something more intuitive (starting by an equation ...). The mean of density $p$ is defined as: $$ \mu = \int x \cdot p(x) dx $$ So grossly speaking, the mean is the "sum over $x$" of the product between the density at $x$ and $x$ itself. When $x$ tends to infinity the density at $p(x)$ must vanish sufficiently so that the product $x \cdot p(x)$ does not go to infinity (and as a result the sum also). When $p(x)$ does not vanish sufficiently, the product goes to infinity, the integral goes to infinity, $\mu$ does not exist and, finally, $p$ has no mean. This is the case of Pareto for certain parameter values. Then, the central limit theorem establishes a distribution of the distance between the empirical mean $\bar{x}=\frac{1}{n} \sum_i x_i$ and the mean $\mu$ as a function of the variance of $p$ and $n$ (asymptotically with $n$). Let see how the empirical mean $\bar{x}$ behaves as a function of the number of $n$ for a Gaussian density $p$: N=10000; x=rnorm(N,1,1); y=rep(NA,N); for(index in seq(1,N)) { y[index]=mean(x[1:index]) } png('~/Desktop/normalMean.png') plot(y,type='l',xlab='n',ylab='sum(x_i)/n') dev.off() This is a typical realisation, the sample mean converges to the density mean quite properly (and in average in the way given by the central limit theorem). Let do the same for a pareto distribution with no mean (substituing rnorm(N,1,1); by pareto(N,1.1,1);) This is a also a typical simulation, time to time, the sample mean deviates strongly simply beacuse as explained using the integral formula, in the product $p(x) \cdot x$, the frequency of high values of $x$ is no small enough to compensate the fact that $x$ is high. So mean does not exists and the sample mean does not converge to any typical value and the central limit theorem has nothing to say. Finally, notice that the central limit theorem relates empirical mean, mean, sample size $n$ and variance. So variance $\int (x-\mu)^2 p(x) dx$ must also exists (see kjetil b halvorsen answer for details).
Central limit theorem and the Pareto distribution
I like already given answers but think they are bit too technical for a "lay person explanation" so I will try something more intuitive (starting by an equation ...). The mean of density $p$ is define
Central limit theorem and the Pareto distribution I like already given answers but think they are bit too technical for a "lay person explanation" so I will try something more intuitive (starting by an equation ...). The mean of density $p$ is defined as: $$ \mu = \int x \cdot p(x) dx $$ So grossly speaking, the mean is the "sum over $x$" of the product between the density at $x$ and $x$ itself. When $x$ tends to infinity the density at $p(x)$ must vanish sufficiently so that the product $x \cdot p(x)$ does not go to infinity (and as a result the sum also). When $p(x)$ does not vanish sufficiently, the product goes to infinity, the integral goes to infinity, $\mu$ does not exist and, finally, $p$ has no mean. This is the case of Pareto for certain parameter values. Then, the central limit theorem establishes a distribution of the distance between the empirical mean $\bar{x}=\frac{1}{n} \sum_i x_i$ and the mean $\mu$ as a function of the variance of $p$ and $n$ (asymptotically with $n$). Let see how the empirical mean $\bar{x}$ behaves as a function of the number of $n$ for a Gaussian density $p$: N=10000; x=rnorm(N,1,1); y=rep(NA,N); for(index in seq(1,N)) { y[index]=mean(x[1:index]) } png('~/Desktop/normalMean.png') plot(y,type='l',xlab='n',ylab='sum(x_i)/n') dev.off() This is a typical realisation, the sample mean converges to the density mean quite properly (and in average in the way given by the central limit theorem). Let do the same for a pareto distribution with no mean (substituing rnorm(N,1,1); by pareto(N,1.1,1);) This is a also a typical simulation, time to time, the sample mean deviates strongly simply beacuse as explained using the integral formula, in the product $p(x) \cdot x$, the frequency of high values of $x$ is no small enough to compensate the fact that $x$ is high. So mean does not exists and the sample mean does not converge to any typical value and the central limit theorem has nothing to say. Finally, notice that the central limit theorem relates empirical mean, mean, sample size $n$ and variance. So variance $\int (x-\mu)^2 p(x) dx$ must also exists (see kjetil b halvorsen answer for details).
Central limit theorem and the Pareto distribution I like already given answers but think they are bit too technical for a "lay person explanation" so I will try something more intuitive (starting by an equation ...). The mean of density $p$ is define
19,410
Why is gradient descent inefficient for large data set?
It would help if you provided a context to the claim that the gradient descent is inefficient. Inefficient relative to what? I guess that the missing context here is the comparison to stochastic or batch gradient descent in machine learning. Here's how to answer the question in this context. You are optimizing the parameters of the model, even hyperparameters. So, you have the cost function $\sum_{i=1}^n L(x_i|\Theta)$, where $x_i$ - your data, and $\Theta$ - vector of parameters, and $L()$ - loss function. To minimize this cost you use gradient descent over the parameters $\theta_j$: $$ \frac{\partial}{\partial \theta_j}\sum_{i=1}^nL(\Theta|x_i)$$ So, you see that you need to get the sum over all data $x_{i=1,\dots,n}$. This is unfortunate, because it means that you keep looping through the data for each step of your gradient descent. That's how the batch and stochastic gradient descent comes up: what if we sampled from the data set, and calculated the gradient on a sample, not the full set? $$ \frac{\partial}{\partial \theta_j}\sum_{k=1}^{n_s}L(\Theta|x_k)$$ Here, $n_s$ is the number of observations in the sample $s$. So, if your sample is 1/100th of the total set, you speed up your calculations by 100 times! Obviously, this introduces the noise, which lengthens the learning, but noise is decreases at rate of $\sqrt n$ while calculation amount increases at $n$, so this trick may work. Alternatively, insteado waiting until full sum $\sum_{i=1}^n$ is calculated, you could split this into batches, and do a step for each batch $\sum_{s=1}^M\sum_{i_s=1}^{n_s}$. This way you would have done M steps by the time the sum over entire data set is calculated. These would be noisier steps, but noise cancels out over time.
Why is gradient descent inefficient for large data set?
It would help if you provided a context to the claim that the gradient descent is inefficient. Inefficient relative to what? I guess that the missing context here is the comparison to stochastic or ba
Why is gradient descent inefficient for large data set? It would help if you provided a context to the claim that the gradient descent is inefficient. Inefficient relative to what? I guess that the missing context here is the comparison to stochastic or batch gradient descent in machine learning. Here's how to answer the question in this context. You are optimizing the parameters of the model, even hyperparameters. So, you have the cost function $\sum_{i=1}^n L(x_i|\Theta)$, where $x_i$ - your data, and $\Theta$ - vector of parameters, and $L()$ - loss function. To minimize this cost you use gradient descent over the parameters $\theta_j$: $$ \frac{\partial}{\partial \theta_j}\sum_{i=1}^nL(\Theta|x_i)$$ So, you see that you need to get the sum over all data $x_{i=1,\dots,n}$. This is unfortunate, because it means that you keep looping through the data for each step of your gradient descent. That's how the batch and stochastic gradient descent comes up: what if we sampled from the data set, and calculated the gradient on a sample, not the full set? $$ \frac{\partial}{\partial \theta_j}\sum_{k=1}^{n_s}L(\Theta|x_k)$$ Here, $n_s$ is the number of observations in the sample $s$. So, if your sample is 1/100th of the total set, you speed up your calculations by 100 times! Obviously, this introduces the noise, which lengthens the learning, but noise is decreases at rate of $\sqrt n$ while calculation amount increases at $n$, so this trick may work. Alternatively, insteado waiting until full sum $\sum_{i=1}^n$ is calculated, you could split this into batches, and do a step for each batch $\sum_{s=1}^M\sum_{i_s=1}^{n_s}$. This way you would have done M steps by the time the sum over entire data set is calculated. These would be noisier steps, but noise cancels out over time.
Why is gradient descent inefficient for large data set? It would help if you provided a context to the claim that the gradient descent is inefficient. Inefficient relative to what? I guess that the missing context here is the comparison to stochastic or ba
19,411
Why is gradient descent inefficient for large data set?
There are two ways in which gradient descent may be inefficient. Interestingly, they each lead to their own method for fixing up, which are nearly opposite solutions. The two problems are: (1) Too many gradient descent updates are required. (2) Each gradient descent step is too expensive. In regards to (1), comparing gradient descent with methods that take into account information about the second order derivatives, gradient descent tends to be highly inefficient in regards to improving the loss at each iteration. A very standard method, Newton's Method, generally takes much fewer iterations to converge, i.e. for logistic regression, 10 iterations of Newton's Method will often have lower loss than the solution provided by 5,000 iterations of gradient descent. For linear regression, this is even more extreme; there's a closed form solution! However, as the number of predictors gets very large (i.e. 500+), Newton's Method/directly solving for linear regression can become too expensive per iteration due to the amount of matrix operations required, while gradient descent will have considerably less cost per iteration. In regards to (2), it is possible to have such a large dataset that each iteration of gradient descent is too expensive to calculate. Computing the gradient will require $O(nk)$ operations ($n $ = sample size, $k$ = number of covariates). While $n = 10^{6}$ is not a problem at all on modern computers for values of $k < 100$, certainly something like $n = 10^{12}$, $k = 10^3$ will be. In this case, methods that approximate the derivative based on smaller subsets of the data are more attractive, such as stochastic gradient descent. I say that these fixes are nearly opposite, in that something like Newton's method is more costly but more efficient (in terms in of change in loss) per update, while stochastic gradient descent is actually less efficient but much computationally cheaper per update.
Why is gradient descent inefficient for large data set?
There are two ways in which gradient descent may be inefficient. Interestingly, they each lead to their own method for fixing up, which are nearly opposite solutions. The two problems are: (1) Too man
Why is gradient descent inefficient for large data set? There are two ways in which gradient descent may be inefficient. Interestingly, they each lead to their own method for fixing up, which are nearly opposite solutions. The two problems are: (1) Too many gradient descent updates are required. (2) Each gradient descent step is too expensive. In regards to (1), comparing gradient descent with methods that take into account information about the second order derivatives, gradient descent tends to be highly inefficient in regards to improving the loss at each iteration. A very standard method, Newton's Method, generally takes much fewer iterations to converge, i.e. for logistic regression, 10 iterations of Newton's Method will often have lower loss than the solution provided by 5,000 iterations of gradient descent. For linear regression, this is even more extreme; there's a closed form solution! However, as the number of predictors gets very large (i.e. 500+), Newton's Method/directly solving for linear regression can become too expensive per iteration due to the amount of matrix operations required, while gradient descent will have considerably less cost per iteration. In regards to (2), it is possible to have such a large dataset that each iteration of gradient descent is too expensive to calculate. Computing the gradient will require $O(nk)$ operations ($n $ = sample size, $k$ = number of covariates). While $n = 10^{6}$ is not a problem at all on modern computers for values of $k < 100$, certainly something like $n = 10^{12}$, $k = 10^3$ will be. In this case, methods that approximate the derivative based on smaller subsets of the data are more attractive, such as stochastic gradient descent. I say that these fixes are nearly opposite, in that something like Newton's method is more costly but more efficient (in terms in of change in loss) per update, while stochastic gradient descent is actually less efficient but much computationally cheaper per update.
Why is gradient descent inefficient for large data set? There are two ways in which gradient descent may be inefficient. Interestingly, they each lead to their own method for fixing up, which are nearly opposite solutions. The two problems are: (1) Too man
19,412
Why is gradient descent inefficient for large data set?
First let me suggest an improvement to your notation. In particular, let's denote the loss function by $L(w)$ rather than $f(x)$. Using the letter $L$ is simply a personal preference of mine since it reminds me that we're dealing with the Loss. The more substantive change is making it clear that the loss is a function of the weights $w$ rather than the data $x$. Importantly, the gradient is with respect to $w$ not $x$. So $$ \nabla L(w) = \left(\frac{\partial L}{\partial w_1}, \dots, \frac{\partial L}{\partial w_D} \right), $$ where $D$ is the dimensionality of your data. Despite the fact that we should think of the loss as a function of the weights $w$, any reasonable loss function will still depend on the entire dataset $x$ (if it didn't, it wouldn't be possible to learn anything from the data!). In linear regression, for example, we typically use the sum-of-squares loss function $$ L(w) = \sum_{i=1}^N (y_i - w^Tx_i)^2. $$ So evaluating the gradient $\nabla L(w)$ for a particular set of weights $w$ will require a sum over all $N$ points in the dataset $x$. If $N = 10^6$, then every incremental step in the gradient descent optimization will require on the order of a million operations, which is quite expensive.
Why is gradient descent inefficient for large data set?
First let me suggest an improvement to your notation. In particular, let's denote the loss function by $L(w)$ rather than $f(x)$. Using the letter $L$ is simply a personal preference of mine since it
Why is gradient descent inefficient for large data set? First let me suggest an improvement to your notation. In particular, let's denote the loss function by $L(w)$ rather than $f(x)$. Using the letter $L$ is simply a personal preference of mine since it reminds me that we're dealing with the Loss. The more substantive change is making it clear that the loss is a function of the weights $w$ rather than the data $x$. Importantly, the gradient is with respect to $w$ not $x$. So $$ \nabla L(w) = \left(\frac{\partial L}{\partial w_1}, \dots, \frac{\partial L}{\partial w_D} \right), $$ where $D$ is the dimensionality of your data. Despite the fact that we should think of the loss as a function of the weights $w$, any reasonable loss function will still depend on the entire dataset $x$ (if it didn't, it wouldn't be possible to learn anything from the data!). In linear regression, for example, we typically use the sum-of-squares loss function $$ L(w) = \sum_{i=1}^N (y_i - w^Tx_i)^2. $$ So evaluating the gradient $\nabla L(w)$ for a particular set of weights $w$ will require a sum over all $N$ points in the dataset $x$. If $N = 10^6$, then every incremental step in the gradient descent optimization will require on the order of a million operations, which is quite expensive.
Why is gradient descent inefficient for large data set? First let me suggest an improvement to your notation. In particular, let's denote the loss function by $L(w)$ rather than $f(x)$. Using the letter $L$ is simply a personal preference of mine since it
19,413
Why is gradient descent inefficient for large data set?
Short answer: Calculating gradient needs to sum over all the data points. If we have large amount of data, then it takes a long time. I have a detailed answer here. How could stochastic gradient descent save time comparing to standard gradient descent? On the other hand, always keep in mind there are direct methods in addition to iterative methods (gradient decent). If we want to solve a least square problem, direct method can be super efficient. For example, QR decomposition. If we do not have too many features, it is very fast. When you verify it, it may surprise you: 5 million data points with 2 features, Solving the linear regression / least square takes couple of seconds! x=matrix(runif(1e7),ncol=2) y=runif(5e6) start_time <- Sys.time() lm(y~x) end_time <- Sys.time() end_time - start_time # Time difference of 4.299081 secs
Why is gradient descent inefficient for large data set?
Short answer: Calculating gradient needs to sum over all the data points. If we have large amount of data, then it takes a long time. I have a detailed answer here. How could stochastic gradient desce
Why is gradient descent inefficient for large data set? Short answer: Calculating gradient needs to sum over all the data points. If we have large amount of data, then it takes a long time. I have a detailed answer here. How could stochastic gradient descent save time comparing to standard gradient descent? On the other hand, always keep in mind there are direct methods in addition to iterative methods (gradient decent). If we want to solve a least square problem, direct method can be super efficient. For example, QR decomposition. If we do not have too many features, it is very fast. When you verify it, it may surprise you: 5 million data points with 2 features, Solving the linear regression / least square takes couple of seconds! x=matrix(runif(1e7),ncol=2) y=runif(5e6) start_time <- Sys.time() lm(y~x) end_time <- Sys.time() end_time - start_time # Time difference of 4.299081 secs
Why is gradient descent inefficient for large data set? Short answer: Calculating gradient needs to sum over all the data points. If we have large amount of data, then it takes a long time. I have a detailed answer here. How could stochastic gradient desce
19,414
Why is gradient descent inefficient for large data set?
Although the two examples you mentioned are usually convex I'll add one point about non-convex problems. In my opinion there are two main reason why (batch) gradient descent might be considered "inefficient". The first point about the computational effort of calculating the gradient of a "large" sum of functions has already been very clearly outlined in the other answers. For non-convex problems however GD has the problem of usually getting stuck in a "close" local minimum. This minimum might be very bad in comparison to the global minimum. SGD or mini-batch GD have the "advantage" of wandering around (at least partially) randomly and thus might have the chance of finding a better local minimum. See this CV answer here. Or this other CV post outlining how randomness might be beneficial.
Why is gradient descent inefficient for large data set?
Although the two examples you mentioned are usually convex I'll add one point about non-convex problems. In my opinion there are two main reason why (batch) gradient descent might be considered "ineff
Why is gradient descent inefficient for large data set? Although the two examples you mentioned are usually convex I'll add one point about non-convex problems. In my opinion there are two main reason why (batch) gradient descent might be considered "inefficient". The first point about the computational effort of calculating the gradient of a "large" sum of functions has already been very clearly outlined in the other answers. For non-convex problems however GD has the problem of usually getting stuck in a "close" local minimum. This minimum might be very bad in comparison to the global minimum. SGD or mini-batch GD have the "advantage" of wandering around (at least partially) randomly and thus might have the chance of finding a better local minimum. See this CV answer here. Or this other CV post outlining how randomness might be beneficial.
Why is gradient descent inefficient for large data set? Although the two examples you mentioned are usually convex I'll add one point about non-convex problems. In my opinion there are two main reason why (batch) gradient descent might be considered "ineff
19,415
What advantages does Poisson regression have over linear regression in this case?
Three points about Poisson vs Normal regression, all concerning model specification: Effect of changes in predictors With a continuous predictor like math test score Poisson regression (with the usual log link) implies that a unit change in the predictor leads to a percentage change in the number of awards, i.e. 10 more points on the math test is associated with e.g. 25 percent more awards. This depends on the number of awards the student is already predicted to have. In contrast, Normal regression associates 10 more points with a fixed amount, say 3 more awards under all circumstances. You should be happy with that assumption before using the model that makes it. (fwiw I think it is very reasonable, modulo the next point.) Dealing with students with no awards Unless there are really many awards spread over lots of students then your award counts will mostly be be rather low. In fact I would predict zero-inflation, i.e. most students don't get any award, so lots of zeros, and some good students get quite a few awards. This messes with the assumptions of the Poisson model and is at least as bad for the Normal model. If you have a decent amount of data a 'zero-inflated' or 'hurdle' model would then be natural. This is two models tied together: one to predict whether the student gets any awards, and another to predict how many she gets if she gets any at all (usually some form of Poisson model). I would expect all the action to be in the first model. Award exclusivity Finally, a small point about awards. If awards are exclusive, i.e. if one student gets the award then no other students can get the award, then your outcomes are coupled; one count for student a pushes down the possible count of every other one. Whether this is worth worrying about depends on the awards structure and the size of the student population. I'd ignore it at a first pass. In conclusion, Poisson comfortably dominates Normal except for very large counts, but check the assumptions of the Poisson before leaning on it to heavily for inference, and be prepared to move to a mildly more complex model class if necessary.
What advantages does Poisson regression have over linear regression in this case?
Three points about Poisson vs Normal regression, all concerning model specification: Effect of changes in predictors With a continuous predictor like math test score Poisson regression (with the usual
What advantages does Poisson regression have over linear regression in this case? Three points about Poisson vs Normal regression, all concerning model specification: Effect of changes in predictors With a continuous predictor like math test score Poisson regression (with the usual log link) implies that a unit change in the predictor leads to a percentage change in the number of awards, i.e. 10 more points on the math test is associated with e.g. 25 percent more awards. This depends on the number of awards the student is already predicted to have. In contrast, Normal regression associates 10 more points with a fixed amount, say 3 more awards under all circumstances. You should be happy with that assumption before using the model that makes it. (fwiw I think it is very reasonable, modulo the next point.) Dealing with students with no awards Unless there are really many awards spread over lots of students then your award counts will mostly be be rather low. In fact I would predict zero-inflation, i.e. most students don't get any award, so lots of zeros, and some good students get quite a few awards. This messes with the assumptions of the Poisson model and is at least as bad for the Normal model. If you have a decent amount of data a 'zero-inflated' or 'hurdle' model would then be natural. This is two models tied together: one to predict whether the student gets any awards, and another to predict how many she gets if she gets any at all (usually some form of Poisson model). I would expect all the action to be in the first model. Award exclusivity Finally, a small point about awards. If awards are exclusive, i.e. if one student gets the award then no other students can get the award, then your outcomes are coupled; one count for student a pushes down the possible count of every other one. Whether this is worth worrying about depends on the awards structure and the size of the student population. I'd ignore it at a first pass. In conclusion, Poisson comfortably dominates Normal except for very large counts, but check the assumptions of the Poisson before leaning on it to heavily for inference, and be prepared to move to a mildly more complex model class if necessary.
What advantages does Poisson regression have over linear regression in this case? Three points about Poisson vs Normal regression, all concerning model specification: Effect of changes in predictors With a continuous predictor like math test score Poisson regression (with the usual
19,416
What advantages does Poisson regression have over linear regression in this case?
Poisson regression would be more suitible in this case because your response is the count of something. Putting things simply, we model that the distribution of number of awards for an individual student comes from a poisson distribution, and that each student has their own $\lambda$ poisson parameter. The Poisson regression then relates this parameter to the explanatory variables, rather than the count. The reason this is better than normal linear regression is to do with the errors. If our model is correct, and each student has their own $\lambda$, then for a given $\lambda$ we would expect a poisson distribution of counts around it - i.e. an asymmetric distribution. This means unusually high values are not as surprising as unusually low. Normal linear regression assumes normal errors around the mean, and hence equally weights them. This says that if a student has an expected number of awards of 1, it is just as likely for them to receive -2 awards as for them to receive 3 awards: this is clearly nonsense and what poisson is built to address.
What advantages does Poisson regression have over linear regression in this case?
Poisson regression would be more suitible in this case because your response is the count of something. Putting things simply, we model that the distribution of number of awards for an individual stud
What advantages does Poisson regression have over linear regression in this case? Poisson regression would be more suitible in this case because your response is the count of something. Putting things simply, we model that the distribution of number of awards for an individual student comes from a poisson distribution, and that each student has their own $\lambda$ poisson parameter. The Poisson regression then relates this parameter to the explanatory variables, rather than the count. The reason this is better than normal linear regression is to do with the errors. If our model is correct, and each student has their own $\lambda$, then for a given $\lambda$ we would expect a poisson distribution of counts around it - i.e. an asymmetric distribution. This means unusually high values are not as surprising as unusually low. Normal linear regression assumes normal errors around the mean, and hence equally weights them. This says that if a student has an expected number of awards of 1, it is just as likely for them to receive -2 awards as for them to receive 3 awards: this is clearly nonsense and what poisson is built to address.
What advantages does Poisson regression have over linear regression in this case? Poisson regression would be more suitible in this case because your response is the count of something. Putting things simply, we model that the distribution of number of awards for an individual stud
19,417
What advantages does Poisson regression have over linear regression in this case?
Ordinary least-squares regression of awards on predictors will yield consistent parameter estimates as long as the conditional mean of awards is linear in the predictors. But this is often inadequate since it allows the predicted number of awards to be negative (even for "reasonable" values of predictors), which makes no sense. Folks will often try to remedy this by taking the natural log of awards and using OLS. But this fails since some students receive no awards, so then you have to use something like $\ln(awards+0.5)$, but this creates its own problems since you presumably care about awards, and the re-transformation is non-trivial. Also, as the expected number of awards becomes very large, OLS should perform better for reasons outlined by @Corone. In Lake Wobegon, OLS is the way to go. If the expected number is low, with lots of zeros, I would use the Poisson with robust standard errors over the negative binomial model. NB regression makes a strong assumptions about the variance that appear in the first-order conditions that produce the coefficients. If these assumptions are not satisfied, the coefficients themselves could be contaminated. That is not the case with the Poisson.
What advantages does Poisson regression have over linear regression in this case?
Ordinary least-squares regression of awards on predictors will yield consistent parameter estimates as long as the conditional mean of awards is linear in the predictors. But this is often inadequate
What advantages does Poisson regression have over linear regression in this case? Ordinary least-squares regression of awards on predictors will yield consistent parameter estimates as long as the conditional mean of awards is linear in the predictors. But this is often inadequate since it allows the predicted number of awards to be negative (even for "reasonable" values of predictors), which makes no sense. Folks will often try to remedy this by taking the natural log of awards and using OLS. But this fails since some students receive no awards, so then you have to use something like $\ln(awards+0.5)$, but this creates its own problems since you presumably care about awards, and the re-transformation is non-trivial. Also, as the expected number of awards becomes very large, OLS should perform better for reasons outlined by @Corone. In Lake Wobegon, OLS is the way to go. If the expected number is low, with lots of zeros, I would use the Poisson with robust standard errors over the negative binomial model. NB regression makes a strong assumptions about the variance that appear in the first-order conditions that produce the coefficients. If these assumptions are not satisfied, the coefficients themselves could be contaminated. That is not the case with the Poisson.
What advantages does Poisson regression have over linear regression in this case? Ordinary least-squares regression of awards on predictors will yield consistent parameter estimates as long as the conditional mean of awards is linear in the predictors. But this is often inadequate
19,418
What advantages does Poisson regression have over linear regression in this case?
@corone raises good points, but note that the Poisson is only really asymmetric when $\lambda$ is small. Even for $\lambda$ = 10, it is pretty symmetric e..g. set.seed(12345) pois10 <- rpois(1000, 10) plot(density(pois10)) library(moments) skewness(pois10) shows a skewness of 0.31, which is pretty close to 0. I also like @conjugateprior 's points. In my experience, it is rare for Poisson regression to fit well; I usually wind up using either a negative binomial or a zero-inflated model.
What advantages does Poisson regression have over linear regression in this case?
@corone raises good points, but note that the Poisson is only really asymmetric when $\lambda$ is small. Even for $\lambda$ = 10, it is pretty symmetric e..g. set.seed(12345) pois10 <- rpois(1000, 10
What advantages does Poisson regression have over linear regression in this case? @corone raises good points, but note that the Poisson is only really asymmetric when $\lambda$ is small. Even for $\lambda$ = 10, it is pretty symmetric e..g. set.seed(12345) pois10 <- rpois(1000, 10) plot(density(pois10)) library(moments) skewness(pois10) shows a skewness of 0.31, which is pretty close to 0. I also like @conjugateprior 's points. In my experience, it is rare for Poisson regression to fit well; I usually wind up using either a negative binomial or a zero-inflated model.
What advantages does Poisson regression have over linear regression in this case? @corone raises good points, but note that the Poisson is only really asymmetric when $\lambda$ is small. Even for $\lambda$ = 10, it is pretty symmetric e..g. set.seed(12345) pois10 <- rpois(1000, 10
19,419
Is linear regression obsolete? [closed]
It is true that the assumptions of linear regression aren't realistic. However, this is true of all statistical models. "All models are wrong, but some are useful." I guess you're under the impression that there's no reason to use linear regression when you could use a more complex model. This isn't true, because in general, more complex models are more vulnerable to overfitting, and they use more computational resources, which are important if, e.g., you're trying to do statistics on an embedded processor or a web server. Simpler models are also easier to understand and interpret; by contrast, complex machine-learning models such as neural networks tend to end up as black boxes, more or less. Even if linear regression someday becomes no longer practically useful (which seems extremely unlikely in the foreseeable future), it will still be theoretically important, because more complex models tend to build on linear regression as a foundation. For example, in order to understand a regularized mixed-effects logistic regression, you need to understand plain old linear regression first. This isn't to say that more complex, newer, and shinier models aren't useful or important. Many of them are. But the simpler models are more widely applicable and hence more important, and clearly make sense to present first if you're going to present a variety of models. There are a lot of bad data analyses conducted these days by people who call themselves "data scientists" or something but don't even know the foundational stuff, like what a confidence interval really is. Don't be a statistic!
Is linear regression obsolete? [closed]
It is true that the assumptions of linear regression aren't realistic. However, this is true of all statistical models. "All models are wrong, but some are useful." I guess you're under the impression
Is linear regression obsolete? [closed] It is true that the assumptions of linear regression aren't realistic. However, this is true of all statistical models. "All models are wrong, but some are useful." I guess you're under the impression that there's no reason to use linear regression when you could use a more complex model. This isn't true, because in general, more complex models are more vulnerable to overfitting, and they use more computational resources, which are important if, e.g., you're trying to do statistics on an embedded processor or a web server. Simpler models are also easier to understand and interpret; by contrast, complex machine-learning models such as neural networks tend to end up as black boxes, more or less. Even if linear regression someday becomes no longer practically useful (which seems extremely unlikely in the foreseeable future), it will still be theoretically important, because more complex models tend to build on linear regression as a foundation. For example, in order to understand a regularized mixed-effects logistic regression, you need to understand plain old linear regression first. This isn't to say that more complex, newer, and shinier models aren't useful or important. Many of them are. But the simpler models are more widely applicable and hence more important, and clearly make sense to present first if you're going to present a variety of models. There are a lot of bad data analyses conducted these days by people who call themselves "data scientists" or something but don't even know the foundational stuff, like what a confidence interval really is. Don't be a statistic!
Is linear regression obsolete? [closed] It is true that the assumptions of linear regression aren't realistic. However, this is true of all statistical models. "All models are wrong, but some are useful." I guess you're under the impression
19,420
Is linear regression obsolete? [closed]
Linear regression in general is not obsolete. There are still people that are working on research around LASSO-related methods, and how they relate to multiple testing for example - you can google Emmanuel Candes and Malgorzata Bogdan. If you're asking about OLS algorithm in particular, the answer why they teach this is that method is so simple that it has closed-form solution. Also it's just simpler than ridge regression or the version with lasso/elasticnet. You can build your intuition/proofs on the solution to simple linear regression and then enrich the model with additional constraints.
Is linear regression obsolete? [closed]
Linear regression in general is not obsolete. There are still people that are working on research around LASSO-related methods, and how they relate to multiple testing for example - you can google Emm
Is linear regression obsolete? [closed] Linear regression in general is not obsolete. There are still people that are working on research around LASSO-related methods, and how they relate to multiple testing for example - you can google Emmanuel Candes and Malgorzata Bogdan. If you're asking about OLS algorithm in particular, the answer why they teach this is that method is so simple that it has closed-form solution. Also it's just simpler than ridge regression or the version with lasso/elasticnet. You can build your intuition/proofs on the solution to simple linear regression and then enrich the model with additional constraints.
Is linear regression obsolete? [closed] Linear regression in general is not obsolete. There are still people that are working on research around LASSO-related methods, and how they relate to multiple testing for example - you can google Emm
19,421
Is linear regression obsolete? [closed]
I don't think regression is old, it might be considered as trivial for some problems that are currently faced by data scientists, but still is the ABC of statistical analysis. How are you supposed to understand if SVM are working correctly if you don't know how the simplest model is working? Using such a simple tool teaches YOU how to look into the data before jumping into crazy complex models and understand deeply which tools can be used in further analysis and which cannot. Once having this conversation with a professor and colleague of mine she told me that her students where great in applying complex models but they could not understand what leverage is or read a simple qq-plot to understand what was wrong with the data. Often in the most simple and readable model stands the beauty.
Is linear regression obsolete? [closed]
I don't think regression is old, it might be considered as trivial for some problems that are currently faced by data scientists, but still is the ABC of statistical analysis. How are you supposed to
Is linear regression obsolete? [closed] I don't think regression is old, it might be considered as trivial for some problems that are currently faced by data scientists, but still is the ABC of statistical analysis. How are you supposed to understand if SVM are working correctly if you don't know how the simplest model is working? Using such a simple tool teaches YOU how to look into the data before jumping into crazy complex models and understand deeply which tools can be used in further analysis and which cannot. Once having this conversation with a professor and colleague of mine she told me that her students where great in applying complex models but they could not understand what leverage is or read a simple qq-plot to understand what was wrong with the data. Often in the most simple and readable model stands the beauty.
Is linear regression obsolete? [closed] I don't think regression is old, it might be considered as trivial for some problems that are currently faced by data scientists, but still is the ABC of statistical analysis. How are you supposed to
19,422
Is linear regression obsolete? [closed]
The short answer is no. For example, if you try linear model with MNIST data, you will still get ~90% of the accuracy! A long answer would be "depending on the domain", but linear model is widely used. In certain fields, say, medical study, it is super expensive to get one data point. And the analysis work is still similar to many years ago: linear regression is still plays an very important role. In morden machine learning, say, text classification, linear model is still very important, although there are other fancier models. This is because linear model is very "stable", it will have less like to over fit the data. Finally, linear model is really the building blocks for most of the other models. Learning in well will benefit you in the future.
Is linear regression obsolete? [closed]
The short answer is no. For example, if you try linear model with MNIST data, you will still get ~90% of the accuracy! A long answer would be "depending on the domain", but linear model is widely used
Is linear regression obsolete? [closed] The short answer is no. For example, if you try linear model with MNIST data, you will still get ~90% of the accuracy! A long answer would be "depending on the domain", but linear model is widely used. In certain fields, say, medical study, it is super expensive to get one data point. And the analysis work is still similar to many years ago: linear regression is still plays an very important role. In morden machine learning, say, text classification, linear model is still very important, although there are other fancier models. This is because linear model is very "stable", it will have less like to over fit the data. Finally, linear model is really the building blocks for most of the other models. Learning in well will benefit you in the future.
Is linear regression obsolete? [closed] The short answer is no. For example, if you try linear model with MNIST data, you will still get ~90% of the accuracy! A long answer would be "depending on the domain", but linear model is widely used
19,423
Is linear regression obsolete? [closed]
In practical terms, linear regression is useful even if you are also using a more complex model for your work. The key is that linear regression is easy to understand and therefore easy to use to conceptually understand what is happening in more complex models. I can offer you a practical application example from my real live job as a statistical analyst. If you find yourself out in the wild, unsupervised, with a large dataset, and your boss asks you to run some analysis on it, where do you start? Well, if you are unfamiliar with the dataset and don't have a good idea of how the various features are expected to relate to each other, then a complex model like the ones you suggested is a bad place to start investigating. Instead, the best place to start is simple old linear regression. Perform a regression analysis, look at coefficients and graph the residuals. Once you start to see what is going on with the data, then you can make some decisions as to what advanced methods you are going to try to apply. I assert that if you just plugged your data into some advanced model black box like sklearn.svm (if you are into Python), then you will have very low confidence that your results will be meaningful.
Is linear regression obsolete? [closed]
In practical terms, linear regression is useful even if you are also using a more complex model for your work. The key is that linear regression is easy to understand and therefore easy to use to conc
Is linear regression obsolete? [closed] In practical terms, linear regression is useful even if you are also using a more complex model for your work. The key is that linear regression is easy to understand and therefore easy to use to conceptually understand what is happening in more complex models. I can offer you a practical application example from my real live job as a statistical analyst. If you find yourself out in the wild, unsupervised, with a large dataset, and your boss asks you to run some analysis on it, where do you start? Well, if you are unfamiliar with the dataset and don't have a good idea of how the various features are expected to relate to each other, then a complex model like the ones you suggested is a bad place to start investigating. Instead, the best place to start is simple old linear regression. Perform a regression analysis, look at coefficients and graph the residuals. Once you start to see what is going on with the data, then you can make some decisions as to what advanced methods you are going to try to apply. I assert that if you just plugged your data into some advanced model black box like sklearn.svm (if you are into Python), then you will have very low confidence that your results will be meaningful.
Is linear regression obsolete? [closed] In practical terms, linear regression is useful even if you are also using a more complex model for your work. The key is that linear regression is easy to understand and therefore easy to use to conc
19,424
Calculate probability (area) under the overlapping area of two normal distributions
It is not quite clear what you mean by probability to obtain an individual from the overlapping area. This solves for the area of the green zone in your diagram: Let: $X_1 \sim N(\mu_1,\sigma_1^2)$ with pdf $f_1(x_1)$ and cdf $ F_1(x_1)$ and $X_2 \sim N(\mu_2,\sigma_2^2)$ with pdf $f_2(x_2)$ and cdf $ F_2(x_2)$, where $\mu_1 < \mu_2$. In your example, the 'black variable' corresponds to $X_1$. Let $c$ denote the point of intersection where the pdf's meet in the green zone of your plot Then, the area of your green intersection zone is simply: $$P(X_1>c) + P(X_2<c) = 1 - F_1(c) + F_2(c) = 1-\frac{1}{2} \text{erf}\left(\frac{c-\mu _1}{\sqrt{2} \sigma _1}\right)+\frac{1}{2} \text{erf}\left(\frac{c-\mu _2}{\sqrt{2} \sigma _2}\right)$$ where erf(.) is the error function. Point $c$ is the solution to $f_1(x) = f_2(x)$ within the green zone, which yields: $$c = \frac{\mu _2 \sigma _1^2-\sigma _2 \left(\mu _1 \sigma _2+\sigma _1 \sqrt{\left(\mu _1-\mu _2\right){}^2+2 \left(\sigma _1^2-\sigma _2^2\right) \log \left(\frac{\sigma _1}{\sigma _2}\right)}\right)}{\sigma _1^2-\sigma _2^2}$$ For your example, with $ {\mu_1 = 5.28, \mu_2 = 8.45, \sigma_1 = 0.91, \sigma_2 = 1.36}$, this yields: $c = 6.70458...$, and the area of the green section is: 0.158413 ...
Calculate probability (area) under the overlapping area of two normal distributions
It is not quite clear what you mean by probability to obtain an individual from the overlapping area. This solves for the area of the green zone in your diagram: Let: $X_1 \sim N(\mu_1,\sigma_1^2)$ w
Calculate probability (area) under the overlapping area of two normal distributions It is not quite clear what you mean by probability to obtain an individual from the overlapping area. This solves for the area of the green zone in your diagram: Let: $X_1 \sim N(\mu_1,\sigma_1^2)$ with pdf $f_1(x_1)$ and cdf $ F_1(x_1)$ and $X_2 \sim N(\mu_2,\sigma_2^2)$ with pdf $f_2(x_2)$ and cdf $ F_2(x_2)$, where $\mu_1 < \mu_2$. In your example, the 'black variable' corresponds to $X_1$. Let $c$ denote the point of intersection where the pdf's meet in the green zone of your plot Then, the area of your green intersection zone is simply: $$P(X_1>c) + P(X_2<c) = 1 - F_1(c) + F_2(c) = 1-\frac{1}{2} \text{erf}\left(\frac{c-\mu _1}{\sqrt{2} \sigma _1}\right)+\frac{1}{2} \text{erf}\left(\frac{c-\mu _2}{\sqrt{2} \sigma _2}\right)$$ where erf(.) is the error function. Point $c$ is the solution to $f_1(x) = f_2(x)$ within the green zone, which yields: $$c = \frac{\mu _2 \sigma _1^2-\sigma _2 \left(\mu _1 \sigma _2+\sigma _1 \sqrt{\left(\mu _1-\mu _2\right){}^2+2 \left(\sigma _1^2-\sigma _2^2\right) \log \left(\frac{\sigma _1}{\sigma _2}\right)}\right)}{\sigma _1^2-\sigma _2^2}$$ For your example, with $ {\mu_1 = 5.28, \mu_2 = 8.45, \sigma_1 = 0.91, \sigma_2 = 1.36}$, this yields: $c = 6.70458...$, and the area of the green section is: 0.158413 ...
Calculate probability (area) under the overlapping area of two normal distributions It is not quite clear what you mean by probability to obtain an individual from the overlapping area. This solves for the area of the green zone in your diagram: Let: $X_1 \sim N(\mu_1,\sigma_1^2)$ w
19,425
Calculate probability (area) under the overlapping area of two normal distributions
There are two scenarios when calculating the intersections of two normal distributions. It's important to acknowledge that, in most cases, there are two intersection points: Equal variance In the modelled (or rare) examples when two normal distribution curves have exactly the same variance, there is one intersection point. The intersection point on the abscissa axis, $(x_1)$, is calculated from: $$x_1=\frac{\mu_a+\mu_b}{2}$$ This being, of course, the midpoint between the respective means. Unequal Variance When the two normal distribution curves intersect and have different variances, the solution to the intersection points simplifies to a quadratic form. The consequence of the quadratic form is that there are always two intersection points $(x_1,x_2)$ on the abscissa axis. The intersection points of the two curves can be solved algebraically to obtain the quadratic form and the roots can then be found using the quadratic formula. It’s not as hard as it seems and does not involve using the error function. However, for time and space, I give Inman and Bradley’s version where the intersection points can be found directly. $$(x_1,x_2)=\frac{\mu_a \sigma_b^2-\mu_b \sigma_a^2\pm\sigma_a \sigma_b \sqrt{(\mu_a-\mu_b)^2+(\sigma_b^2-\sigma_a^2)\ \ln \left(\frac{\sigma_b^2}{\sigma_a^2}\right)}}{\sigma_b^2-\sigma_a^2}$$ Where $-\infty<{x_1}<{x_2}<\infty$. (For ease of calculation, I set $\sigma_b>\sigma_a$ ). For some intersecting normal distributions with unequal variances, the ‘second’ intersection point maybe insignificant and can, effectively, be ignored. However, for most cases – especially when $\mu_a\approx\mu_b$ – having both intersection points are critical to determine the ‘common area’ (overlap). Finding the Area The common area (overlap), $\phi$, is calculated from: Equal variance $$\phi=\min\left[\int_{-\infty}^{x_1} f(a) dx, \int_{-\infty}^{x_1} f(b) dx\right]+\min\left[\int_{x_1}^{\infty} f(a) dx, \int_{x_1}^{\infty} f(b) dx\right]$$ Where, of course, ${f(a)}=\frac{1}{\sigma_a \sqrt{2 \pi}} e^{-0.5 \left(\frac{x-\mu_a}{σ_a}\right)^2}$ Unequal variance $$\phi=\min\left[\int_{-\infty}^{x_1} f(a) dx, \int_{-\infty}^{x_1} f(b) dx\right]+\min\left[\int_{x_1}^{x_2} f(a) dx, \int_{x_1}^{x_2} f(b) dx\right]+\min\left[\int_{x_2}^{\infty} f(a) dx, \int_{x_2}^{\infty} f(b) dx\right]$$ Answer Inserting the data from the question, $\mu_a=5.28, \sigma_a=0.91$ and $\mu_b=8.45, \sigma_b=1.36$, we get $x_1=-1.2842, x_2=6.7046$ and $\phi=0.1548$ Reference: Inman, H.F. & Bradley Jr, E.L. (1989). The overlapping coefficient as a measure of agreement between probability distributions and point estimation of the overlap of two normal densities, Communications in Statistics - Theory and Methods, 18:10, 3851-3874, DOI: 10.1080/03610928908830127
Calculate probability (area) under the overlapping area of two normal distributions
There are two scenarios when calculating the intersections of two normal distributions. It's important to acknowledge that, in most cases, there are two intersection points: Equal variance In the mode
Calculate probability (area) under the overlapping area of two normal distributions There are two scenarios when calculating the intersections of two normal distributions. It's important to acknowledge that, in most cases, there are two intersection points: Equal variance In the modelled (or rare) examples when two normal distribution curves have exactly the same variance, there is one intersection point. The intersection point on the abscissa axis, $(x_1)$, is calculated from: $$x_1=\frac{\mu_a+\mu_b}{2}$$ This being, of course, the midpoint between the respective means. Unequal Variance When the two normal distribution curves intersect and have different variances, the solution to the intersection points simplifies to a quadratic form. The consequence of the quadratic form is that there are always two intersection points $(x_1,x_2)$ on the abscissa axis. The intersection points of the two curves can be solved algebraically to obtain the quadratic form and the roots can then be found using the quadratic formula. It’s not as hard as it seems and does not involve using the error function. However, for time and space, I give Inman and Bradley’s version where the intersection points can be found directly. $$(x_1,x_2)=\frac{\mu_a \sigma_b^2-\mu_b \sigma_a^2\pm\sigma_a \sigma_b \sqrt{(\mu_a-\mu_b)^2+(\sigma_b^2-\sigma_a^2)\ \ln \left(\frac{\sigma_b^2}{\sigma_a^2}\right)}}{\sigma_b^2-\sigma_a^2}$$ Where $-\infty<{x_1}<{x_2}<\infty$. (For ease of calculation, I set $\sigma_b>\sigma_a$ ). For some intersecting normal distributions with unequal variances, the ‘second’ intersection point maybe insignificant and can, effectively, be ignored. However, for most cases – especially when $\mu_a\approx\mu_b$ – having both intersection points are critical to determine the ‘common area’ (overlap). Finding the Area The common area (overlap), $\phi$, is calculated from: Equal variance $$\phi=\min\left[\int_{-\infty}^{x_1} f(a) dx, \int_{-\infty}^{x_1} f(b) dx\right]+\min\left[\int_{x_1}^{\infty} f(a) dx, \int_{x_1}^{\infty} f(b) dx\right]$$ Where, of course, ${f(a)}=\frac{1}{\sigma_a \sqrt{2 \pi}} e^{-0.5 \left(\frac{x-\mu_a}{σ_a}\right)^2}$ Unequal variance $$\phi=\min\left[\int_{-\infty}^{x_1} f(a) dx, \int_{-\infty}^{x_1} f(b) dx\right]+\min\left[\int_{x_1}^{x_2} f(a) dx, \int_{x_1}^{x_2} f(b) dx\right]+\min\left[\int_{x_2}^{\infty} f(a) dx, \int_{x_2}^{\infty} f(b) dx\right]$$ Answer Inserting the data from the question, $\mu_a=5.28, \sigma_a=0.91$ and $\mu_b=8.45, \sigma_b=1.36$, we get $x_1=-1.2842, x_2=6.7046$ and $\phi=0.1548$ Reference: Inman, H.F. & Bradley Jr, E.L. (1989). The overlapping coefficient as a measure of agreement between probability distributions and point estimation of the overlap of two normal densities, Communications in Statistics - Theory and Methods, 18:10, 3851-3874, DOI: 10.1080/03610928908830127
Calculate probability (area) under the overlapping area of two normal distributions There are two scenarios when calculating the intersections of two normal distributions. It's important to acknowledge that, in most cases, there are two intersection points: Equal variance In the mode
19,426
Calculate probability (area) under the overlapping area of two normal distributions
@abdelbasset, To improve @wolfies 's answer above, there are two intersection points c, let's call them c1 and c2. Here, c1=-1.2848 and c2=6.7046. @wolfies ignored c1 (it likely will be too far in the tails of the probability density functions to matter (especially if we round to just a few decimal points)). The more correct way is to find both c1 and c2, and to find the area of overlap of both functions: AREA OF OVERLAP = P(X1 > j1) + P(X2 < j1) - [P(X2 < j2)-P(X1 < j2)] therefore, using cdf's AREA OF OVERLAP = 1 - F1(j1,μ2,σ2)+F2(j1,μ2,σ2)-F2(j2,μ2,σ2)+F1(j2,μ1,σ1)
Calculate probability (area) under the overlapping area of two normal distributions
@abdelbasset, To improve @wolfies 's answer above, there are two intersection points c, let's call them c1 and c2. Here, c1=-1.2848 and c2=6.7046. @wolfies ignored c1 (it likely will be too far in the
Calculate probability (area) under the overlapping area of two normal distributions @abdelbasset, To improve @wolfies 's answer above, there are two intersection points c, let's call them c1 and c2. Here, c1=-1.2848 and c2=6.7046. @wolfies ignored c1 (it likely will be too far in the tails of the probability density functions to matter (especially if we round to just a few decimal points)). The more correct way is to find both c1 and c2, and to find the area of overlap of both functions: AREA OF OVERLAP = P(X1 > j1) + P(X2 < j1) - [P(X2 < j2)-P(X1 < j2)] therefore, using cdf's AREA OF OVERLAP = 1 - F1(j1,μ2,σ2)+F2(j1,μ2,σ2)-F2(j2,μ2,σ2)+F1(j2,μ1,σ1)
Calculate probability (area) under the overlapping area of two normal distributions @abdelbasset, To improve @wolfies 's answer above, there are two intersection points c, let's call them c1 and c2. Here, c1=-1.2848 and c2=6.7046. @wolfies ignored c1 (it likely will be too far in the
19,427
Calculate probability (area) under the overlapping area of two normal distributions
Normalise the graphs to an area of 1 by dividing each by their respective standard deviation. Then use simple subtraction from a z-graph to calculate the probability of an occurrance in that overlap area. No need for erfs.
Calculate probability (area) under the overlapping area of two normal distributions
Normalise the graphs to an area of 1 by dividing each by their respective standard deviation. Then use simple subtraction from a z-graph to calculate the probability of an occurrance in that overlap a
Calculate probability (area) under the overlapping area of two normal distributions Normalise the graphs to an area of 1 by dividing each by their respective standard deviation. Then use simple subtraction from a z-graph to calculate the probability of an occurrance in that overlap area. No need for erfs.
Calculate probability (area) under the overlapping area of two normal distributions Normalise the graphs to an area of 1 by dividing each by their respective standard deviation. Then use simple subtraction from a z-graph to calculate the probability of an occurrance in that overlap a
19,428
Benefits of using genetic algorithm
The main reasons to use a genetic algorithm are: there are multiple local optima the objective function is not smooth (so derivative methods can not be applied) the number of parameters is very large the objective function is noisy or stochastic A large number of parameters can be a problem for derivative based methods when you don't have the definition of the gradient. In this type of situation, you can find a not-terrible solution via GA and then improve on that with the derivative based method. The definition of "large" is growing all the time.
Benefits of using genetic algorithm
The main reasons to use a genetic algorithm are: there are multiple local optima the objective function is not smooth (so derivative methods can not be applied) the number of parameters is very large
Benefits of using genetic algorithm The main reasons to use a genetic algorithm are: there are multiple local optima the objective function is not smooth (so derivative methods can not be applied) the number of parameters is very large the objective function is noisy or stochastic A large number of parameters can be a problem for derivative based methods when you don't have the definition of the gradient. In this type of situation, you can find a not-terrible solution via GA and then improve on that with the derivative based method. The definition of "large" is growing all the time.
Benefits of using genetic algorithm The main reasons to use a genetic algorithm are: there are multiple local optima the objective function is not smooth (so derivative methods can not be applied) the number of parameters is very large
19,429
Benefits of using genetic algorithm
Concept is easy to understand Modular, separate from application Supports multi-objective optimization Good for “noisy” environments Always an answer; answer gets better with time Inherently parallel; easily distributed
Benefits of using genetic algorithm
Concept is easy to understand Modular, separate from application Supports multi-objective optimization Good for “noisy” environments Always an answer; answer gets better with time Inher
Benefits of using genetic algorithm Concept is easy to understand Modular, separate from application Supports multi-objective optimization Good for “noisy” environments Always an answer; answer gets better with time Inherently parallel; easily distributed
Benefits of using genetic algorithm Concept is easy to understand Modular, separate from application Supports multi-objective optimization Good for “noisy” environments Always an answer; answer gets better with time Inher
19,430
Benefits of using genetic algorithm
Genetic algorithms differ from traditional search and optimization methods in four significant points: Genetic algorithms search parallel from a population of points. Therefore, it has the ability to avoid being trapped in local optimal solution like traditional methods, which search from a single point. Genetic algorithms use probabilistic selection rules, not deterministic ones. Genetic algorithms work on the Chromosome, which is encoded version of potential solutions’ parameters, rather the parameters themselves. Genetic algorithms use fitness score, which is obtained from objective functions, without other derivative or auxiliary information
Benefits of using genetic algorithm
Genetic algorithms differ from traditional search and optimization methods in four significant points: Genetic algorithms search parallel from a population of points. Therefore, it has the ability to
Benefits of using genetic algorithm Genetic algorithms differ from traditional search and optimization methods in four significant points: Genetic algorithms search parallel from a population of points. Therefore, it has the ability to avoid being trapped in local optimal solution like traditional methods, which search from a single point. Genetic algorithms use probabilistic selection rules, not deterministic ones. Genetic algorithms work on the Chromosome, which is encoded version of potential solutions’ parameters, rather the parameters themselves. Genetic algorithms use fitness score, which is obtained from objective functions, without other derivative or auxiliary information
Benefits of using genetic algorithm Genetic algorithms differ from traditional search and optimization methods in four significant points: Genetic algorithms search parallel from a population of points. Therefore, it has the ability to
19,431
Benefits of using genetic algorithm
Genetic algorithms are kind of a last resort. They are useful only when an analytical solution is not feasible (see Patrick's answer for the most common reasons), and you have a lot of CPU time on your hands.
Benefits of using genetic algorithm
Genetic algorithms are kind of a last resort. They are useful only when an analytical solution is not feasible (see Patrick's answer for the most common reasons), and you have a lot of CPU time on you
Benefits of using genetic algorithm Genetic algorithms are kind of a last resort. They are useful only when an analytical solution is not feasible (see Patrick's answer for the most common reasons), and you have a lot of CPU time on your hands.
Benefits of using genetic algorithm Genetic algorithms are kind of a last resort. They are useful only when an analytical solution is not feasible (see Patrick's answer for the most common reasons), and you have a lot of CPU time on you
19,432
Benefits of using genetic algorithm
Advantages of GAs compared to conventional methods: 1. Parallelism, easily modified and adaptable to different problems 2. Easily distributed 3. Large and wide solution space search ability 4. Non-knowledge based optimisation process used of a fitness function for evaluation 5. Easy to discover global optimum and avoid trapping in local optima 6. Capable of multi-objective optimisation can return suite of potential solutions 7. Good choice for large scale/wide variety of optimisation problem
Benefits of using genetic algorithm
Advantages of GAs compared to conventional methods: 1. Parallelism, easily modified and adaptable to different problems 2. Easily distributed 3. Large and wide solution space search ability 4. No
Benefits of using genetic algorithm Advantages of GAs compared to conventional methods: 1. Parallelism, easily modified and adaptable to different problems 2. Easily distributed 3. Large and wide solution space search ability 4. Non-knowledge based optimisation process used of a fitness function for evaluation 5. Easy to discover global optimum and avoid trapping in local optima 6. Capable of multi-objective optimisation can return suite of potential solutions 7. Good choice for large scale/wide variety of optimisation problem
Benefits of using genetic algorithm Advantages of GAs compared to conventional methods: 1. Parallelism, easily modified and adaptable to different problems 2. Easily distributed 3. Large and wide solution space search ability 4. No
19,433
How to compute the probability associated with absurdly large Z-scores?
The question concerns the complementary error function $$\textrm{erfc}(x) = \frac{2}{\sqrt{\pi}}\int_{x}^{\infty}\exp(-t^2) d t$$ for "large" values of $x$ ($=n/\sqrt{2}$ in the original question)--that is, between 100 and 700,000 or so. (In practice, any value greater than about 6 should be considered "large," as we will see.) Note that because this will be used to compute p-values, there is little value in obtaining more than three significant (decimal) digits. To begin, consider the approximation suggested by @Iterator, $$f(x) = 1 - \sqrt{1 - \exp \left(-x^2 \left(\frac{4 + ax^2}{\pi + ax^2}\right)\right)},$$ where $$a = \frac{8(\pi-3)}{3(4-\pi)} \approx 0.439862.$$ Although this is an excellent approximation to the error function itself, it's a terrible approximation to $\textrm{erfc}$. However, there is a way to systematically fix that up. For the p-values associated with such large values of $x$, we're interested in the relative error $f(x)/\textrm{erfc}(x) - 1$: we hope its absolute value would be less than 0.001 for three significant digits of precision. Unfortunately this expression is difficult to study for large $x$ due to underflows in double-precision computation. Here is one attempt, which plots the relative error versus $x$ for $0 \le x \le 5.8$: The calculation becomes unstable once $x$ exceeds 5.3 or so and cannot deliver one significant digit past 5.8. This is no surprise: $\exp(-5.8^2) \approx 10^{-14.6}$ is pushing the limits of double-precision arithmetic. Because there is no evidence that the relative error is going to be acceptably small for larger $x$, we need to do better. Performing the calculation in extended arithmetic (with Mathematica) improves our picture of what's going on: The error increases rapidly with $x$ and shows no signs of leveling off. Past $x=10$ or so, this approximation doesn't even deliver one reliable digit of information! However, the plot is starting to look linear. We might guess that the relative error is directly proportional to $x$. (This makes sense on theoretical grounds: $\textrm{erfc}$ is manifestly an odd function and $f$ is manifestly even, so their ratio ought to be an odd function. Thus we would expect the relative error, if it increases, to behave like an odd power of $x$.) This leads us to study the relative error divided by $x$. Equivalently, I choose to examine $x \cdot \textrm{erfc}(x)/f(x)$, because the hope is this should have a constant limiting value. Here is its graph: Our guess appears to be borne out: this ratio does seem to be approaching a limit around 8 or so. When asked, Mathematica will supply it: a1 = Limit[x (Erfc[x]/f[x]), x -> \[Infinity]] The value is $a_1 = \frac{2 }{\sqrt{\pi }}e^{\frac{3 (-4+\pi )^2}{8 (-3+\pi )}} \approx 7.94325$. This enables us to improve the estimate: we take $$f_1(x) = f(x) \frac{a_1}{x}$$ as the first refinement of the approximation. When $x$ is really large--greater than a few thousand--this approximation is just fine. Because it's still not going to be good enough for an interesting range of arguments between $5.3$ and $2000$ or so, let's iterate the procedure. This time, the inverse relative error--specifically, the expression $1 - \textrm{erfc}(x)/f_1(x)$--should behave like $1/x^2$ for large $x$ (by virtue of the previous parity considerations). Accordingly, we multiply by $x^2$ and find the next limit: a2 = Limit[x^2 (a1 - x (Erfc[x]/f[x])), x -> \[Infinity]] The value is $$a_2 = \frac{1}{32 \sqrt{\pi }} e^{\frac{3 (-4+\pi )^2}{8 (-3+\pi )}} \left(32-\frac{9 (-4+\pi )^3 \pi }{(-3+\pi )^2}\right) \approx 114.687.$$ This process can proceed as long as we like. I took it out one more step, finding a3 = Limit[x^2 (a2 - x^2 (a1 - x (Erfc[x]/f[x]))), x -> \[Infinity]] with value approximately 1623.67. (The full expression involves a degree-eight rational function of $\pi$ and is too long to be useful here.) Unwinding these operations yields our final approximation $$f_3(x) = f(x)\left(a_1 - a_2/x^2 + a_3/x^4\right)/x.$$ The error is proportional to $x^{-6}$. Of import is the constant of proportionality, so we plot $x^6(1 - \textrm{erfc}(x) / f_3(x))$: It rapidly approaches a limiting value around 2660.59. Using the approximation $f_3$, we obtain estimates of $\textrm{erfc}(x)$ whose relative accuracy is better than $2661/x^6$ for all $x \gt 0$. Once $x$ exceeds 20 or so, we have our three significant digits (or far more, as $x$ gets larger). As a check, here is a table comparing the correct values to the approximation for $x$ between $10$ and $20$: x Erfc Approximation 10 2.088*10^-45 2.094*10^-45 11 1.441*10^-54 1.443*10^-54 12 1.356*10^-64 1.357*10^-64 13 1.740*10^-75 1.741*10^-75 14 3.037*10^-87 3.038*10^-87 15 7.213*10^-100 7.215*10^-100 16 2.328*10^-113 2.329*10^-113 17 1.021*10^-127 1.021*10^-127 18 6.082*10^-143 6.083*10^-143 19 4.918*10^-159 4.918*10^-159 20 5.396*10^-176 5.396*10^-176 In fact, this approximation delivers at least two significant figures of precision for $x=8$ on, which is just about where pedestrian calculations (such as Excel's NormSDist function) peter out. Finally, one might worry about our ability to compute the initial approximation $f$. However, that's not hard: when $x$ is large enough to cause underflows in the exponential, the square root is well approximated by half the exponential, $$f(x) \approx \frac{1}{2} \exp \left(-x^2 \left(\frac{4 + ax^2}{\pi + ax^2}\right)\right).$$ Computing the logarithm of this (in base 10) is simple, and readily gives the desired result. For example, let $x=1000$. The common logarithm of this approximation is $$\log_{10}(f(x)) \approx \left(-1000^2 \left(\frac{4 + a \cdot 1000^2}{\pi + a \cdot 1000^2}\right) - \log(2)\right) / \log(10) \sim -434295.63047.$$ Exponentiating yields $$f(1000) \approx 2.34169 \cdot 10^{-434296}.$$ Applying the correction (in $f_3$) produces $$\textrm{erfc}(1000) \approx 1.86003\ 70486\ 32328 \cdot 10^{-434298}.$$ Note that the correction reduces the original approximation by over 99% (and indeed, $a_1/x \approx 1\text{%}$.) (This approximation differs from the correct value only in the last digit. Another well-known approximation, $\exp(-x^2)/(x\sqrt{\pi})$, equals $1.860038 \cdot 10^{-434298}$, erring in the sixth significant digit. I'm sure we could improve that one, too, if we wanted, using the same techniques.)
How to compute the probability associated with absurdly large Z-scores?
The question concerns the complementary error function $$\textrm{erfc}(x) = \frac{2}{\sqrt{\pi}}\int_{x}^{\infty}\exp(-t^2) d t$$ for "large" values of $x$ ($=n/\sqrt{2}$ in the original question)--th
How to compute the probability associated with absurdly large Z-scores? The question concerns the complementary error function $$\textrm{erfc}(x) = \frac{2}{\sqrt{\pi}}\int_{x}^{\infty}\exp(-t^2) d t$$ for "large" values of $x$ ($=n/\sqrt{2}$ in the original question)--that is, between 100 and 700,000 or so. (In practice, any value greater than about 6 should be considered "large," as we will see.) Note that because this will be used to compute p-values, there is little value in obtaining more than three significant (decimal) digits. To begin, consider the approximation suggested by @Iterator, $$f(x) = 1 - \sqrt{1 - \exp \left(-x^2 \left(\frac{4 + ax^2}{\pi + ax^2}\right)\right)},$$ where $$a = \frac{8(\pi-3)}{3(4-\pi)} \approx 0.439862.$$ Although this is an excellent approximation to the error function itself, it's a terrible approximation to $\textrm{erfc}$. However, there is a way to systematically fix that up. For the p-values associated with such large values of $x$, we're interested in the relative error $f(x)/\textrm{erfc}(x) - 1$: we hope its absolute value would be less than 0.001 for three significant digits of precision. Unfortunately this expression is difficult to study for large $x$ due to underflows in double-precision computation. Here is one attempt, which plots the relative error versus $x$ for $0 \le x \le 5.8$: The calculation becomes unstable once $x$ exceeds 5.3 or so and cannot deliver one significant digit past 5.8. This is no surprise: $\exp(-5.8^2) \approx 10^{-14.6}$ is pushing the limits of double-precision arithmetic. Because there is no evidence that the relative error is going to be acceptably small for larger $x$, we need to do better. Performing the calculation in extended arithmetic (with Mathematica) improves our picture of what's going on: The error increases rapidly with $x$ and shows no signs of leveling off. Past $x=10$ or so, this approximation doesn't even deliver one reliable digit of information! However, the plot is starting to look linear. We might guess that the relative error is directly proportional to $x$. (This makes sense on theoretical grounds: $\textrm{erfc}$ is manifestly an odd function and $f$ is manifestly even, so their ratio ought to be an odd function. Thus we would expect the relative error, if it increases, to behave like an odd power of $x$.) This leads us to study the relative error divided by $x$. Equivalently, I choose to examine $x \cdot \textrm{erfc}(x)/f(x)$, because the hope is this should have a constant limiting value. Here is its graph: Our guess appears to be borne out: this ratio does seem to be approaching a limit around 8 or so. When asked, Mathematica will supply it: a1 = Limit[x (Erfc[x]/f[x]), x -> \[Infinity]] The value is $a_1 = \frac{2 }{\sqrt{\pi }}e^{\frac{3 (-4+\pi )^2}{8 (-3+\pi )}} \approx 7.94325$. This enables us to improve the estimate: we take $$f_1(x) = f(x) \frac{a_1}{x}$$ as the first refinement of the approximation. When $x$ is really large--greater than a few thousand--this approximation is just fine. Because it's still not going to be good enough for an interesting range of arguments between $5.3$ and $2000$ or so, let's iterate the procedure. This time, the inverse relative error--specifically, the expression $1 - \textrm{erfc}(x)/f_1(x)$--should behave like $1/x^2$ for large $x$ (by virtue of the previous parity considerations). Accordingly, we multiply by $x^2$ and find the next limit: a2 = Limit[x^2 (a1 - x (Erfc[x]/f[x])), x -> \[Infinity]] The value is $$a_2 = \frac{1}{32 \sqrt{\pi }} e^{\frac{3 (-4+\pi )^2}{8 (-3+\pi )}} \left(32-\frac{9 (-4+\pi )^3 \pi }{(-3+\pi )^2}\right) \approx 114.687.$$ This process can proceed as long as we like. I took it out one more step, finding a3 = Limit[x^2 (a2 - x^2 (a1 - x (Erfc[x]/f[x]))), x -> \[Infinity]] with value approximately 1623.67. (The full expression involves a degree-eight rational function of $\pi$ and is too long to be useful here.) Unwinding these operations yields our final approximation $$f_3(x) = f(x)\left(a_1 - a_2/x^2 + a_3/x^4\right)/x.$$ The error is proportional to $x^{-6}$. Of import is the constant of proportionality, so we plot $x^6(1 - \textrm{erfc}(x) / f_3(x))$: It rapidly approaches a limiting value around 2660.59. Using the approximation $f_3$, we obtain estimates of $\textrm{erfc}(x)$ whose relative accuracy is better than $2661/x^6$ for all $x \gt 0$. Once $x$ exceeds 20 or so, we have our three significant digits (or far more, as $x$ gets larger). As a check, here is a table comparing the correct values to the approximation for $x$ between $10$ and $20$: x Erfc Approximation 10 2.088*10^-45 2.094*10^-45 11 1.441*10^-54 1.443*10^-54 12 1.356*10^-64 1.357*10^-64 13 1.740*10^-75 1.741*10^-75 14 3.037*10^-87 3.038*10^-87 15 7.213*10^-100 7.215*10^-100 16 2.328*10^-113 2.329*10^-113 17 1.021*10^-127 1.021*10^-127 18 6.082*10^-143 6.083*10^-143 19 4.918*10^-159 4.918*10^-159 20 5.396*10^-176 5.396*10^-176 In fact, this approximation delivers at least two significant figures of precision for $x=8$ on, which is just about where pedestrian calculations (such as Excel's NormSDist function) peter out. Finally, one might worry about our ability to compute the initial approximation $f$. However, that's not hard: when $x$ is large enough to cause underflows in the exponential, the square root is well approximated by half the exponential, $$f(x) \approx \frac{1}{2} \exp \left(-x^2 \left(\frac{4 + ax^2}{\pi + ax^2}\right)\right).$$ Computing the logarithm of this (in base 10) is simple, and readily gives the desired result. For example, let $x=1000$. The common logarithm of this approximation is $$\log_{10}(f(x)) \approx \left(-1000^2 \left(\frac{4 + a \cdot 1000^2}{\pi + a \cdot 1000^2}\right) - \log(2)\right) / \log(10) \sim -434295.63047.$$ Exponentiating yields $$f(1000) \approx 2.34169 \cdot 10^{-434296}.$$ Applying the correction (in $f_3$) produces $$\textrm{erfc}(1000) \approx 1.86003\ 70486\ 32328 \cdot 10^{-434298}.$$ Note that the correction reduces the original approximation by over 99% (and indeed, $a_1/x \approx 1\text{%}$.) (This approximation differs from the correct value only in the last digit. Another well-known approximation, $\exp(-x^2)/(x\sqrt{\pi})$, equals $1.860038 \cdot 10^{-434298}$, erring in the sixth significant digit. I'm sure we could improve that one, too, if we wanted, using the same techniques.)
How to compute the probability associated with absurdly large Z-scores? The question concerns the complementary error function $$\textrm{erfc}(x) = \frac{2}{\sqrt{\pi}}\int_{x}^{\infty}\exp(-t^2) d t$$ for "large" values of $x$ ($=n/\sqrt{2}$ in the original question)--th
19,434
How to compute the probability associated with absurdly large Z-scores?
A simple upper bound For very large values of the argument in the calculation of upper tail probability of a normal, excellent bounds exist that are probably as good as one will get using any other methods with double-precision floating point. For $z > 0$, let $$ \renewcommand{\Pr}{\mathbb{P}}\newcommand{\rd}{\mathrm{d}} S(z) := \Pr(Z > z) = \int_z^\infty \varphi(z) \rd z \>, $$ where $\varphi(z) = (2\pi)^{-1/2} e^{-z^2/2}$ is the standard normal pdf. I've used the notation $S(z)$ in deference to the standard notation in survival analysis. In engineering contexts, they call this function the $Q$-function and denote it by $Q(z)$. Then, a very simple, elementary upper bound is $$\newcommand{\Su}{\hat{S}_u} \newcommand{\Sl}{\hat{S}_\ell} S(z) \leq \frac{\varphi(z)}{z} =: \Su(z) \> , $$ where the notation on the right-hand side indicates this is an upper-bound estimate. This answer gives a proof of the bound. There are several nice complementary lower bounds as well. One of the handiest and easiest to derive is the bound $$ S(z) \geq \frac{z}{z^2+1} \varphi(z) =: \Sl(z) \> . $$ There are at least three separate methods for deriving this bound. A rough sketch of one such method can be found in this answer to a related question. A picture Below is a plot of the two bounds (in grey) along with the actual function $S(z)$. How good is it? From the plot, it seems that the bounds become quite tight even for moderately large $z$. We might ask ourselves how tight they are and what sort of quantitative statement in that regard can be made. One useful measure of tightness is the absolute relative error $$ \newcommand{\err}{\mathcal{E}} \err(z) = \left|\frac{\Su(z) - S(z)}{S(z)}\right| \>. $$ This gives you the proportional error of the estimate. Now, note that, since all of the involved functions are nonnegative, by using the bounding properties of $\Su(z)$ and $\Sl(z)$, we get $$ \err(z) = \frac{\Su(z) - S(z)}{S(z)} \leq \frac{\Su(z) - \Sl(z)}{\Sl(z)} = z^{-2} \> , $$ and so this provides a proof that for $z \geq 10$ the upper-bound is correct to within 1%, for $z \geq 28$ it is correct to within 0.1% and for $z \geq 100$ it is correct to within 0.01%. In fact, the simple form of the bounds provides a good check on other "approximations". If, in the numerical calculation of more complicated approximations, we get a value outside these bounds, we can simply "correct" it to take the value of, e.g., the upper bound provided here. There are many refinements of these bounds. The Laplace bounds mentioned here provide a nice sequence of upper and lower bounds on $S(z)$ of the form $R(z) \varphi(z)$ where $R(z)$ is a rational function. Finally, here is another somewhat-related question and answer.
How to compute the probability associated with absurdly large Z-scores?
A simple upper bound For very large values of the argument in the calculation of upper tail probability of a normal, excellent bounds exist that are probably as good as one will get using any other me
How to compute the probability associated with absurdly large Z-scores? A simple upper bound For very large values of the argument in the calculation of upper tail probability of a normal, excellent bounds exist that are probably as good as one will get using any other methods with double-precision floating point. For $z > 0$, let $$ \renewcommand{\Pr}{\mathbb{P}}\newcommand{\rd}{\mathrm{d}} S(z) := \Pr(Z > z) = \int_z^\infty \varphi(z) \rd z \>, $$ where $\varphi(z) = (2\pi)^{-1/2} e^{-z^2/2}$ is the standard normal pdf. I've used the notation $S(z)$ in deference to the standard notation in survival analysis. In engineering contexts, they call this function the $Q$-function and denote it by $Q(z)$. Then, a very simple, elementary upper bound is $$\newcommand{\Su}{\hat{S}_u} \newcommand{\Sl}{\hat{S}_\ell} S(z) \leq \frac{\varphi(z)}{z} =: \Su(z) \> , $$ where the notation on the right-hand side indicates this is an upper-bound estimate. This answer gives a proof of the bound. There are several nice complementary lower bounds as well. One of the handiest and easiest to derive is the bound $$ S(z) \geq \frac{z}{z^2+1} \varphi(z) =: \Sl(z) \> . $$ There are at least three separate methods for deriving this bound. A rough sketch of one such method can be found in this answer to a related question. A picture Below is a plot of the two bounds (in grey) along with the actual function $S(z)$. How good is it? From the plot, it seems that the bounds become quite tight even for moderately large $z$. We might ask ourselves how tight they are and what sort of quantitative statement in that regard can be made. One useful measure of tightness is the absolute relative error $$ \newcommand{\err}{\mathcal{E}} \err(z) = \left|\frac{\Su(z) - S(z)}{S(z)}\right| \>. $$ This gives you the proportional error of the estimate. Now, note that, since all of the involved functions are nonnegative, by using the bounding properties of $\Su(z)$ and $\Sl(z)$, we get $$ \err(z) = \frac{\Su(z) - S(z)}{S(z)} \leq \frac{\Su(z) - \Sl(z)}{\Sl(z)} = z^{-2} \> , $$ and so this provides a proof that for $z \geq 10$ the upper-bound is correct to within 1%, for $z \geq 28$ it is correct to within 0.1% and for $z \geq 100$ it is correct to within 0.01%. In fact, the simple form of the bounds provides a good check on other "approximations". If, in the numerical calculation of more complicated approximations, we get a value outside these bounds, we can simply "correct" it to take the value of, e.g., the upper bound provided here. There are many refinements of these bounds. The Laplace bounds mentioned here provide a nice sequence of upper and lower bounds on $S(z)$ of the form $R(z) \varphi(z)$ where $R(z)$ is a rational function. Finally, here is another somewhat-related question and answer.
How to compute the probability associated with absurdly large Z-scores? A simple upper bound For very large values of the argument in the calculation of upper tail probability of a normal, excellent bounds exist that are probably as good as one will get using any other me
19,435
How to compute the probability associated with absurdly large Z-scores?
You can approximate it with much simpler functions - see this Wikipedia section for more information. The basic approximation is that $\textrm{erf}(x) \approx \textrm{sgn}(x)\sqrt{1 - \exp(-x^2 \frac{4/\pi + ax^2}{1+ax^2}})$ The article has an incorrect link for that section. The PDF referenced can be found in Sergei Winitzki's files - or at this link.
How to compute the probability associated with absurdly large Z-scores?
You can approximate it with much simpler functions - see this Wikipedia section for more information. The basic approximation is that $\textrm{erf}(x) \approx \textrm{sgn}(x)\sqrt{1 - \exp(-x^2 \frac
How to compute the probability associated with absurdly large Z-scores? You can approximate it with much simpler functions - see this Wikipedia section for more information. The basic approximation is that $\textrm{erf}(x) \approx \textrm{sgn}(x)\sqrt{1 - \exp(-x^2 \frac{4/\pi + ax^2}{1+ax^2}})$ The article has an incorrect link for that section. The PDF referenced can be found in Sergei Winitzki's files - or at this link.
How to compute the probability associated with absurdly large Z-scores? You can approximate it with much simpler functions - see this Wikipedia section for more information. The basic approximation is that $\textrm{erf}(x) \approx \textrm{sgn}(x)\sqrt{1 - \exp(-x^2 \frac
19,436
How would I bias my binary classifier to prefer false positive errors over false negatives?
A standard way to go about this is as follows: As mentioned in Dave's answer, instead of taking the binary predictions of the Keras classifier, use the scores or logits instead -- i.e. you need to have a confidence value for the positive class, instead of a hard prediction of "1" for the positive class and "0" for the negative class. (most Keras models have a model.predict() method that gives you the confidence for each class). Now plot a ROC curve, for which sklearn has some nifty functions ready-made: https://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.html. This curve basically plots the true positive rate versus the false positive rate, which are obtained by setting various thresholds on the predicted confidence and calculating the true positive rate (TPR) and false positive rate (FPR). Looking at the ROC curve, you can select a point you would prefer (i.e. with very few false negatives and an acceptable number of false positives). The threshold that gives this (TPR, FPR) point should be the operating point of your classifier (i.e. apply this threshold on the model confidence for "class 1").
How would I bias my binary classifier to prefer false positive errors over false negatives?
A standard way to go about this is as follows: As mentioned in Dave's answer, instead of taking the binary predictions of the Keras classifier, use the scores or logits instead -- i.e. you need to ha
How would I bias my binary classifier to prefer false positive errors over false negatives? A standard way to go about this is as follows: As mentioned in Dave's answer, instead of taking the binary predictions of the Keras classifier, use the scores or logits instead -- i.e. you need to have a confidence value for the positive class, instead of a hard prediction of "1" for the positive class and "0" for the negative class. (most Keras models have a model.predict() method that gives you the confidence for each class). Now plot a ROC curve, for which sklearn has some nifty functions ready-made: https://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.html. This curve basically plots the true positive rate versus the false positive rate, which are obtained by setting various thresholds on the predicted confidence and calculating the true positive rate (TPR) and false positive rate (FPR). Looking at the ROC curve, you can select a point you would prefer (i.e. with very few false negatives and an acceptable number of false positives). The threshold that gives this (TPR, FPR) point should be the operating point of your classifier (i.e. apply this threshold on the model confidence for "class 1").
How would I bias my binary classifier to prefer false positive errors over false negatives? A standard way to go about this is as follows: As mentioned in Dave's answer, instead of taking the binary predictions of the Keras classifier, use the scores or logits instead -- i.e. you need to ha
19,437
How would I bias my binary classifier to prefer false positive errors over false negatives?
Remember that your neural network outputs probabilities, not classifications. It is up to you to use the probabilities to make classifications. The software default is to use a threshold of $0.5$ to determine classification, but that might not be the right number for you. While there are two outcomes, there is likely a third option in the decision-making process of your medical application: “inconclusive, collect more information.” Perhaps you will want something like below $0.3$ is category $0$, above $0.7$ is category $1$, and between $0.3$ and $0.7$ is inconclusive. This idea of neural networks outputting probabilities instead of categories is related to what are called proper scoring rules and (better yet) strictly proper scoring rules. Among others on here, Frank Harrell and Stephan Kolassa are fans, the former of whom writes about them on his blog. https://www.fharrell.com/post/class-damage/ https://www.fharrell.com/post/classification/ Also of interest: Proper scoring rule when there is a decision to make (e.g. spam vs ham email)
How would I bias my binary classifier to prefer false positive errors over false negatives?
Remember that your neural network outputs probabilities, not classifications. It is up to you to use the probabilities to make classifications. The software default is to use a threshold of $0.5$ to d
How would I bias my binary classifier to prefer false positive errors over false negatives? Remember that your neural network outputs probabilities, not classifications. It is up to you to use the probabilities to make classifications. The software default is to use a threshold of $0.5$ to determine classification, but that might not be the right number for you. While there are two outcomes, there is likely a third option in the decision-making process of your medical application: “inconclusive, collect more information.” Perhaps you will want something like below $0.3$ is category $0$, above $0.7$ is category $1$, and between $0.3$ and $0.7$ is inconclusive. This idea of neural networks outputting probabilities instead of categories is related to what are called proper scoring rules and (better yet) strictly proper scoring rules. Among others on here, Frank Harrell and Stephan Kolassa are fans, the former of whom writes about them on his blog. https://www.fharrell.com/post/class-damage/ https://www.fharrell.com/post/classification/ Also of interest: Proper scoring rule when there is a decision to make (e.g. spam vs ham email)
How would I bias my binary classifier to prefer false positive errors over false negatives? Remember that your neural network outputs probabilities, not classifications. It is up to you to use the probabilities to make classifications. The software default is to use a threshold of $0.5$ to d
19,438
How would I bias my binary classifier to prefer false positive errors over false negatives?
Here are a couple of options to bias the network towards the class you want: 1- Modify the class weights. For example, in order for your algorithm to treat every instance of class 0 as 5 instances of class 1, you can do: class_weight = {0: 5., 1: 1.} model.fit(X, y, class_weight=class_weight) 2- Modifying the classification threshold based on the ROC curve, as pointed out by Dave and AruniRC. 3- Oversampling the training samples from the class that you want to prioritize, e.g.: X_neg = X[y == 0] X_pos = X[y == 1] ids = np.arange(len(X_neg)) choices = np.random.choice(ids, len(X_pos) * 5) X_neg = X_neg[choices] X_pos = X_pos y_neg = np.zeros(len(X_neg), dtype=np.int8) y_pos = np.ones(len(X_pos), dtype=np.int8) X = np.vstack([X_neg, X_pos]) y = np.stack([y_neg, y_pos]) The problem you stated is generally a common problem in the case of imbalanced datasets, where you might have many more samples in one class compared to another (which commonly happens in medical datasets). Most of these points were taken from the Keras tutorial for handling imbalanced datasets.
How would I bias my binary classifier to prefer false positive errors over false negatives?
Here are a couple of options to bias the network towards the class you want: 1- Modify the class weights. For example, in order for your algorithm to treat every instance of class 0 as 5 instances of
How would I bias my binary classifier to prefer false positive errors over false negatives? Here are a couple of options to bias the network towards the class you want: 1- Modify the class weights. For example, in order for your algorithm to treat every instance of class 0 as 5 instances of class 1, you can do: class_weight = {0: 5., 1: 1.} model.fit(X, y, class_weight=class_weight) 2- Modifying the classification threshold based on the ROC curve, as pointed out by Dave and AruniRC. 3- Oversampling the training samples from the class that you want to prioritize, e.g.: X_neg = X[y == 0] X_pos = X[y == 1] ids = np.arange(len(X_neg)) choices = np.random.choice(ids, len(X_pos) * 5) X_neg = X_neg[choices] X_pos = X_pos y_neg = np.zeros(len(X_neg), dtype=np.int8) y_pos = np.ones(len(X_pos), dtype=np.int8) X = np.vstack([X_neg, X_pos]) y = np.stack([y_neg, y_pos]) The problem you stated is generally a common problem in the case of imbalanced datasets, where you might have many more samples in one class compared to another (which commonly happens in medical datasets). Most of these points were taken from the Keras tutorial for handling imbalanced datasets.
How would I bias my binary classifier to prefer false positive errors over false negatives? Here are a couple of options to bias the network towards the class you want: 1- Modify the class weights. For example, in order for your algorithm to treat every instance of class 0 as 5 instances of
19,439
How to split a data set to do 10-fold cross validation
caret has a function for this: require(caret) flds <- createFolds(y, k = 10, list = TRUE, returnTrain = FALSE) names(flds)[1] <- "train" Then each element of flds is a list of indexes for each dataset. If your dataset is called dat, then dat[flds$train,] gets you the training set, dat[ flds[[2]], ] gets you the second fold set, etc.
How to split a data set to do 10-fold cross validation
caret has a function for this: require(caret) flds <- createFolds(y, k = 10, list = TRUE, returnTrain = FALSE) names(flds)[1] <- "train" Then each element of flds is a list of indexes for each datase
How to split a data set to do 10-fold cross validation caret has a function for this: require(caret) flds <- createFolds(y, k = 10, list = TRUE, returnTrain = FALSE) names(flds)[1] <- "train" Then each element of flds is a list of indexes for each dataset. If your dataset is called dat, then dat[flds$train,] gets you the training set, dat[ flds[[2]], ] gets you the second fold set, etc.
How to split a data set to do 10-fold cross validation caret has a function for this: require(caret) flds <- createFolds(y, k = 10, list = TRUE, returnTrain = FALSE) names(flds)[1] <- "train" Then each element of flds is a list of indexes for each datase
19,440
How to split a data set to do 10-fold cross validation
Here is a simple way to perform 10-fold using no packages: #Randomly shuffle the data yourData<-yourData[sample(nrow(yourData)),] #Create 10 equally size folds folds <- cut(seq(1,nrow(yourData)),breaks=10,labels=FALSE) #Perform 10 fold cross validation for(i in 1:10){ #Segement your data by fold using the which() function testIndexes <- which(folds==i,arr.ind=TRUE) testData <- yourData[testIndexes, ] trainData <- yourData[-testIndexes, ] #Use the test and train data partitions however you desire... }
How to split a data set to do 10-fold cross validation
Here is a simple way to perform 10-fold using no packages: #Randomly shuffle the data yourData<-yourData[sample(nrow(yourData)),] #Create 10 equally size folds folds <- cut(seq(1,nrow(yourData)),brea
How to split a data set to do 10-fold cross validation Here is a simple way to perform 10-fold using no packages: #Randomly shuffle the data yourData<-yourData[sample(nrow(yourData)),] #Create 10 equally size folds folds <- cut(seq(1,nrow(yourData)),breaks=10,labels=FALSE) #Perform 10 fold cross validation for(i in 1:10){ #Segement your data by fold using the which() function testIndexes <- which(folds==i,arr.ind=TRUE) testData <- yourData[testIndexes, ] trainData <- yourData[-testIndexes, ] #Use the test and train data partitions however you desire... }
How to split a data set to do 10-fold cross validation Here is a simple way to perform 10-fold using no packages: #Randomly shuffle the data yourData<-yourData[sample(nrow(yourData)),] #Create 10 equally size folds folds <- cut(seq(1,nrow(yourData)),brea
19,441
How to split a data set to do 10-fold cross validation
Probably not the best way, but here is one way to do it. I'm pretty sure when I wrote this code I had borrowed a trick from another answer on here, but I couldn't find it to link to. # Generate some test data x <- runif(100)*10 #Random values between 0 and 10 y <- x+rnorm(100)*.1 #y~x+error dataset <- data.frame(x,y) #Create data frame plot(dataset$x,dataset$y) #Plot the data #install.packages("cvTools") library(cvTools) #run the above line if you don't have this library k <- 10 #the number of folds folds <- cvFolds(NROW(dataset), K=k) dataset$holdoutpred <- rep(0,nrow(dataset)) for(i in 1:k){ train <- dataset[folds$subsets[folds$which != i], ] #Set the training set validation <- dataset[folds$subsets[folds$which == i], ] #Set the validation set newlm <- lm(y~x,data=train) #Get your new linear model (just fit on the train data) newpred <- predict(newlm,newdata=validation) #Get the predicitons for the validation set (from the model just fit on the train data) dataset[folds$subsets[folds$which == i], ]$holdoutpred <- newpred #Put the hold out prediction in the data set for later use } dataset$holdoutpred #do whatever you want with these predictions
How to split a data set to do 10-fold cross validation
Probably not the best way, but here is one way to do it. I'm pretty sure when I wrote this code I had borrowed a trick from another answer on here, but I couldn't find it to link to. # Generate some t
How to split a data set to do 10-fold cross validation Probably not the best way, but here is one way to do it. I'm pretty sure when I wrote this code I had borrowed a trick from another answer on here, but I couldn't find it to link to. # Generate some test data x <- runif(100)*10 #Random values between 0 and 10 y <- x+rnorm(100)*.1 #y~x+error dataset <- data.frame(x,y) #Create data frame plot(dataset$x,dataset$y) #Plot the data #install.packages("cvTools") library(cvTools) #run the above line if you don't have this library k <- 10 #the number of folds folds <- cvFolds(NROW(dataset), K=k) dataset$holdoutpred <- rep(0,nrow(dataset)) for(i in 1:k){ train <- dataset[folds$subsets[folds$which != i], ] #Set the training set validation <- dataset[folds$subsets[folds$which == i], ] #Set the validation set newlm <- lm(y~x,data=train) #Get your new linear model (just fit on the train data) newpred <- predict(newlm,newdata=validation) #Get the predicitons for the validation set (from the model just fit on the train data) dataset[folds$subsets[folds$which == i], ]$holdoutpred <- newpred #Put the hold out prediction in the data set for later use } dataset$holdoutpred #do whatever you want with these predictions
How to split a data set to do 10-fold cross validation Probably not the best way, but here is one way to do it. I'm pretty sure when I wrote this code I had borrowed a trick from another answer on here, but I couldn't find it to link to. # Generate some t
19,442
How to split a data set to do 10-fold cross validation
please find below some other code that i use (borrowed and adapted from another source). Copied it straight from a script that i just used myself, left in the rpart routine. The part probably most of interest are the lines on the creation of the folds. Alternatively - you can use the crossval function from the bootstrap package. #define error matrix err <- matrix(NA,nrow=1,ncol=10) errcv=err #creation of folds for(c in 1:10){ n=nrow(df);K=10; sizeblock= n%/%K;alea=runif(n);rang=rank(alea);bloc=(rang-1)%/%sizeblock+1;bloc[bloc==K+1]=K;bloc=factor(bloc); bloc=as.factor(bloc);print(summary(bloc)) for(k in 1:10){ #rpart fit=rpart(type~., data=df[bloc!=k,],xval=0) ; (predict(fit,df[bloc==k,])) answers=(predict(fit,df[bloc==k,],type="class")==resp[bloc==k]) err[1,k]=1-(sum(answers)/length(answers)) } err errcv[,c]=rowMeans(err, na.rm = FALSE, dims = 1) } errcv
How to split a data set to do 10-fold cross validation
please find below some other code that i use (borrowed and adapted from another source). Copied it straight from a script that i just used myself, left in the rpart routine. The part probably most of
How to split a data set to do 10-fold cross validation please find below some other code that i use (borrowed and adapted from another source). Copied it straight from a script that i just used myself, left in the rpart routine. The part probably most of interest are the lines on the creation of the folds. Alternatively - you can use the crossval function from the bootstrap package. #define error matrix err <- matrix(NA,nrow=1,ncol=10) errcv=err #creation of folds for(c in 1:10){ n=nrow(df);K=10; sizeblock= n%/%K;alea=runif(n);rang=rank(alea);bloc=(rang-1)%/%sizeblock+1;bloc[bloc==K+1]=K;bloc=factor(bloc); bloc=as.factor(bloc);print(summary(bloc)) for(k in 1:10){ #rpart fit=rpart(type~., data=df[bloc!=k,],xval=0) ; (predict(fit,df[bloc==k,])) answers=(predict(fit,df[bloc==k,],type="class")==resp[bloc==k]) err[1,k]=1-(sum(answers)/length(answers)) } err errcv[,c]=rowMeans(err, na.rm = FALSE, dims = 1) } errcv
How to split a data set to do 10-fold cross validation please find below some other code that i use (borrowed and adapted from another source). Copied it straight from a script that i just used myself, left in the rpart routine. The part probably most of
19,443
How to split a data set to do 10-fold cross validation
# Evaluate models uses k-fold cross-validation install.packages("DAAG") library("DAAG") cv.lm(data=dat, form.lm=mod1, m= 10, plotit = F) Everything done for you in one line of code! ?cv.lm for information on input and output
How to split a data set to do 10-fold cross validation
# Evaluate models uses k-fold cross-validation install.packages("DAAG") library("DAAG") cv.lm(data=dat, form.lm=mod1, m= 10, plotit = F) Everything done for you in one line of code! ?cv.lm for infor
How to split a data set to do 10-fold cross validation # Evaluate models uses k-fold cross-validation install.packages("DAAG") library("DAAG") cv.lm(data=dat, form.lm=mod1, m= 10, plotit = F) Everything done for you in one line of code! ?cv.lm for information on input and output
How to split a data set to do 10-fold cross validation # Evaluate models uses k-fold cross-validation install.packages("DAAG") library("DAAG") cv.lm(data=dat, form.lm=mod1, m= 10, plotit = F) Everything done for you in one line of code! ?cv.lm for infor
19,444
How to split a data set to do 10-fold cross validation
Because I did not my approach in this list, I thought I could share another option for people who don't feel like installing packages for a quick cross validation # get the data from somewhere and specify number of folds data <- read.csv('my_data.csv') nrFolds <- 10 # generate array containing fold-number for each sample (row) folds <- rep_len(1:nrFolds, nrow(data)) # actual cross validation for(k in 1:nrFolds) { # actual split of the data fold <- which(folds == k) data.train <- data[-fold,] data.test <- data[fold,] # train and test your model with data.train and data.test } Note that the code above assumes that the data is already shuffled. If this would not be the case, you could consider adding something like folds <- sample(folds, nrow(data))
How to split a data set to do 10-fold cross validation
Because I did not my approach in this list, I thought I could share another option for people who don't feel like installing packages for a quick cross validation # get the data from somewhere and spe
How to split a data set to do 10-fold cross validation Because I did not my approach in this list, I thought I could share another option for people who don't feel like installing packages for a quick cross validation # get the data from somewhere and specify number of folds data <- read.csv('my_data.csv') nrFolds <- 10 # generate array containing fold-number for each sample (row) folds <- rep_len(1:nrFolds, nrow(data)) # actual cross validation for(k in 1:nrFolds) { # actual split of the data fold <- which(folds == k) data.train <- data[-fold,] data.test <- data[fold,] # train and test your model with data.train and data.test } Note that the code above assumes that the data is already shuffled. If this would not be the case, you could consider adding something like folds <- sample(folds, nrow(data))
How to split a data set to do 10-fold cross validation Because I did not my approach in this list, I thought I could share another option for people who don't feel like installing packages for a quick cross validation # get the data from somewhere and spe
19,445
Multicollinearity when individual regressions are significant, but VIFs are low
To understand what can go on, it is instructive to generate (and analyze) data that behave in the manner described. For simplicity, let's forget about that sixth independent variable. So, the question describes regressions of one dependent variable $y$ against five independent variables $x_1, x_2, x_3, x_4, x_5$, in which Each ordinary regression $y \sim x_i$ is significant at levels from $0.01$ to less than $0.001$. The multiple regression $y \sim x_1 + \cdots + x_5$ yields significant coefficients only for $x_1$ and $x_2$. All variance inflation factors (VIFs) are low, indicating good conditioning in the design matrix (that is, lack of collinearity among the $x_i$). Let's make this happen as follows: Generate $n$ normally distributed values for $x_1$ and $x_2$. (We will choose $n$ later.) Let $y = x_1 + x_2 + \varepsilon$ where $\varepsilon$ is independent normal error of mean $0$. Some trial and error is needed to find a suitable standard deviation for $\varepsilon$; $1/100$ works fine (and is rather dramatic: $y$ is extremely well correlated with $x_1$ and $x_2$, even though it is only moderately correlated with $x_1$ and $x_2$ individually). Let $x_j$ = $x_1/5 + \delta$, $j=3,4,5$, where $\delta$ is independent standard normal error. This makes $x_3,x_4,x_5$ only slightly dependent on $x_1$. However, via the tight correlation between $x_1$ and $y$, this induces a tiny correlation between $y$ and these $x_j$. Here's the rub: if we make $n$ large enough, these slight correlations will result in significant coefficients, even though $y$ is almost entirely "explained" by only the first two variables. I found that $n=500$ works just fine for reproducing the reported p-values. Here's a scatterplot matrix of all six variables: By inspecting the right column (or the bottom row) you can see that $y$ has a good (positive) correlation with $x_1$ and $x_2$ but little apparent correlation with the other variables. By inspecting the rest of this matrix, you can see that the independent variables $x_1, \ldots, x_5$ appear to be mutually uncorrelated (the random $\delta$ mask the tiny dependencies we know are there.) There are no exceptional data--nothing terribly outlying or with high leverage. The histograms show that all six variables are approximately normally distributed, by the way: these data are as ordinary and "plain vanilla" as one could possibly want. In the regression of $y$ against $x_1$ and $x_2$, the p-values are essentially 0. In the individual regressions of $y$ against $x_3$, then $y$ against $x_4$, and $y$ against $x_5$, the p-values are 0.0024, 0.0083, and 0.00064, respectively: that is, they are "highly significant." But in the full multiple regression, the corresponding p-values inflate to .46, .36, and .52, respectively: not significant at all. The reason for this is that once $y$ has been regressed against $x_1$ and $x_2$, the only stuff left to "explain" is the tiny amount of error in the residuals, which will approximate $\varepsilon$, and this error is almost completely unrelated to the remaining $x_i$. ("Almost" is correct: there is a really tiny relationship induced from the fact that the residuals were computed in part from the values of $x_1$ and $x_2$ and the $x_i$, $i=3,4,5$, do have some weak relationship to $x_1$ and $x_2$. This residual relationship is practically undetectable, though, as we saw.) The conditioning number of the design matrix is only 2.17: that's very low, showing no indication of high multicollinearity whatsoever. (Perfect lack of collinearity would be reflected in a conditioning number of 1, but in practice this is seen only with artificial data and designed experiments. Conditioning numbers in the range 1-6 (or even higher, with more variables) are unremarkable.) This completes the simulation: it has successfully reproduced every aspect of the problem. The important insights this analysis offers include p-values don't tell us anything directly about collinearity. They depend strongly on the amount of data. Relationships among p-values in multiple regressions and p-values in related regressions (involving subsets of the independent variable) are complex and usually unpredictable. Consequently, as others have argued, p-values should not be your sole guide (or even your principal guide) to model selection. Edit It is not necessary for $n$ to be as large as $500$ for these phenomena to appear. Inspired by additional information in the question, the following is a dataset constructed in a similar fashion with $n=24$ (in this case $x_j = 0.4 x_1 + 0.4 x_2 + \delta$ for $j=3,4,5$). This creates correlations of 0.38 to 0.73 between $x_{1-2}$ and $x_{3-5}$. The condition number of the design matrix is 9.05: a little high, but not terrible. (Some rules of thumb say that condition numbers as high as 10 are ok.) The p-values of the individual regressions against $x_3, x_4, x_5$ are 0.002, 0.015, and 0.008: significant to highly significant. Thus, some multicollinearity is involved, but it's not so large that one would work to change it. The basic insight remains the same: significance and multicollinearity are different things; only mild mathematical constraints hold among them; and it is possible for the inclusion or exclusion of even a single variable to have profound effects on all p-values even without severe multicollinearity being an issue. x1 x2 x3 x4 x5 y -1.78256 -0.334959 -1.22672 -1.11643 0.233048 -2.12772 0.796957 -0.282075 1.11182 0.773499 0.954179 0.511363 0.956733 0.925203 1.65832 0.25006 -0.273526 1.89336 0.346049 0.0111112 1.57815 0.767076 1.48114 0.365872 -0.73198 -1.56574 -1.06783 -0.914841 -1.68338 -2.30272 0.221718 -0.175337 -0.0922871 1.25869 -1.05304 0.0268453 1.71033 0.0487565 -0.435238 -0.239226 1.08944 1.76248 0.936259 1.00507 1.56755 0.715845 1.50658 1.93177 -0.664651 0.531793 -0.150516 -0.577719 2.57178 -0.121927 -0.0847412 -1.14022 0.577469 0.694189 -1.02427 -1.2199 -1.30773 1.40016 -1.5949 0.506035 0.539175 0.0955259 -0.55336 1.93245 1.34462 1.15979 2.25317 1.38259 1.6934 0.192212 0.965777 0.283766 3.63855 1.86975 -0.715726 0.259011 -0.674307 0.864498 0.504759 -0.478025 -0.800315 -0.655506 0.0899015 -2.19869 -0.941662 -1.46332 -0.169604 -1.08992 -1.80457 -0.350718 0.818985 -1.2727 0.365721 1.10428 0.33128 -0.0163167 0.295945 1.48115 0.215779 2.233 0.33428 1.07424 0.815481 2.4511 1.07042 0.0490205 -0.195314 0.101451 -0.721812 1.11711 -0.478905 -0.438893 -1.54429 0.798461 -0.774219 -0.90456 1.2487 1.03267 0.958559 1.26925 1.31709 2.26846 -0.124634 -0.616711 0.334179 0.404281 0.531215 -0.747697 -1.82317 1.11467 0.407822 -0.937689 -1.90806 -0.723693 -1.34046 1.16957 0.271146 1.71505 0.910682 -0.176185
Multicollinearity when individual regressions are significant, but VIFs are low
To understand what can go on, it is instructive to generate (and analyze) data that behave in the manner described. For simplicity, let's forget about that sixth independent variable. So, the questio
Multicollinearity when individual regressions are significant, but VIFs are low To understand what can go on, it is instructive to generate (and analyze) data that behave in the manner described. For simplicity, let's forget about that sixth independent variable. So, the question describes regressions of one dependent variable $y$ against five independent variables $x_1, x_2, x_3, x_4, x_5$, in which Each ordinary regression $y \sim x_i$ is significant at levels from $0.01$ to less than $0.001$. The multiple regression $y \sim x_1 + \cdots + x_5$ yields significant coefficients only for $x_1$ and $x_2$. All variance inflation factors (VIFs) are low, indicating good conditioning in the design matrix (that is, lack of collinearity among the $x_i$). Let's make this happen as follows: Generate $n$ normally distributed values for $x_1$ and $x_2$. (We will choose $n$ later.) Let $y = x_1 + x_2 + \varepsilon$ where $\varepsilon$ is independent normal error of mean $0$. Some trial and error is needed to find a suitable standard deviation for $\varepsilon$; $1/100$ works fine (and is rather dramatic: $y$ is extremely well correlated with $x_1$ and $x_2$, even though it is only moderately correlated with $x_1$ and $x_2$ individually). Let $x_j$ = $x_1/5 + \delta$, $j=3,4,5$, where $\delta$ is independent standard normal error. This makes $x_3,x_4,x_5$ only slightly dependent on $x_1$. However, via the tight correlation between $x_1$ and $y$, this induces a tiny correlation between $y$ and these $x_j$. Here's the rub: if we make $n$ large enough, these slight correlations will result in significant coefficients, even though $y$ is almost entirely "explained" by only the first two variables. I found that $n=500$ works just fine for reproducing the reported p-values. Here's a scatterplot matrix of all six variables: By inspecting the right column (or the bottom row) you can see that $y$ has a good (positive) correlation with $x_1$ and $x_2$ but little apparent correlation with the other variables. By inspecting the rest of this matrix, you can see that the independent variables $x_1, \ldots, x_5$ appear to be mutually uncorrelated (the random $\delta$ mask the tiny dependencies we know are there.) There are no exceptional data--nothing terribly outlying or with high leverage. The histograms show that all six variables are approximately normally distributed, by the way: these data are as ordinary and "plain vanilla" as one could possibly want. In the regression of $y$ against $x_1$ and $x_2$, the p-values are essentially 0. In the individual regressions of $y$ against $x_3$, then $y$ against $x_4$, and $y$ against $x_5$, the p-values are 0.0024, 0.0083, and 0.00064, respectively: that is, they are "highly significant." But in the full multiple regression, the corresponding p-values inflate to .46, .36, and .52, respectively: not significant at all. The reason for this is that once $y$ has been regressed against $x_1$ and $x_2$, the only stuff left to "explain" is the tiny amount of error in the residuals, which will approximate $\varepsilon$, and this error is almost completely unrelated to the remaining $x_i$. ("Almost" is correct: there is a really tiny relationship induced from the fact that the residuals were computed in part from the values of $x_1$ and $x_2$ and the $x_i$, $i=3,4,5$, do have some weak relationship to $x_1$ and $x_2$. This residual relationship is practically undetectable, though, as we saw.) The conditioning number of the design matrix is only 2.17: that's very low, showing no indication of high multicollinearity whatsoever. (Perfect lack of collinearity would be reflected in a conditioning number of 1, but in practice this is seen only with artificial data and designed experiments. Conditioning numbers in the range 1-6 (or even higher, with more variables) are unremarkable.) This completes the simulation: it has successfully reproduced every aspect of the problem. The important insights this analysis offers include p-values don't tell us anything directly about collinearity. They depend strongly on the amount of data. Relationships among p-values in multiple regressions and p-values in related regressions (involving subsets of the independent variable) are complex and usually unpredictable. Consequently, as others have argued, p-values should not be your sole guide (or even your principal guide) to model selection. Edit It is not necessary for $n$ to be as large as $500$ for these phenomena to appear. Inspired by additional information in the question, the following is a dataset constructed in a similar fashion with $n=24$ (in this case $x_j = 0.4 x_1 + 0.4 x_2 + \delta$ for $j=3,4,5$). This creates correlations of 0.38 to 0.73 between $x_{1-2}$ and $x_{3-5}$. The condition number of the design matrix is 9.05: a little high, but not terrible. (Some rules of thumb say that condition numbers as high as 10 are ok.) The p-values of the individual regressions against $x_3, x_4, x_5$ are 0.002, 0.015, and 0.008: significant to highly significant. Thus, some multicollinearity is involved, but it's not so large that one would work to change it. The basic insight remains the same: significance and multicollinearity are different things; only mild mathematical constraints hold among them; and it is possible for the inclusion or exclusion of even a single variable to have profound effects on all p-values even without severe multicollinearity being an issue. x1 x2 x3 x4 x5 y -1.78256 -0.334959 -1.22672 -1.11643 0.233048 -2.12772 0.796957 -0.282075 1.11182 0.773499 0.954179 0.511363 0.956733 0.925203 1.65832 0.25006 -0.273526 1.89336 0.346049 0.0111112 1.57815 0.767076 1.48114 0.365872 -0.73198 -1.56574 -1.06783 -0.914841 -1.68338 -2.30272 0.221718 -0.175337 -0.0922871 1.25869 -1.05304 0.0268453 1.71033 0.0487565 -0.435238 -0.239226 1.08944 1.76248 0.936259 1.00507 1.56755 0.715845 1.50658 1.93177 -0.664651 0.531793 -0.150516 -0.577719 2.57178 -0.121927 -0.0847412 -1.14022 0.577469 0.694189 -1.02427 -1.2199 -1.30773 1.40016 -1.5949 0.506035 0.539175 0.0955259 -0.55336 1.93245 1.34462 1.15979 2.25317 1.38259 1.6934 0.192212 0.965777 0.283766 3.63855 1.86975 -0.715726 0.259011 -0.674307 0.864498 0.504759 -0.478025 -0.800315 -0.655506 0.0899015 -2.19869 -0.941662 -1.46332 -0.169604 -1.08992 -1.80457 -0.350718 0.818985 -1.2727 0.365721 1.10428 0.33128 -0.0163167 0.295945 1.48115 0.215779 2.233 0.33428 1.07424 0.815481 2.4511 1.07042 0.0490205 -0.195314 0.101451 -0.721812 1.11711 -0.478905 -0.438893 -1.54429 0.798461 -0.774219 -0.90456 1.2487 1.03267 0.958559 1.26925 1.31709 2.26846 -0.124634 -0.616711 0.334179 0.404281 0.531215 -0.747697 -1.82317 1.11467 0.407822 -0.937689 -1.90806 -0.723693 -1.34046 1.16957 0.271146 1.71505 0.910682 -0.176185
Multicollinearity when individual regressions are significant, but VIFs are low To understand what can go on, it is instructive to generate (and analyze) data that behave in the manner described. For simplicity, let's forget about that sixth independent variable. So, the questio
19,446
Multicollinearity when individual regressions are significant, but VIFs are low
Do I or do I not have a multicollinearity problem? If I do, then how should I proceed? It's not an either-or situation. And I am skeptical about the "4 or 5" guideline. For each of your predictors, the standard error of the coefficient is between 2.2 and 5.6 times as large as it would be if the predictor were uncorrelated with the others. And the portion of a given predictor that cannot be explained by the others ranges from 1/2.2 to 1/5.6, or 18% to 45%. Altogether, that seems a pretty substantial amount of collinearity. But let's step back for a minute. Are you really trying to predict *Y*, as opposed to trying to explain it? If the former, then I don't suppose you need care whether the significance level of a given variable changes when others are present in the model. Your job is really much easier than it would be if true explanation were needed. If explanation is your goal, you'll need to consider the way these variables interrelate--something that requires more than statistical information. Clearly they overlap in the way they relate to Y, and this collinearity will make it difficult to establish, for example, their rank order of importance in accounting for Y. In this situation there's no one clear path for you to follow. In any case, I hope you are considering methods of crossvalidation.
Multicollinearity when individual regressions are significant, but VIFs are low
Do I or do I not have a multicollinearity problem? If I do, then how should I proceed? It's not an either-or situation. And I am skeptical about the "4 or 5" guideline. For each of your predictors,
Multicollinearity when individual regressions are significant, but VIFs are low Do I or do I not have a multicollinearity problem? If I do, then how should I proceed? It's not an either-or situation. And I am skeptical about the "4 or 5" guideline. For each of your predictors, the standard error of the coefficient is between 2.2 and 5.6 times as large as it would be if the predictor were uncorrelated with the others. And the portion of a given predictor that cannot be explained by the others ranges from 1/2.2 to 1/5.6, or 18% to 45%. Altogether, that seems a pretty substantial amount of collinearity. But let's step back for a minute. Are you really trying to predict *Y*, as opposed to trying to explain it? If the former, then I don't suppose you need care whether the significance level of a given variable changes when others are present in the model. Your job is really much easier than it would be if true explanation were needed. If explanation is your goal, you'll need to consider the way these variables interrelate--something that requires more than statistical information. Clearly they overlap in the way they relate to Y, and this collinearity will make it difficult to establish, for example, their rank order of importance in accounting for Y. In this situation there's no one clear path for you to follow. In any case, I hope you are considering methods of crossvalidation.
Multicollinearity when individual regressions are significant, but VIFs are low Do I or do I not have a multicollinearity problem? If I do, then how should I proceed? It's not an either-or situation. And I am skeptical about the "4 or 5" guideline. For each of your predictors,
19,447
Multicollinearity when individual regressions are significant, but VIFs are low
You have multicollinearity. Your initial analysis demonstrated that. As far as it being a problem, that's another question that seems to have many answers in your case. Maybe if you got the basic issue better it would be more obvious what to do?... With the multicollinearity your regression coefficients are about the unique (well closer to unique) contributions of each variable to your model. If some are correlated with each other then each correlated one's unique contribution is smaller. That's probably partially why none are significant when they're all there together but when used alone they can be. The first thing you likely need to do is consider what the intercorrelation among your variables means. For example, do you have a bunch of variables that just stand for the same thing? Did you just happen to measure your predictors over a poor scale and get incidental correlations? Don't try to fix the regression, try to understand your variables. Consider X1 and X2 with a very strong correlation between them, say r = 0.90. If you put X1 in the model and it's a significant predictor then another model with X2 alone will very likely be significant as well because they're almost the same thing. If you put them in the model together at least one of them has to suffer because the multiple regression is going to solve to their unique contributions. They might both be non-significant. But that's not the point, the point is recognizing why they overlap so much and if they even say anything different from one another and whether you need them or not? Maybe one expresses an idea more meaningfully and more related to your response variable than the other. Maybe you'll conclude that they're the same thing with different levels of variability. Also, when looking at models of any kind, but especially with intercorrelated predictors, p-values are a terrible way to tell if a new predictor makes a meaningful contribution (if that's what you're trying to do... not sure what you're trying to do because it sounds like you're just trying to make the regression either A) simple, or B) come out the way you want... neither of which are feasible). You're probably best off looking at AIC to help you determine which predictors you should keep and which don't contribute anything.
Multicollinearity when individual regressions are significant, but VIFs are low
You have multicollinearity. Your initial analysis demonstrated that. As far as it being a problem, that's another question that seems to have many answers in your case. Maybe if you got the basic is
Multicollinearity when individual regressions are significant, but VIFs are low You have multicollinearity. Your initial analysis demonstrated that. As far as it being a problem, that's another question that seems to have many answers in your case. Maybe if you got the basic issue better it would be more obvious what to do?... With the multicollinearity your regression coefficients are about the unique (well closer to unique) contributions of each variable to your model. If some are correlated with each other then each correlated one's unique contribution is smaller. That's probably partially why none are significant when they're all there together but when used alone they can be. The first thing you likely need to do is consider what the intercorrelation among your variables means. For example, do you have a bunch of variables that just stand for the same thing? Did you just happen to measure your predictors over a poor scale and get incidental correlations? Don't try to fix the regression, try to understand your variables. Consider X1 and X2 with a very strong correlation between them, say r = 0.90. If you put X1 in the model and it's a significant predictor then another model with X2 alone will very likely be significant as well because they're almost the same thing. If you put them in the model together at least one of them has to suffer because the multiple regression is going to solve to their unique contributions. They might both be non-significant. But that's not the point, the point is recognizing why they overlap so much and if they even say anything different from one another and whether you need them or not? Maybe one expresses an idea more meaningfully and more related to your response variable than the other. Maybe you'll conclude that they're the same thing with different levels of variability. Also, when looking at models of any kind, but especially with intercorrelated predictors, p-values are a terrible way to tell if a new predictor makes a meaningful contribution (if that's what you're trying to do... not sure what you're trying to do because it sounds like you're just trying to make the regression either A) simple, or B) come out the way you want... neither of which are feasible). You're probably best off looking at AIC to help you determine which predictors you should keep and which don't contribute anything.
Multicollinearity when individual regressions are significant, but VIFs are low You have multicollinearity. Your initial analysis demonstrated that. As far as it being a problem, that's another question that seems to have many answers in your case. Maybe if you got the basic is
19,448
Multicollinearity when individual regressions are significant, but VIFs are low
Personally, I'd use condition indexes and the variance explained table to analyze collinearity. I would also not use p values as a criterion for model building, and when comparing models with 6 IVs to models with 1, I'd look at changes in the effect size of the parameter for the variable that is both. But you can certainly have the results you mention without collinearity. Collinearity is only about the X variables and their relationship. But two variables could both relate strongly to Y while not relating strongly to each other.
Multicollinearity when individual regressions are significant, but VIFs are low
Personally, I'd use condition indexes and the variance explained table to analyze collinearity. I would also not use p values as a criterion for model building, and when comparing models with 6 IVs to
Multicollinearity when individual regressions are significant, but VIFs are low Personally, I'd use condition indexes and the variance explained table to analyze collinearity. I would also not use p values as a criterion for model building, and when comparing models with 6 IVs to models with 1, I'd look at changes in the effect size of the parameter for the variable that is both. But you can certainly have the results you mention without collinearity. Collinearity is only about the X variables and their relationship. But two variables could both relate strongly to Y while not relating strongly to each other.
Multicollinearity when individual regressions are significant, but VIFs are low Personally, I'd use condition indexes and the variance explained table to analyze collinearity. I would also not use p values as a criterion for model building, and when comparing models with 6 IVs to
19,449
Multicollinearity when individual regressions are significant, but VIFs are low
Regarding multicollinearity there are various thresholds being mentioned usually converging around a VIF of 10 corresponding to an underlying R Square value of 0.90 between the tested variable vs the other independent variables. The VIFs of your variables appear passable, and you could technically keep them in a model. Yet, I would use a stepwise regression method to see which are the best combination of variables and how much more explanation (incremental increase in R Square) you get by adding variables. The arbitrating benchmark should be the Adjusted R Square value that adjusts the R Square value downward by penalizing the model for adding variables. Your variables are somewhat correlated with each other. This is inevitable, it is just a matter of degree. Given the VIFs you mention, I suspect intuitively that you will get the vast majority of the information/explanation bit from the best 2 variable combination. And, that adding variables may add only marginal incremental value. When looking at the combination of variables that are selected by the stepwise regression process, I would also look at what variables are selected and if their regression coefficient signs are consistent with their correlation with y. If they are not, it can be due to a legitmate interaction between the variables. But, it could also be a result of model overfitting and that the regression coefficients are spurious. They reflect a mathematical fit, but are meaningless in terms of underlying causality. Another way to select your variables is to decide from a logic standpoint which ones are the main 2 or 3 variables that should be in the model. You start with those and then check how much more information do you get by adding a variable. Check the adjusted R Square, consistency of the regression coefficient relative to the original regression, and obviously test all the models with hold out period. Pretty soon, it will be evident what is your best model.
Multicollinearity when individual regressions are significant, but VIFs are low
Regarding multicollinearity there are various thresholds being mentioned usually converging around a VIF of 10 corresponding to an underlying R Square value of 0.90 between the tested variable vs the
Multicollinearity when individual regressions are significant, but VIFs are low Regarding multicollinearity there are various thresholds being mentioned usually converging around a VIF of 10 corresponding to an underlying R Square value of 0.90 between the tested variable vs the other independent variables. The VIFs of your variables appear passable, and you could technically keep them in a model. Yet, I would use a stepwise regression method to see which are the best combination of variables and how much more explanation (incremental increase in R Square) you get by adding variables. The arbitrating benchmark should be the Adjusted R Square value that adjusts the R Square value downward by penalizing the model for adding variables. Your variables are somewhat correlated with each other. This is inevitable, it is just a matter of degree. Given the VIFs you mention, I suspect intuitively that you will get the vast majority of the information/explanation bit from the best 2 variable combination. And, that adding variables may add only marginal incremental value. When looking at the combination of variables that are selected by the stepwise regression process, I would also look at what variables are selected and if their regression coefficient signs are consistent with their correlation with y. If they are not, it can be due to a legitmate interaction between the variables. But, it could also be a result of model overfitting and that the regression coefficients are spurious. They reflect a mathematical fit, but are meaningless in terms of underlying causality. Another way to select your variables is to decide from a logic standpoint which ones are the main 2 or 3 variables that should be in the model. You start with those and then check how much more information do you get by adding a variable. Check the adjusted R Square, consistency of the regression coefficient relative to the original regression, and obviously test all the models with hold out period. Pretty soon, it will be evident what is your best model.
Multicollinearity when individual regressions are significant, but VIFs are low Regarding multicollinearity there are various thresholds being mentioned usually converging around a VIF of 10 corresponding to an underlying R Square value of 0.90 between the tested variable vs the
19,450
Multicollinearity when individual regressions are significant, but VIFs are low
If your explanatory variables are count data, and it is not unreasonable to assume that they are normally distributed, you can transform them into standard normal variates using the R scale command. Doing this can reduce the collinearity. But that will probably not solve the whole problem. A useful batch of R commands for analyzing and dealing with collinearity are found on Florian Jaeger's blog, including: z. <- function (x) scale(x) r. <- function (formula, ...) rstandard(lm(formula, ...)) The z. function converts a vector into a standard normal variate. The r. function returns standardized residuals for regressing one predictor against another. You can use this to effectively divide the model deviance into different tranches so that only some variables have access to the most senior tranche, then the next tranche will be offered to residualized variables. (Sorry for my homespun terminology) So if a model of the form Y ~ A + B suffers from multicollinearity, then you can run either of Y ~ A + r.(B) Y ~ r.(A) + B so that only the residuals of the "junior tranche" variable (when regressed against the "senior tranche" variable) are fitted to the model. This way, you are shielded from multicollinearity, but have a more complicated set of parameters to report.
Multicollinearity when individual regressions are significant, but VIFs are low
If your explanatory variables are count data, and it is not unreasonable to assume that they are normally distributed, you can transform them into standard normal variates using the R scale command. D
Multicollinearity when individual regressions are significant, but VIFs are low If your explanatory variables are count data, and it is not unreasonable to assume that they are normally distributed, you can transform them into standard normal variates using the R scale command. Doing this can reduce the collinearity. But that will probably not solve the whole problem. A useful batch of R commands for analyzing and dealing with collinearity are found on Florian Jaeger's blog, including: z. <- function (x) scale(x) r. <- function (formula, ...) rstandard(lm(formula, ...)) The z. function converts a vector into a standard normal variate. The r. function returns standardized residuals for regressing one predictor against another. You can use this to effectively divide the model deviance into different tranches so that only some variables have access to the most senior tranche, then the next tranche will be offered to residualized variables. (Sorry for my homespun terminology) So if a model of the form Y ~ A + B suffers from multicollinearity, then you can run either of Y ~ A + r.(B) Y ~ r.(A) + B so that only the residuals of the "junior tranche" variable (when regressed against the "senior tranche" variable) are fitted to the model. This way, you are shielded from multicollinearity, but have a more complicated set of parameters to report.
Multicollinearity when individual regressions are significant, but VIFs are low If your explanatory variables are count data, and it is not unreasonable to assume that they are normally distributed, you can transform them into standard normal variates using the R scale command. D
19,451
Is any quantitative property of the population a "parameter"?
This question goes to the heart of what statistics is and how to to conduct a good statistical analysis. It raises many issues, some of terminology and others of theory. To clarify them, let's begin by noting the implicit context of the question and go on from there to define the key terms "parameter," "property," and "estimator." The several parts of the question are answered as they come up in the discussion. The final concluding section summarizes the key ideas. State spaces A common statistical use of "the distribution," as in "the Normal distribution with PDF proportional to $\exp(-\frac{1}{2}(x-\mu)/\sigma)^2)dx$" is actually a (serious) abuse of English, because obviously this is not one distribution: it's a whole family of distributions parameterized by the symbols $\mu$ and $\sigma$. A standard notation for this is the "state space" $\Omega$, a set of distributions. (I am simplifying a bit here for the sake of exposition and will continue to simplify as we go along, while remaining as rigorous as possible.) Its role is to delineate the possible targets of our statistical procedures: when we estimate something, we are picking out one (or sometimes more) elements of $\Omega$. Sometimes state spaces are explicitly parameterized, as in $\Omega = \{\mathcal{N}(\mu, \sigma^2)|\mu \in \mathbb{R}, \sigma \gt 0\}$. In this description there is a one-to-one correspondence between the set of tuples $\{(\mu,\sigma)\}$ in the upper half plane and the set of distributions we will be using to model our data. One value of such a parameterization is that we may now refer concretely to distributions in $\Omega$ by means of an ordered pair of real numbers. In other cases state spaces are not explicitly parameterized. An example would be the set of all unimodal continuous distributions. Below, we will address the question of whether an adequate parameterization can be found in such cases anyway. Parameterizations Generally, a parameterization of $\Omega$ is a correspondence (mathematical function) from a subset of $\mathbb{R}^d$ (with $d$ finite) to $\Omega$. That is, it uses ordered sets of $d$-tuples to label the distributions. But it's not just any correspondence: it has to be "well behaved." To understand this, consider the set of all continuous distributions whose PDFs have finite expectations. This would widely be regarded as "non-parametric" in the sense that any "natural" attempt to parameterize this set would involve a countable sequence of real numbers (using an expansion in any orthogonal basis). Nevertheless, because this set has cardinality $\aleph_1$, which is the cardinality of the reals, there must exist some one-to-one correspondence between these distributions and $\mathbb{R}$. Paradoxically, that would seem to make this a parameterized state space with a single real parameter! The paradox is resolved by noting that a single real number cannot enjoy a "nice" relationship with the distributions: when we change the value of that number, the distribution it corresponds to must in some cases change in radical ways. We rule out such "pathological" parameterizations by requiring that distributions corresponding to close values of their parameters must themselves be "close" to one another. Discussing suitable definitions of "close" would take us too far afield, but I hope this description is enough to demonstrate that there is much more to being a parameter than just naming a particular distribution. Properties of distributions Through repeated application, we become accustomed to thinking of a "property" of a distribution as some intelligible quantity that frequently appears in our work, such as its expectation, variance, and so on. The problem with this as a possible definition of "property" is that it's too vague and not sufficiently general. (This is where mathematics was in the mid-18th century, where "functions" were thought of as finite processes applied to objects.) Instead, about the only sensible definition of "property" that will always work is to think of a property as being a number that is uniquely assigned to every distribution in $\Omega$. This includes the mean, the variance, any moment, any algebraic combination of moments, any quantile, and plenty more, including things that cannot even be computed. However, it does not include things that would make no sense for some of the elements of $\Omega$. For instance, if $\Omega$ consists of all Student t distributions, then the mean is not a valid property for $\Omega$ (because $t_1$ has no mean). This impresses on us once again how much our ideas depend on what $\Omega$ really consists of. Properties are not always parameters A property can be such a complicated function that it would not serve as a parameter. Consider the case of the "Normal distribution." We might want to know whether the true distribution's mean, when rounded to the nearest integer, is even. That's a property. But it will not serve as a parameter. Parameters are not necessarily properties When parameters and distributions are in one-to-one correspondence then obviously any parameter, and any function of the parameters for that matter, is a property according to our definition. But there need not be a one-to-one correspondence between parameters and distributions: sometimes a few distributions must be described by two or more distinctly different values of the parameters. For instance, a location parameter for points on the sphere would naturally use latitude and longitude. That's fine--except at the two poles, which correspond to a given latitude and any valid longitude. The location (point on the sphere) indeed is a property but its longitude is not necessarily a property. Although there are various dodges (just declare the longitude of a pole to be zero, for instance), this issue highlights the important conceptual difference between a property (which is uniquely associated with a distribution) and a parameter (which is a way of labeling the distribution and might not be unique). Statistical procedures The target of an estimate is called an estimand. It is merely a property. The statistician is not free to select the estimand: that is the province of her client. When someone comes to you with a sample of a population and asks for you to estimate the population's 99th percentile, you would likely be remiss in supplying an estimator of the mean instead! Your job, as statistician, is to identify a good procedure for estimating the estimand you have been given. (Sometimes your job is to persuade your client that he has selected the wrong estimand for his scientific objectives, but that's a different issue...) By definition, a procedure is a way to get a number out of the data. Procedures are usually given as formulas to be applied to the data, like "add them all up and divide by their count." Literally any procedure may be pronounced an "estimator" of a given estimand. For instance, I could declare that the sample mean (a formula applied to the data) estimates the population variance (a property of the population, assuming our client has restricted the set of possible populations $\Omega$ to include only those that actually have variances). Estimators An estimator needn't have any obvious connection to the estimand. For instance, do you see any connection between the sample mean and a population variance? Neither do I. But nevertheless, the sample mean actually is a decent estimator of the population variance for certain $\Omega$ (such as the set of all Poisson distributions). Herein lies one key to understanding estimators: their qualities depend on the set of possible states $\Omega$. But that's only part of it. A competent statistician will want to know how well the procedure they are recommending will actually perform. Let's call the procedure "$t$" and let the estimand be $\theta$. Not knowing which distribution actually is the true one, she will contemplate the procedure's performance for every possible distribution $F \in \Omega$. Given such an $F$, and given any possible outcome $s$ (that is, a set of data), she will compare $t(s)$ (what her procedure estimates) to $\theta(F)$ (the value of the estimand for $F$). It is her client's responsibility to tell her how close or far apart those two are. (This is often done with a "loss" function.) She can then contemplate the expectation of the distance between $t(s)$ and $\theta(F)$. This is the risk of her procedure. Because it depends on $F$, the risk is a function defined on $\Omega$. (Good) statisticians recommend procedures based on comparing risk. For instance, suppose that for every $F \in \Omega$, the risk of procedure $t_1$ is less than or equal to the risk of $t$. Then there is no reason ever to use $t$: it is "inadmissible." Otherwise it is "admissible". (A "Bayesian" statistician will always compare risks by averaging over a "prior" distribution of possible states (usually supplied by the client). A "Frequentist" statistician might do this, if such a prior justifiably exists, but is also willing to compare risks in other ways Bayesians eschew.) Conclusions We have a right to say that any $t$ that is admissible for $\theta$ is an estimator of $\theta$. We must, for practical purposes (because admissible procedures can be hard to find), bend this to saying that any $t$ that has acceptably small risk (when being compared to $\theta$) among practicable procedures is an estimator of $\theta$. "Acceptably" and "practicable" are determined by the client, of course: "acceptably" refers to their risk and "practicable" reflects the cost (ultimately paid by them) of implementing the procedure. Underlying this concise definition are all the ideas just discussed: to understand it we must have in mind a specific $\Omega$ (which is a model of the problem, process, or population under study), a definite estimand (supplied by the client), a specific loss function (which quantitatively connects $t$ to the estimand and is also given by the client), the idea of risk (computed by the statistician), some procedure for comparing risk functions (the responsibility of the statistician in consultation with the client), and a sense of what procedures actually can be carried out (the "practicability" issue), even though none of these are explicitly mentioned in the definition.
Is any quantitative property of the population a "parameter"?
This question goes to the heart of what statistics is and how to to conduct a good statistical analysis. It raises many issues, some of terminology and others of theory. To clarify them, let's begin
Is any quantitative property of the population a "parameter"? This question goes to the heart of what statistics is and how to to conduct a good statistical analysis. It raises many issues, some of terminology and others of theory. To clarify them, let's begin by noting the implicit context of the question and go on from there to define the key terms "parameter," "property," and "estimator." The several parts of the question are answered as they come up in the discussion. The final concluding section summarizes the key ideas. State spaces A common statistical use of "the distribution," as in "the Normal distribution with PDF proportional to $\exp(-\frac{1}{2}(x-\mu)/\sigma)^2)dx$" is actually a (serious) abuse of English, because obviously this is not one distribution: it's a whole family of distributions parameterized by the symbols $\mu$ and $\sigma$. A standard notation for this is the "state space" $\Omega$, a set of distributions. (I am simplifying a bit here for the sake of exposition and will continue to simplify as we go along, while remaining as rigorous as possible.) Its role is to delineate the possible targets of our statistical procedures: when we estimate something, we are picking out one (or sometimes more) elements of $\Omega$. Sometimes state spaces are explicitly parameterized, as in $\Omega = \{\mathcal{N}(\mu, \sigma^2)|\mu \in \mathbb{R}, \sigma \gt 0\}$. In this description there is a one-to-one correspondence between the set of tuples $\{(\mu,\sigma)\}$ in the upper half plane and the set of distributions we will be using to model our data. One value of such a parameterization is that we may now refer concretely to distributions in $\Omega$ by means of an ordered pair of real numbers. In other cases state spaces are not explicitly parameterized. An example would be the set of all unimodal continuous distributions. Below, we will address the question of whether an adequate parameterization can be found in such cases anyway. Parameterizations Generally, a parameterization of $\Omega$ is a correspondence (mathematical function) from a subset of $\mathbb{R}^d$ (with $d$ finite) to $\Omega$. That is, it uses ordered sets of $d$-tuples to label the distributions. But it's not just any correspondence: it has to be "well behaved." To understand this, consider the set of all continuous distributions whose PDFs have finite expectations. This would widely be regarded as "non-parametric" in the sense that any "natural" attempt to parameterize this set would involve a countable sequence of real numbers (using an expansion in any orthogonal basis). Nevertheless, because this set has cardinality $\aleph_1$, which is the cardinality of the reals, there must exist some one-to-one correspondence between these distributions and $\mathbb{R}$. Paradoxically, that would seem to make this a parameterized state space with a single real parameter! The paradox is resolved by noting that a single real number cannot enjoy a "nice" relationship with the distributions: when we change the value of that number, the distribution it corresponds to must in some cases change in radical ways. We rule out such "pathological" parameterizations by requiring that distributions corresponding to close values of their parameters must themselves be "close" to one another. Discussing suitable definitions of "close" would take us too far afield, but I hope this description is enough to demonstrate that there is much more to being a parameter than just naming a particular distribution. Properties of distributions Through repeated application, we become accustomed to thinking of a "property" of a distribution as some intelligible quantity that frequently appears in our work, such as its expectation, variance, and so on. The problem with this as a possible definition of "property" is that it's too vague and not sufficiently general. (This is where mathematics was in the mid-18th century, where "functions" were thought of as finite processes applied to objects.) Instead, about the only sensible definition of "property" that will always work is to think of a property as being a number that is uniquely assigned to every distribution in $\Omega$. This includes the mean, the variance, any moment, any algebraic combination of moments, any quantile, and plenty more, including things that cannot even be computed. However, it does not include things that would make no sense for some of the elements of $\Omega$. For instance, if $\Omega$ consists of all Student t distributions, then the mean is not a valid property for $\Omega$ (because $t_1$ has no mean). This impresses on us once again how much our ideas depend on what $\Omega$ really consists of. Properties are not always parameters A property can be such a complicated function that it would not serve as a parameter. Consider the case of the "Normal distribution." We might want to know whether the true distribution's mean, when rounded to the nearest integer, is even. That's a property. But it will not serve as a parameter. Parameters are not necessarily properties When parameters and distributions are in one-to-one correspondence then obviously any parameter, and any function of the parameters for that matter, is a property according to our definition. But there need not be a one-to-one correspondence between parameters and distributions: sometimes a few distributions must be described by two or more distinctly different values of the parameters. For instance, a location parameter for points on the sphere would naturally use latitude and longitude. That's fine--except at the two poles, which correspond to a given latitude and any valid longitude. The location (point on the sphere) indeed is a property but its longitude is not necessarily a property. Although there are various dodges (just declare the longitude of a pole to be zero, for instance), this issue highlights the important conceptual difference between a property (which is uniquely associated with a distribution) and a parameter (which is a way of labeling the distribution and might not be unique). Statistical procedures The target of an estimate is called an estimand. It is merely a property. The statistician is not free to select the estimand: that is the province of her client. When someone comes to you with a sample of a population and asks for you to estimate the population's 99th percentile, you would likely be remiss in supplying an estimator of the mean instead! Your job, as statistician, is to identify a good procedure for estimating the estimand you have been given. (Sometimes your job is to persuade your client that he has selected the wrong estimand for his scientific objectives, but that's a different issue...) By definition, a procedure is a way to get a number out of the data. Procedures are usually given as formulas to be applied to the data, like "add them all up and divide by their count." Literally any procedure may be pronounced an "estimator" of a given estimand. For instance, I could declare that the sample mean (a formula applied to the data) estimates the population variance (a property of the population, assuming our client has restricted the set of possible populations $\Omega$ to include only those that actually have variances). Estimators An estimator needn't have any obvious connection to the estimand. For instance, do you see any connection between the sample mean and a population variance? Neither do I. But nevertheless, the sample mean actually is a decent estimator of the population variance for certain $\Omega$ (such as the set of all Poisson distributions). Herein lies one key to understanding estimators: their qualities depend on the set of possible states $\Omega$. But that's only part of it. A competent statistician will want to know how well the procedure they are recommending will actually perform. Let's call the procedure "$t$" and let the estimand be $\theta$. Not knowing which distribution actually is the true one, she will contemplate the procedure's performance for every possible distribution $F \in \Omega$. Given such an $F$, and given any possible outcome $s$ (that is, a set of data), she will compare $t(s)$ (what her procedure estimates) to $\theta(F)$ (the value of the estimand for $F$). It is her client's responsibility to tell her how close or far apart those two are. (This is often done with a "loss" function.) She can then contemplate the expectation of the distance between $t(s)$ and $\theta(F)$. This is the risk of her procedure. Because it depends on $F$, the risk is a function defined on $\Omega$. (Good) statisticians recommend procedures based on comparing risk. For instance, suppose that for every $F \in \Omega$, the risk of procedure $t_1$ is less than or equal to the risk of $t$. Then there is no reason ever to use $t$: it is "inadmissible." Otherwise it is "admissible". (A "Bayesian" statistician will always compare risks by averaging over a "prior" distribution of possible states (usually supplied by the client). A "Frequentist" statistician might do this, if such a prior justifiably exists, but is also willing to compare risks in other ways Bayesians eschew.) Conclusions We have a right to say that any $t$ that is admissible for $\theta$ is an estimator of $\theta$. We must, for practical purposes (because admissible procedures can be hard to find), bend this to saying that any $t$ that has acceptably small risk (when being compared to $\theta$) among practicable procedures is an estimator of $\theta$. "Acceptably" and "practicable" are determined by the client, of course: "acceptably" refers to their risk and "practicable" reflects the cost (ultimately paid by them) of implementing the procedure. Underlying this concise definition are all the ideas just discussed: to understand it we must have in mind a specific $\Omega$ (which is a model of the problem, process, or population under study), a definite estimand (supplied by the client), a specific loss function (which quantitatively connects $t$ to the estimand and is also given by the client), the idea of risk (computed by the statistician), some procedure for comparing risk functions (the responsibility of the statistician in consultation with the client), and a sense of what procedures actually can be carried out (the "practicability" issue), even though none of these are explicitly mentioned in the definition.
Is any quantitative property of the population a "parameter"? This question goes to the heart of what statistics is and how to to conduct a good statistical analysis. It raises many issues, some of terminology and others of theory. To clarify them, let's begin
19,452
Is any quantitative property of the population a "parameter"?
As with many questions on definitions, answers need to have an eye both on the underlying principles and on the ways terms are used in practice, which can often be at least a little loose or inconsistent, even by individuals who are well informed, and more importantly, variable from community to community. One common principle is that a statistic is a property of a sample, and a known constant, and a parameter is the corresponding property of the population, and so an unknown constant. The word "corresponding" is to be understood as quite elastic here. Incidentally, precisely this distinction and precisely this terminology are less than a century old, having being introduced by R.A. Fisher. But A set-up of sample and population doesn't characterise all our own problems. Time series are one major class of examples in which the idea is rather of an underlying generating process, and something like that is arguably the deeper and more general idea. There are set-ups in which parameters change. Again, time series analysis provides examples. To the main point here, we don't in practice think of all the properties of a population or process as parameters. If some procedure assumes a model of a normal distribution, then the minimum and maximum are not parameters. (Indeed, according to the model, the minimum and maximum are arbitrarily large negative and positive numbers any way, not that that should worry us.) I would say that for once Wikipedia is pointing in the right direction here, and practice and principle are both respected if we say that a parameter is whatever we are estimating. This helps too with other questions that have caused puzzlement. For example, if we calculate a 25% trimmed mean, what we are estimating? A reasonable answer is the corresponding property of the population, which in effect is defined by the estimation method. One terminology is that an estimator has an estimand, whatever it is estimating. Starting with some Platonic idea of a property "out there" (say the mode of a distribution) and thinking how to estimate that is reasonable, as is thinking up good recipes for analysing data and thinking through what they imply when regarded as inference. As often in applied mathematics or science, there is a twofold aspect to a parameter. We often think of it as something real out there which we are discovering, but it is also true that it is something defined by our model of the process, so that it has no meaning outside the context of the model. Two quite different points: Many scientists use the word "parameter" in the way that statisticians use variable. I have a scientist persona as well as a statistical one, and I would say that is unfortunate. Variables and properties are better words. It is remarkably common in wider English usage that parameter is thought to mean limits or bounds, which may stem from some original confusion between "parameter" and "perimeter". A note on the estimand point of view The classical position is that we identify a parameter in advance and then decide how to estimate it, and this remains majority practice, but reversing the process is not absurd and can be helpful for some problems. I call this the estimand point of view. It has been in the literature for at least 50 years. Tukey (1962, p.60) urged that "We must give even more attention to starting with an estimator and discovering what is a reasonable estimand, to discovering what is it reasonable to think of the estimator as estimating." A similar point of view has been elaborated formally in considerable detail and depth by Bickel and Lehmann (1975) and informally with considerable lucidity by Mosteller and Tukey (1977, pp.32-34). There is also an elementary version. Using (say) sample median or geometric mean to estimate the corresponding population parameter makes sense regardless of whether the underlying distribution is symmetric, and the same goodwill can be extended to (e.g.) sample trimmed means, which are regarded as estimators of their population counterparts. Bickel, P.J. and E.L. Lehmann. 1975. Descriptive statistics for nonparametric models. II. Location. Annals of Statistics 3: 1045-1069. Mosteller, F. and J.W. Tukey. 1977. Data Analysis and Regression. Reading, MA: Addison-Wesley. Tukey, J.W. 1962. The future of data analysis. Annals of Mathematical Statistics 33: 1-67.
Is any quantitative property of the population a "parameter"?
As with many questions on definitions, answers need to have an eye both on the underlying principles and on the ways terms are used in practice, which can often be at least a little loose or inconsist
Is any quantitative property of the population a "parameter"? As with many questions on definitions, answers need to have an eye both on the underlying principles and on the ways terms are used in practice, which can often be at least a little loose or inconsistent, even by individuals who are well informed, and more importantly, variable from community to community. One common principle is that a statistic is a property of a sample, and a known constant, and a parameter is the corresponding property of the population, and so an unknown constant. The word "corresponding" is to be understood as quite elastic here. Incidentally, precisely this distinction and precisely this terminology are less than a century old, having being introduced by R.A. Fisher. But A set-up of sample and population doesn't characterise all our own problems. Time series are one major class of examples in which the idea is rather of an underlying generating process, and something like that is arguably the deeper and more general idea. There are set-ups in which parameters change. Again, time series analysis provides examples. To the main point here, we don't in practice think of all the properties of a population or process as parameters. If some procedure assumes a model of a normal distribution, then the minimum and maximum are not parameters. (Indeed, according to the model, the minimum and maximum are arbitrarily large negative and positive numbers any way, not that that should worry us.) I would say that for once Wikipedia is pointing in the right direction here, and practice and principle are both respected if we say that a parameter is whatever we are estimating. This helps too with other questions that have caused puzzlement. For example, if we calculate a 25% trimmed mean, what we are estimating? A reasonable answer is the corresponding property of the population, which in effect is defined by the estimation method. One terminology is that an estimator has an estimand, whatever it is estimating. Starting with some Platonic idea of a property "out there" (say the mode of a distribution) and thinking how to estimate that is reasonable, as is thinking up good recipes for analysing data and thinking through what they imply when regarded as inference. As often in applied mathematics or science, there is a twofold aspect to a parameter. We often think of it as something real out there which we are discovering, but it is also true that it is something defined by our model of the process, so that it has no meaning outside the context of the model. Two quite different points: Many scientists use the word "parameter" in the way that statisticians use variable. I have a scientist persona as well as a statistical one, and I would say that is unfortunate. Variables and properties are better words. It is remarkably common in wider English usage that parameter is thought to mean limits or bounds, which may stem from some original confusion between "parameter" and "perimeter". A note on the estimand point of view The classical position is that we identify a parameter in advance and then decide how to estimate it, and this remains majority practice, but reversing the process is not absurd and can be helpful for some problems. I call this the estimand point of view. It has been in the literature for at least 50 years. Tukey (1962, p.60) urged that "We must give even more attention to starting with an estimator and discovering what is a reasonable estimand, to discovering what is it reasonable to think of the estimator as estimating." A similar point of view has been elaborated formally in considerable detail and depth by Bickel and Lehmann (1975) and informally with considerable lucidity by Mosteller and Tukey (1977, pp.32-34). There is also an elementary version. Using (say) sample median or geometric mean to estimate the corresponding population parameter makes sense regardless of whether the underlying distribution is symmetric, and the same goodwill can be extended to (e.g.) sample trimmed means, which are regarded as estimators of their population counterparts. Bickel, P.J. and E.L. Lehmann. 1975. Descriptive statistics for nonparametric models. II. Location. Annals of Statistics 3: 1045-1069. Mosteller, F. and J.W. Tukey. 1977. Data Analysis and Regression. Reading, MA: Addison-Wesley. Tukey, J.W. 1962. The future of data analysis. Annals of Mathematical Statistics 33: 1-67.
Is any quantitative property of the population a "parameter"? As with many questions on definitions, answers need to have an eye both on the underlying principles and on the ways terms are used in practice, which can often be at least a little loose or inconsist
19,453
Is any quantitative property of the population a "parameter"?
I tend to think of parameters by analogy by thinking about the normal distribution: $$ \text{pdf}=\frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{1}{2}\frac{(x_i-\mu)^2}{\sigma^2}} $$ What's important to recognize about this function is that, as ugly as it is, I pretty much know what most of the parts are. For example, I know what the numbers $1$ and $2$ are, what $\pi$ is ($\approx 3.1415926$) and what $e$ is ($\approx 2.718281828$); I know what it means to square something or to take the square root of something--I basically know it all. Moreover, if I wanted to know the height of the function at some specific $X$ value, $x_i$, then I obviously know that value too. In other words, once I know that the above equation is what I need to be working with, I know everything there is to know, once I learn the values for $\boldsymbol\mu$ and $\boldsymbol\sigma^2$. Those values are the parameters. Specifically they are unknown constants that control the behavior of the distribution. Thus, for instance, if I wanted to know the $X$ value that corresponded to the $25^{\text{th}}\%$, I can determine that (or anything else about that distribution), after knowing $\mu$ and $\sigma^2$ (but not the other way around). The above equation privileges $\mu$ and $\sigma^2$ in a way that it does not for any other value. Likewise, if I were working with an OLS multiple regression model, where the data generating process is assumed to be: $$ Y=\beta_0 + \beta_1X_1 + \beta_2X_2 + \varepsilon \\ \text{where } \varepsilon\sim\mathcal N(0, \sigma^2) $$ then, once I learn (in practice, estimate) the values of $\boldsymbol\beta_0$, $\boldsymbol\beta_1$, $\boldsymbol\beta_2$, and $\boldsymbol\sigma^2$, I know everything there is to know. Anything else, such as the $25^{\text{th}}\%$ of the conditional distribution of $Y$ where $X=x_i$, I can calculate based on my knowledge of $\beta_0$, $\beta_1$, $\beta_2$, and $\sigma^2$. The multiple regression model above privileges $\beta_0$, $\beta_1$, $\beta_2$, and $\sigma^2$ in a way that it does not for any other value. (All of this assumes, of course, that my model of the population distribution or data generating process is correct. It is, as always, worth bearing in mind that "all models are wrong, but some are useful" -George Box.) To answer your questions more explicitly, I would say: No, any old quantitative properly should not be labelled a "parameter". n/a The characteristics that should be labelled a "parameter" depend on the model specification. I don't have a special name for other quantitative characteristics, but I think it would be fine to call them properties or characteristics or consequences, etc.
Is any quantitative property of the population a "parameter"?
I tend to think of parameters by analogy by thinking about the normal distribution: $$ \text{pdf}=\frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{1}{2}\frac{(x_i-\mu)^2}{\sigma^2}} $$ What's important to recog
Is any quantitative property of the population a "parameter"? I tend to think of parameters by analogy by thinking about the normal distribution: $$ \text{pdf}=\frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{1}{2}\frac{(x_i-\mu)^2}{\sigma^2}} $$ What's important to recognize about this function is that, as ugly as it is, I pretty much know what most of the parts are. For example, I know what the numbers $1$ and $2$ are, what $\pi$ is ($\approx 3.1415926$) and what $e$ is ($\approx 2.718281828$); I know what it means to square something or to take the square root of something--I basically know it all. Moreover, if I wanted to know the height of the function at some specific $X$ value, $x_i$, then I obviously know that value too. In other words, once I know that the above equation is what I need to be working with, I know everything there is to know, once I learn the values for $\boldsymbol\mu$ and $\boldsymbol\sigma^2$. Those values are the parameters. Specifically they are unknown constants that control the behavior of the distribution. Thus, for instance, if I wanted to know the $X$ value that corresponded to the $25^{\text{th}}\%$, I can determine that (or anything else about that distribution), after knowing $\mu$ and $\sigma^2$ (but not the other way around). The above equation privileges $\mu$ and $\sigma^2$ in a way that it does not for any other value. Likewise, if I were working with an OLS multiple regression model, where the data generating process is assumed to be: $$ Y=\beta_0 + \beta_1X_1 + \beta_2X_2 + \varepsilon \\ \text{where } \varepsilon\sim\mathcal N(0, \sigma^2) $$ then, once I learn (in practice, estimate) the values of $\boldsymbol\beta_0$, $\boldsymbol\beta_1$, $\boldsymbol\beta_2$, and $\boldsymbol\sigma^2$, I know everything there is to know. Anything else, such as the $25^{\text{th}}\%$ of the conditional distribution of $Y$ where $X=x_i$, I can calculate based on my knowledge of $\beta_0$, $\beta_1$, $\beta_2$, and $\sigma^2$. The multiple regression model above privileges $\beta_0$, $\beta_1$, $\beta_2$, and $\sigma^2$ in a way that it does not for any other value. (All of this assumes, of course, that my model of the population distribution or data generating process is correct. It is, as always, worth bearing in mind that "all models are wrong, but some are useful" -George Box.) To answer your questions more explicitly, I would say: No, any old quantitative properly should not be labelled a "parameter". n/a The characteristics that should be labelled a "parameter" depend on the model specification. I don't have a special name for other quantitative characteristics, but I think it would be fine to call them properties or characteristics or consequences, etc.
Is any quantitative property of the population a "parameter"? I tend to think of parameters by analogy by thinking about the normal distribution: $$ \text{pdf}=\frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{1}{2}\frac{(x_i-\mu)^2}{\sigma^2}} $$ What's important to recog
19,454
Is any quantitative property of the population a "parameter"?
There have been some great answers to this question, I just thought I'd summarise an interesting reference that provides a fairly rigorous discussion of estimators. The virtual laboratories page on estimators defines a statistic as "an observable function of the outcome variable". "in the technical sense, a parameter $\theta$ is a function of the distribution of X" The concept of a function of a distribution is a very general idea. Thus, every example provided above could be seen as a function of a certain distribution. Every quantile, including the min, median, 25th quantile, the max can be a function of a distribution. Skewness is a function of a distribution. If that population distribution is normal, then these will be zero, but that does not stop the calculation of these values. Counting the number of correlations greater than a certain value is a function of the covariance matrix which in turn is a function of a multivariate distribution. R-squared is a function of the distribution.
Is any quantitative property of the population a "parameter"?
There have been some great answers to this question, I just thought I'd summarise an interesting reference that provides a fairly rigorous discussion of estimators. The virtual laboratories page on es
Is any quantitative property of the population a "parameter"? There have been some great answers to this question, I just thought I'd summarise an interesting reference that provides a fairly rigorous discussion of estimators. The virtual laboratories page on estimators defines a statistic as "an observable function of the outcome variable". "in the technical sense, a parameter $\theta$ is a function of the distribution of X" The concept of a function of a distribution is a very general idea. Thus, every example provided above could be seen as a function of a certain distribution. Every quantile, including the min, median, 25th quantile, the max can be a function of a distribution. Skewness is a function of a distribution. If that population distribution is normal, then these will be zero, but that does not stop the calculation of these values. Counting the number of correlations greater than a certain value is a function of the covariance matrix which in turn is a function of a multivariate distribution. R-squared is a function of the distribution.
Is any quantitative property of the population a "parameter"? There have been some great answers to this question, I just thought I'd summarise an interesting reference that provides a fairly rigorous discussion of estimators. The virtual laboratories page on es
19,455
Recommendation for a book about recommender systems
An 800+ page definitive guide from the top experts in the field (pricey though): Recommender Systems Handbook. Each chapter is written by different folks (one could try googling specific chapters - some of them are freely available on the web)
Recommendation for a book about recommender systems
An 800+ page definitive guide from the top experts in the field (pricey though): Recommender Systems Handbook. Each chapter is written by different folks (one could try googling specific chapters - so
Recommendation for a book about recommender systems An 800+ page definitive guide from the top experts in the field (pricey though): Recommender Systems Handbook. Each chapter is written by different folks (one could try googling specific chapters - some of them are freely available on the web)
Recommendation for a book about recommender systems An 800+ page definitive guide from the top experts in the field (pricey though): Recommender Systems Handbook. Each chapter is written by different folks (one could try googling specific chapters - so
19,456
Recommendation for a book about recommender systems
For a very basic introduction you could check out chapter 2 of Programming Collective Intelligence.
Recommendation for a book about recommender systems
For a very basic introduction you could check out chapter 2 of Programming Collective Intelligence.
Recommendation for a book about recommender systems For a very basic introduction you could check out chapter 2 of Programming Collective Intelligence.
Recommendation for a book about recommender systems For a very basic introduction you could check out chapter 2 of Programming Collective Intelligence.
19,457
Recommendation for a book about recommender systems
An introductory book would be this one here. He describes several algorithms for recommender systems in a simple addition to having several references if you'd like to know more about a technique especifismo. Besides this, here is this other kind of a collection of articles.
Recommendation for a book about recommender systems
An introductory book would be this one here. He describes several algorithms for recommender systems in a simple addition to having several references if you'd like to know more about a technique espe
Recommendation for a book about recommender systems An introductory book would be this one here. He describes several algorithms for recommender systems in a simple addition to having several references if you'd like to know more about a technique especifismo. Besides this, here is this other kind of a collection of articles.
Recommendation for a book about recommender systems An introductory book would be this one here. He describes several algorithms for recommender systems in a simple addition to having several references if you'd like to know more about a technique espe
19,458
Recommendation for a book about recommender systems
It's not a book and it's not organized, but it contains many algorithms, links, code and paper references: http://www.netflixprize.com/community/forum.html . You may download all the data as tarball.
Recommendation for a book about recommender systems
It's not a book and it's not organized, but it contains many algorithms, links, code and paper references: http://www.netflixprize.com/community/forum.html . You may download all the data as tarball.
Recommendation for a book about recommender systems It's not a book and it's not organized, but it contains many algorithms, links, code and paper references: http://www.netflixprize.com/community/forum.html . You may download all the data as tarball.
Recommendation for a book about recommender systems It's not a book and it's not organized, but it contains many algorithms, links, code and paper references: http://www.netflixprize.com/community/forum.html . You may download all the data as tarball.
19,459
Recommendation for a book about recommender systems
I wrote a monograph about the Netflix Prize and recommender systems: "Predicting movie ratings and recommender systems"
Recommendation for a book about recommender systems
I wrote a monograph about the Netflix Prize and recommender systems: "Predicting movie ratings and recommender systems"
Recommendation for a book about recommender systems I wrote a monograph about the Netflix Prize and recommender systems: "Predicting movie ratings and recommender systems"
Recommendation for a book about recommender systems I wrote a monograph about the Netflix Prize and recommender systems: "Predicting movie ratings and recommender systems"
19,460
Recommendation for a book about recommender systems
Here are some of the books and Research Publications on Recommendation Systems Free & downloadable (Good introduction on Collaborative Filtering Recommendation) http://md.ekstrandom.net/research/pubs/cf-survey/ Other books are - Recommender Systems - Introduction Recommender Systems - Handbook
Recommendation for a book about recommender systems
Here are some of the books and Research Publications on Recommendation Systems Free & downloadable (Good introduction on Collaborative Filtering Recommendation) http://md.ekstrandom.net/research/pubs/
Recommendation for a book about recommender systems Here are some of the books and Research Publications on Recommendation Systems Free & downloadable (Good introduction on Collaborative Filtering Recommendation) http://md.ekstrandom.net/research/pubs/cf-survey/ Other books are - Recommender Systems - Introduction Recommender Systems - Handbook
Recommendation for a book about recommender systems Here are some of the books and Research Publications on Recommendation Systems Free & downloadable (Good introduction on Collaborative Filtering Recommendation) http://md.ekstrandom.net/research/pubs/
19,461
Recommendation for a book about recommender systems
The books mentioned here are amazing in-depth that catch you up to most recent research in the field. I wrote a chapter in Data Mining Applications with R that gets you up and running to the point of writing and testing your own recommendation algorithms quickly. This is not as in depth as the other books and is only a starter template. You will still need to read these books and papers in the field to learn more about the topic. Good luck
Recommendation for a book about recommender systems
The books mentioned here are amazing in-depth that catch you up to most recent research in the field. I wrote a chapter in Data Mining Applications with R that gets you up and running to the point of
Recommendation for a book about recommender systems The books mentioned here are amazing in-depth that catch you up to most recent research in the field. I wrote a chapter in Data Mining Applications with R that gets you up and running to the point of writing and testing your own recommendation algorithms quickly. This is not as in depth as the other books and is only a starter template. You will still need to read these books and papers in the field to learn more about the topic. Good luck
Recommendation for a book about recommender systems The books mentioned here are amazing in-depth that catch you up to most recent research in the field. I wrote a chapter in Data Mining Applications with R that gets you up and running to the point of
19,462
Bias towards natural numbers in the case of least squares
This question is quite old but I actually have an answer that doesn't appear here, and one that gives a compelling reason why (under some reasonable assumptions) squared error is correct, while any other power is incorrect. Say we have some data $D = \langle(\mathbf{x}_1,y_1),(\mathbf{x}_2,y_2),...,(\mathbf{x}_n,y_n)\rangle$ and want to find the linear (or whatever) function $f$ that best predicts the data, in the sense that the probability density $p_f(D)$ for observing this data should be maximal with regard to $f$ (this is called the maximum likelihood estimation). If we assume that the data are given by $f$ plus a normally distributed error term with standard deviation $\sigma$, then $$p_f(D) = \prod_{i=1}^{n} \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(y_i - f(\mathbf{x}_i))^2}{2\sigma^2}}.$$ This is equivalent to $$\frac{1}{\sigma^n(2\pi)^{n/2}}e^{-\frac{1}{2\sigma^2}\sum_{i=1}^{n} (y_i - f(\mathbf{x}_i))^2}.$$ So maximizing $p_f(D)$ is accomplished by minimizing $\sum_{i=1}^{n} (y_i - f(\mathbf{x}_i))^2$, that is, the sum of the squared error terms.
Bias towards natural numbers in the case of least squares
This question is quite old but I actually have an answer that doesn't appear here, and one that gives a compelling reason why (under some reasonable assumptions) squared error is correct, while any ot
Bias towards natural numbers in the case of least squares This question is quite old but I actually have an answer that doesn't appear here, and one that gives a compelling reason why (under some reasonable assumptions) squared error is correct, while any other power is incorrect. Say we have some data $D = \langle(\mathbf{x}_1,y_1),(\mathbf{x}_2,y_2),...,(\mathbf{x}_n,y_n)\rangle$ and want to find the linear (or whatever) function $f$ that best predicts the data, in the sense that the probability density $p_f(D)$ for observing this data should be maximal with regard to $f$ (this is called the maximum likelihood estimation). If we assume that the data are given by $f$ plus a normally distributed error term with standard deviation $\sigma$, then $$p_f(D) = \prod_{i=1}^{n} \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(y_i - f(\mathbf{x}_i))^2}{2\sigma^2}}.$$ This is equivalent to $$\frac{1}{\sigma^n(2\pi)^{n/2}}e^{-\frac{1}{2\sigma^2}\sum_{i=1}^{n} (y_i - f(\mathbf{x}_i))^2}.$$ So maximizing $p_f(D)$ is accomplished by minimizing $\sum_{i=1}^{n} (y_i - f(\mathbf{x}_i))^2$, that is, the sum of the squared error terms.
Bias towards natural numbers in the case of least squares This question is quite old but I actually have an answer that doesn't appear here, and one that gives a compelling reason why (under some reasonable assumptions) squared error is correct, while any ot
19,463
Bias towards natural numbers in the case of least squares
There's no reason you couldn't try to minimize norms other than x^2, there have been entire books written on quantile regression, for instance, which is more or less minimizing |x| if you're working with the median. It's just generally harder to do and, depending on the error model, may not give good estimators (depending on whether that means low-variance or unbiased or low MSE estimators in the context). As for why we prefer integer moments over real-number-valued moments, the main reason is likely that while integer powers of real numbers always result in real numbers, non-integer powers of negative real numbers create complex numbers, thus requiring the use of an absolute value. In other words, while the 3rd moment of a real-valued random variable is real, the 3.2nd moment is not necessarily real, and so causes interpretation problems. Other than that... Analytical expressions for the integer moments of random variables are typically much easier to find than real-valued moments, be it by generating functions or some other method. Methods to minimize them are thus easier to write. The use of integer moments leads to expressions that are more tractable than real-valued moments. I can't think of a compelling reason that (for instance) the 1.95th moment of the absolute value of X would provide better fitting properties than (for instance) the 2nd moment of X, although that could be interesting to investigate Specific to the L2 norm (or squared error), it can be written via dot products, which can lead to vast improvements in speed of computation. It's also the only Lp space that's a Hilbert space, which is a nice feature to have.
Bias towards natural numbers in the case of least squares
There's no reason you couldn't try to minimize norms other than x^2, there have been entire books written on quantile regression, for instance, which is more or less minimizing |x| if you're working w
Bias towards natural numbers in the case of least squares There's no reason you couldn't try to minimize norms other than x^2, there have been entire books written on quantile regression, for instance, which is more or less minimizing |x| if you're working with the median. It's just generally harder to do and, depending on the error model, may not give good estimators (depending on whether that means low-variance or unbiased or low MSE estimators in the context). As for why we prefer integer moments over real-number-valued moments, the main reason is likely that while integer powers of real numbers always result in real numbers, non-integer powers of negative real numbers create complex numbers, thus requiring the use of an absolute value. In other words, while the 3rd moment of a real-valued random variable is real, the 3.2nd moment is not necessarily real, and so causes interpretation problems. Other than that... Analytical expressions for the integer moments of random variables are typically much easier to find than real-valued moments, be it by generating functions or some other method. Methods to minimize them are thus easier to write. The use of integer moments leads to expressions that are more tractable than real-valued moments. I can't think of a compelling reason that (for instance) the 1.95th moment of the absolute value of X would provide better fitting properties than (for instance) the 2nd moment of X, although that could be interesting to investigate Specific to the L2 norm (or squared error), it can be written via dot products, which can lead to vast improvements in speed of computation. It's also the only Lp space that's a Hilbert space, which is a nice feature to have.
Bias towards natural numbers in the case of least squares There's no reason you couldn't try to minimize norms other than x^2, there have been entire books written on quantile regression, for instance, which is more or less minimizing |x| if you're working w
19,464
Bias towards natural numbers in the case of least squares
In ordinary least squares, the solution to (A'A)^(-1) x = A'b minimizes squared error loss, and is the maximum likelihood solution. So, largely because the math was easy in this historic case. But generally people minimize many different loss functions, such as exponential, logistic, cauchy, laplace, huber, etc. These more exotic loss functions generally require a lot of computational resources, and don't have closed form solutions (in general), so they're only starting to become more popular now.
Bias towards natural numbers in the case of least squares
In ordinary least squares, the solution to (A'A)^(-1) x = A'b minimizes squared error loss, and is the maximum likelihood solution. So, largely because the math was easy in this historic case. But gen
Bias towards natural numbers in the case of least squares In ordinary least squares, the solution to (A'A)^(-1) x = A'b minimizes squared error loss, and is the maximum likelihood solution. So, largely because the math was easy in this historic case. But generally people minimize many different loss functions, such as exponential, logistic, cauchy, laplace, huber, etc. These more exotic loss functions generally require a lot of computational resources, and don't have closed form solutions (in general), so they're only starting to become more popular now.
Bias towards natural numbers in the case of least squares In ordinary least squares, the solution to (A'A)^(-1) x = A'b minimizes squared error loss, and is the maximum likelihood solution. So, largely because the math was easy in this historic case. But gen
19,465
Bias towards natural numbers in the case of least squares
We try to minimize the variance that is left within descriptors. Why variance? Read this question; this also comes together with the (mostly silent) assumption that errors are normally distributed. Extension: Two additional arguments: For variances, we have this nice "law" that the sum of variances is equal to the variance of sum, for uncorrelated samples. If we assume that the error is not correlated with the case, minimizing residual of squares will work straightforward to maximizing explained variance, what is maybe a not-so-good but still popular quality measure. If we assume normality of an error, least squares error estimator is a maximal likelihood one.
Bias towards natural numbers in the case of least squares
We try to minimize the variance that is left within descriptors. Why variance? Read this question; this also comes together with the (mostly silent) assumption that errors are normally distributed. Ex
Bias towards natural numbers in the case of least squares We try to minimize the variance that is left within descriptors. Why variance? Read this question; this also comes together with the (mostly silent) assumption that errors are normally distributed. Extension: Two additional arguments: For variances, we have this nice "law" that the sum of variances is equal to the variance of sum, for uncorrelated samples. If we assume that the error is not correlated with the case, minimizing residual of squares will work straightforward to maximizing explained variance, what is maybe a not-so-good but still popular quality measure. If we assume normality of an error, least squares error estimator is a maximal likelihood one.
Bias towards natural numbers in the case of least squares We try to minimize the variance that is left within descriptors. Why variance? Read this question; this also comes together with the (mostly silent) assumption that errors are normally distributed. Ex
19,466
Bias towards natural numbers in the case of least squares
My understanding is that because we are trying to minimise errors, we need to find a way of not getting ourselves in a situation where the sum of the negative difference in errors is equal to the sum of the positive difference in errors but we haven't found a good fit. We do this by squaring the sum of the difference in errors which means the negative and positive difference in errors both become positive ($-1\times-1 = 1$). If we raised $x$ to the power of anything other than a positive integer we wouldn't address this problem because the errors would not have the same sign, or if we raised to the power of something that isn't an integer we'd enter the realms of complex numbers.
Bias towards natural numbers in the case of least squares
My understanding is that because we are trying to minimise errors, we need to find a way of not getting ourselves in a situation where the sum of the negative difference in errors is equal to the sum
Bias towards natural numbers in the case of least squares My understanding is that because we are trying to minimise errors, we need to find a way of not getting ourselves in a situation where the sum of the negative difference in errors is equal to the sum of the positive difference in errors but we haven't found a good fit. We do this by squaring the sum of the difference in errors which means the negative and positive difference in errors both become positive ($-1\times-1 = 1$). If we raised $x$ to the power of anything other than a positive integer we wouldn't address this problem because the errors would not have the same sign, or if we raised to the power of something that isn't an integer we'd enter the realms of complex numbers.
Bias towards natural numbers in the case of least squares My understanding is that because we are trying to minimise errors, we need to find a way of not getting ourselves in a situation where the sum of the negative difference in errors is equal to the sum
19,467
Is 95% specific to the confidence interval in any way?
Is this wording incorrect? It seems to be saying that the true value has a 95% chance of being in that specific confidence interval. You have to keep in mind that, in frequentist statistics, the parameter you are estimating (in your case $\beta_i$, the true value of the coefficient) is not considered as a random variable, but as a fixed real number. That means it is not correct to say something like "$\beta_i$ is in the interval $[a,b]$ with $95\%$ probability", because $\beta_i$ is not a random variable and therefore does not have a probability distribution. The probability of $\beta_i$ being in the interval is either $100\%$ (if the fixed value $\beta_i\in[a,b]$) or $0\%$ (if the fixed value $\beta_i\notin[a,b]$) That is why "95% confidence interval means there is a 95% chance that the true parameter falls in this range" is a misconception. On the other hand, the limits of the confidence interval themselves are random variables, since they are calculated from the sample data. That means it is correct to say "in 95% of all possible samples, $\beta_i$ is in the 95% confidence interval". It does not mean that $\beta_i$ has $95\%$ chance of being inside a particular interval, it means that the confidence interval, which is different for each sample, has $95\%$ probability of falling around $\beta_i$. Notice that the confidence interval will contain $\beta_i$ with 95% probability before the data is sampled. After it is sampled, the confidence intervals edges will be just two fixed numbers, not random variables anymore and the same rationale from the first paragraph applies. I think the following image offers a nice visualization to this idea: Therefore, the wording used there is actually correct. Aside from using 95% to get the 1.96 Z-score, how else is the 95% manifested in this confidence interval? The 1.96 Z-score is the only place where the 95% shows up. If you change it for the Z-score corresponding to, say, 85%, you would have the formula 85% confidence interval.
Is 95% specific to the confidence interval in any way?
Is this wording incorrect? It seems to be saying that the true value has a 95% chance of being in that specific confidence interval. You have to keep in mind that, in frequentist statistics, the para
Is 95% specific to the confidence interval in any way? Is this wording incorrect? It seems to be saying that the true value has a 95% chance of being in that specific confidence interval. You have to keep in mind that, in frequentist statistics, the parameter you are estimating (in your case $\beta_i$, the true value of the coefficient) is not considered as a random variable, but as a fixed real number. That means it is not correct to say something like "$\beta_i$ is in the interval $[a,b]$ with $95\%$ probability", because $\beta_i$ is not a random variable and therefore does not have a probability distribution. The probability of $\beta_i$ being in the interval is either $100\%$ (if the fixed value $\beta_i\in[a,b]$) or $0\%$ (if the fixed value $\beta_i\notin[a,b]$) That is why "95% confidence interval means there is a 95% chance that the true parameter falls in this range" is a misconception. On the other hand, the limits of the confidence interval themselves are random variables, since they are calculated from the sample data. That means it is correct to say "in 95% of all possible samples, $\beta_i$ is in the 95% confidence interval". It does not mean that $\beta_i$ has $95\%$ chance of being inside a particular interval, it means that the confidence interval, which is different for each sample, has $95\%$ probability of falling around $\beta_i$. Notice that the confidence interval will contain $\beta_i$ with 95% probability before the data is sampled. After it is sampled, the confidence intervals edges will be just two fixed numbers, not random variables anymore and the same rationale from the first paragraph applies. I think the following image offers a nice visualization to this idea: Therefore, the wording used there is actually correct. Aside from using 95% to get the 1.96 Z-score, how else is the 95% manifested in this confidence interval? The 1.96 Z-score is the only place where the 95% shows up. If you change it for the Z-score corresponding to, say, 85%, you would have the formula 85% confidence interval.
Is 95% specific to the confidence interval in any way? Is this wording incorrect? It seems to be saying that the true value has a 95% chance of being in that specific confidence interval. You have to keep in mind that, in frequentist statistics, the para
19,468
Is 95% specific to the confidence interval in any way?
Perhaps if you rephrase to: "Imagine you repeat your sampling under the exact same conditions indefinitely. For each draw you calculate a parameter estimate and its standard error in order to calculate a 95% confidence interval [formula in your figure]. Then this 95% confidence interval will capture the true population parameter in 95% of the time if all assumptions are met and the null hypothesis is true." Would that make more sense? As for you second question, consider the standard normal distribution below. The total area under the curve equals to 1. If you consider the significance level to be 5% and split this up between each tail (red areas), then you are left with 95% in the middle. If the null hypothesis is true then this is the area in which you would not reject the null hypothesis as any Z-score that falls in that area is plausible under the null hypothesis. Only if your Z-score falls into the red areas, you reject the null hypothesis, since your sample provides significant evidence against the null hypothesis, or in other words you likely made a discovery - hooray :D Now by multiplying the critical Z-score of +/-1.96 (in case of 95% confidence) with the standard error of the sample you are translating this 95% interval back onto the original measurement scale. So each confidence interval corresponds to a hypothesis test on your measurement scale as suggested in the last sentence on your image.
Is 95% specific to the confidence interval in any way?
Perhaps if you rephrase to: "Imagine you repeat your sampling under the exact same conditions indefinitely. For each draw you calculate a parameter estimate and its standard error in order to calculat
Is 95% specific to the confidence interval in any way? Perhaps if you rephrase to: "Imagine you repeat your sampling under the exact same conditions indefinitely. For each draw you calculate a parameter estimate and its standard error in order to calculate a 95% confidence interval [formula in your figure]. Then this 95% confidence interval will capture the true population parameter in 95% of the time if all assumptions are met and the null hypothesis is true." Would that make more sense? As for you second question, consider the standard normal distribution below. The total area under the curve equals to 1. If you consider the significance level to be 5% and split this up between each tail (red areas), then you are left with 95% in the middle. If the null hypothesis is true then this is the area in which you would not reject the null hypothesis as any Z-score that falls in that area is plausible under the null hypothesis. Only if your Z-score falls into the red areas, you reject the null hypothesis, since your sample provides significant evidence against the null hypothesis, or in other words you likely made a discovery - hooray :D Now by multiplying the critical Z-score of +/-1.96 (in case of 95% confidence) with the standard error of the sample you are translating this 95% interval back onto the original measurement scale. So each confidence interval corresponds to a hypothesis test on your measurement scale as suggested in the last sentence on your image.
Is 95% specific to the confidence interval in any way? Perhaps if you rephrase to: "Imagine you repeat your sampling under the exact same conditions indefinitely. For each draw you calculate a parameter estimate and its standard error in order to calculat
19,469
Is 95% specific to the confidence interval in any way?
95% conf.int. means there is only a 5% chance that actual empirical value falls out of this interval. In other words, 5% chance of false positive if (and when) you treat that range as ground truth.
Is 95% specific to the confidence interval in any way?
95% conf.int. means there is only a 5% chance that actual empirical value falls out of this interval. In other words, 5% chance of false positive if (and when) you treat that range as ground truth.
Is 95% specific to the confidence interval in any way? 95% conf.int. means there is only a 5% chance that actual empirical value falls out of this interval. In other words, 5% chance of false positive if (and when) you treat that range as ground truth.
Is 95% specific to the confidence interval in any way? 95% conf.int. means there is only a 5% chance that actual empirical value falls out of this interval. In other words, 5% chance of false positive if (and when) you treat that range as ground truth.
19,470
Is 95% specific to the confidence interval in any way?
My second question is, say you have one of these 95 confidence intervals. Aside from using 95% to get the 1.96 Z-score, how else is the 95% manifested in this confidence interval? The 95% is manifested in the following way Probability statement: "95% confidence interval means there is a 95% chance that the true parameter falls in this range" There are misconceptions about this statement, but the statement itselve is not a misconception. Whether or not the probability statement is true depends on how you condition the probability. It depends on the interpretation of what is meant by probability/chance. You can express this probability 'the interval containing the true parameter' conditional on the observation but also conditional on the true parameter. So yes, the probability statement is wrong if the probability is wrongly interpreted. But no, the probability statement is not wrong if the probability is correctly interpreted. Example from https://stats.stackexchange.com/a/481937/ and https://stats.stackexchange.com/a/444020/ Say we measure $X$ in order to determine/estimate $\theta$ $$X \sim N(\theta,1) \quad \text{where} \quad \theta \sim N(0,\tau^2)$$ Here $\theta$ follows a distribution as well. (You can imagine for instance that $\theta$ is some measure of intelligence which differs from person to person where $N(0,\tau^2)$ is the distribution of $\theta$ among all persons. And $X$ is the result from some intelligence test). Below is a simulation of 20k cases. In the image we draw lines for the borders of a 95% confidence interval (red) and a 95% credible interval (green) as a function of the observation $X$. (For more details about the computation of those borders see the reference) We can consider 'the probability of an interval containing the true parameter' as conditional on the observation $X$ or conditional on the true parameter $\theta$. We have plotted the two different interpretations for both type of intervals. Only in the right one (conditional on $X$), the probability statement about the confidence interval is false. . Practical situation that explains the relevance of this view: Say in the above example, which could be about an intelligence test, we have done the test in order to select people with high intelligence, and we have a sub sample of people that tested with a specific range of test observation $X$ (e.g. we selected candidates with a high intelligence for some job). Now we may wonder for how many of these people their 95% confidence interval contains the true parameter.... well, it won't be 95% because the confidence interval does not contain the parameter in 95% of the cases when we condition on a particular observation (or range of observations). Misconceptions about the misconception It is often mentioned that the probability statement is not true because after the observation the statement is either 100% true or 0% true. The parameter is either in or outside the interval and it can not be both. But we do not know which of the two cases it is, and we express a probability for our data-based certainty/uncertainty about it (based on some assumptions). (Note that this argument about 'the probability statement being false' would work for any type of interval, but somehow because the confidence interval relates to a frequentist interpretation of probability the probability statement is disallowed.) It is perfectly fine to speak about the probability that 'the parameter is within some interval' (Or if you feel uncomfortable with this expression then you can turn it around and say, the probability that 'the interval is around the parameter') Even if the parameter would be a constant, the interval is not a constant (but a random variable), thus it is fine to make probability statements about relations between the two. (and if this argument is still not comfortable then one could also adopt a propensity probability interpretation instead of a frequentist interpretation of probability, a frequentist interpretation is not necessary for confidence intervals) Example: from an urn with 10 red and 10 blue balls you 'randomly' pick a ball without looking at it. Then you could say that you have 50% probability to have picked red and 50% to have picked blue. Even though in the (unknown) reality it is either 100% blue or 100% red and not really a random pick but a deterministic process. Pedantic notes The interval that contains the true value $\beta_i$ in 95% of all samples is given by the expression... Is this wording correct? It is not the interval. There will be multiple intervals with the same property. More specifically it is an interval that contains the true value $\beta_i$ in 95% of all samples independent from the true value of $\beta_i$
Is 95% specific to the confidence interval in any way?
My second question is, say you have one of these 95 confidence intervals. Aside from using 95% to get the 1.96 Z-score, how else is the 95% manifested in this confidence interval? The 95% is manifest
Is 95% specific to the confidence interval in any way? My second question is, say you have one of these 95 confidence intervals. Aside from using 95% to get the 1.96 Z-score, how else is the 95% manifested in this confidence interval? The 95% is manifested in the following way Probability statement: "95% confidence interval means there is a 95% chance that the true parameter falls in this range" There are misconceptions about this statement, but the statement itselve is not a misconception. Whether or not the probability statement is true depends on how you condition the probability. It depends on the interpretation of what is meant by probability/chance. You can express this probability 'the interval containing the true parameter' conditional on the observation but also conditional on the true parameter. So yes, the probability statement is wrong if the probability is wrongly interpreted. But no, the probability statement is not wrong if the probability is correctly interpreted. Example from https://stats.stackexchange.com/a/481937/ and https://stats.stackexchange.com/a/444020/ Say we measure $X$ in order to determine/estimate $\theta$ $$X \sim N(\theta,1) \quad \text{where} \quad \theta \sim N(0,\tau^2)$$ Here $\theta$ follows a distribution as well. (You can imagine for instance that $\theta$ is some measure of intelligence which differs from person to person where $N(0,\tau^2)$ is the distribution of $\theta$ among all persons. And $X$ is the result from some intelligence test). Below is a simulation of 20k cases. In the image we draw lines for the borders of a 95% confidence interval (red) and a 95% credible interval (green) as a function of the observation $X$. (For more details about the computation of those borders see the reference) We can consider 'the probability of an interval containing the true parameter' as conditional on the observation $X$ or conditional on the true parameter $\theta$. We have plotted the two different interpretations for both type of intervals. Only in the right one (conditional on $X$), the probability statement about the confidence interval is false. . Practical situation that explains the relevance of this view: Say in the above example, which could be about an intelligence test, we have done the test in order to select people with high intelligence, and we have a sub sample of people that tested with a specific range of test observation $X$ (e.g. we selected candidates with a high intelligence for some job). Now we may wonder for how many of these people their 95% confidence interval contains the true parameter.... well, it won't be 95% because the confidence interval does not contain the parameter in 95% of the cases when we condition on a particular observation (or range of observations). Misconceptions about the misconception It is often mentioned that the probability statement is not true because after the observation the statement is either 100% true or 0% true. The parameter is either in or outside the interval and it can not be both. But we do not know which of the two cases it is, and we express a probability for our data-based certainty/uncertainty about it (based on some assumptions). (Note that this argument about 'the probability statement being false' would work for any type of interval, but somehow because the confidence interval relates to a frequentist interpretation of probability the probability statement is disallowed.) It is perfectly fine to speak about the probability that 'the parameter is within some interval' (Or if you feel uncomfortable with this expression then you can turn it around and say, the probability that 'the interval is around the parameter') Even if the parameter would be a constant, the interval is not a constant (but a random variable), thus it is fine to make probability statements about relations between the two. (and if this argument is still not comfortable then one could also adopt a propensity probability interpretation instead of a frequentist interpretation of probability, a frequentist interpretation is not necessary for confidence intervals) Example: from an urn with 10 red and 10 blue balls you 'randomly' pick a ball without looking at it. Then you could say that you have 50% probability to have picked red and 50% to have picked blue. Even though in the (unknown) reality it is either 100% blue or 100% red and not really a random pick but a deterministic process. Pedantic notes The interval that contains the true value $\beta_i$ in 95% of all samples is given by the expression... Is this wording correct? It is not the interval. There will be multiple intervals with the same property. More specifically it is an interval that contains the true value $\beta_i$ in 95% of all samples independent from the true value of $\beta_i$
Is 95% specific to the confidence interval in any way? My second question is, say you have one of these 95 confidence intervals. Aside from using 95% to get the 1.96 Z-score, how else is the 95% manifested in this confidence interval? The 95% is manifest
19,471
When is logistic regression suitable?
The resources you consider to be "wasted" are, in fact, information gains provided by logistic regression. You started out with the wrong premise. Logistic regression is not a classifier. It is a probability/risk estimator. Unlike SVM, it allows for and expects "close calls". It will lead to optimum decision making because it does not try to trick the predictive signal into incorporating a utility function that is implicit whenever you classify observations. The goal of logistic regression using maximum likelihood estimation is to provide optimum estimates of Prob$(Y=1|X)$. The result is used in many ways, e.g. lift curves, credit risk scoring, etc. See Nate Silver's book Signal and the Noise for compelling arguments in favor of probabilistic reasoning. Note that the dependent variable $Y$ in logistic regression can be coded any way you want: 0/1, A/B, yes/no, etc. The primary assumption of logistic regression is that $Y$ is truly binary, e.g. it was not contrived from an underlying ordinal or continuous response variable. It, like classification methods, is for truly all-or-nothing phenomena. Some analysts think that logistic regression assumes linearity of predictor effects on the log odds scale. That was only true when DR Cox invented the logistic model in 1958 at a time when computing wasn't available to extend the model using tools such as regression splines. The only real weakness in logistic regression is that you need to specify which interactions you want to allow in the model. For most datasets this is turned into a strength because the additive main effects are generally much stronger predictors than interactions, and machine learning methods that give equal priority to interactions can be unstable, hard to interpret, and require larger sample sizes than logistic regression to predict well.
When is logistic regression suitable?
The resources you consider to be "wasted" are, in fact, information gains provided by logistic regression. You started out with the wrong premise. Logistic regression is not a classifier. It is a p
When is logistic regression suitable? The resources you consider to be "wasted" are, in fact, information gains provided by logistic regression. You started out with the wrong premise. Logistic regression is not a classifier. It is a probability/risk estimator. Unlike SVM, it allows for and expects "close calls". It will lead to optimum decision making because it does not try to trick the predictive signal into incorporating a utility function that is implicit whenever you classify observations. The goal of logistic regression using maximum likelihood estimation is to provide optimum estimates of Prob$(Y=1|X)$. The result is used in many ways, e.g. lift curves, credit risk scoring, etc. See Nate Silver's book Signal and the Noise for compelling arguments in favor of probabilistic reasoning. Note that the dependent variable $Y$ in logistic regression can be coded any way you want: 0/1, A/B, yes/no, etc. The primary assumption of logistic regression is that $Y$ is truly binary, e.g. it was not contrived from an underlying ordinal or continuous response variable. It, like classification methods, is for truly all-or-nothing phenomena. Some analysts think that logistic regression assumes linearity of predictor effects on the log odds scale. That was only true when DR Cox invented the logistic model in 1958 at a time when computing wasn't available to extend the model using tools such as regression splines. The only real weakness in logistic regression is that you need to specify which interactions you want to allow in the model. For most datasets this is turned into a strength because the additive main effects are generally much stronger predictors than interactions, and machine learning methods that give equal priority to interactions can be unstable, hard to interpret, and require larger sample sizes than logistic regression to predict well.
When is logistic regression suitable? The resources you consider to be "wasted" are, in fact, information gains provided by logistic regression. You started out with the wrong premise. Logistic regression is not a classifier. It is a p
19,472
When is logistic regression suitable?
You are right, oftentimes logistic regression does poorly as a classifier (especially when compared to other algorithms). However, this doesn't mean logistic regression should be forgotten and never studied as it has two big advantages: Probabilistic results. Frank Harrell (+1) explained this very well in his answer. It allows us to understand the impact an independent variable has on the dependent variable while controlling for other independent variables. For example, it provides estimates and standard errors for conditional odds ratios (how many times larger are the odds of $Y=1$ when $X_1 = 1$ instead of $2$ while holding $X_2,...X_p$ constant).
When is logistic regression suitable?
You are right, oftentimes logistic regression does poorly as a classifier (especially when compared to other algorithms). However, this doesn't mean logistic regression should be forgotten and never s
When is logistic regression suitable? You are right, oftentimes logistic regression does poorly as a classifier (especially when compared to other algorithms). However, this doesn't mean logistic regression should be forgotten and never studied as it has two big advantages: Probabilistic results. Frank Harrell (+1) explained this very well in his answer. It allows us to understand the impact an independent variable has on the dependent variable while controlling for other independent variables. For example, it provides estimates and standard errors for conditional odds ratios (how many times larger are the odds of $Y=1$ when $X_1 = 1$ instead of $2$ while holding $X_2,...X_p$ constant).
When is logistic regression suitable? You are right, oftentimes logistic regression does poorly as a classifier (especially when compared to other algorithms). However, this doesn't mean logistic regression should be forgotten and never s
19,473
Deduce variance from boxplot
Not without a lot of strict assumptions, no. If you were to assume the answer was yes (instead of asking, for which I applaud you), I bet I could fool you with this (counter)example: set.seed(1);boxplot(rnorm(10000),c(-3,-2.65,rep((-2:2)*.674,5),2.65,3)) Looks pretty similar, right? Yet $\sigma^2_1=1,\sigma^2_2=1.96$! In case it's not clear from the code, population 2 is: -3.000 -2.650 -1.348 -0.674 0.000 0.674 1.348 -1.348 -0.674 0.000 0.674 1.348 -1.348 -0.674 0.000 0.674 1.348 -1.348 -0.674 0.000 0.674 1.348 -1.348 -0.674 0.000 0.674 1.348 2.650 3.000 And no, you cannot deduce that this population is normal just because it's exactly symmetrical. Here's a Q-Q plot of population 2: Sure doesn't look normal to me. Edit – Response to your comment: Variance is a numeric statistic. If two distributions' variances are literally equal, that's pretty much all you have to say about that. If two distributions are exactly normal, again, there's a mathematical definition they'll both fit. If two distributions are not exactly normal or equal in variance, you shouldn't say otherwise. If you want to say they're approximately equal or normal, you should probably define "approximate enough" in a way that's tailored to your purposes, which you haven't specified here. Sensitivity to distributional differences varies widely across the analyses that usually motivate questions like yours. For example, a parametric $t$-test assumes normal distributions with equal variance (though it's fairly robust to violations of the latter given equal sample sizes), so I wouldn't recommend that test for comparing my population 2 to population 1 (the normal distribution).
Deduce variance from boxplot
Not without a lot of strict assumptions, no. If you were to assume the answer was yes (instead of asking, for which I applaud you), I bet I could fool you with this (counter)example: set.seed(1);box
Deduce variance from boxplot Not without a lot of strict assumptions, no. If you were to assume the answer was yes (instead of asking, for which I applaud you), I bet I could fool you with this (counter)example: set.seed(1);boxplot(rnorm(10000),c(-3,-2.65,rep((-2:2)*.674,5),2.65,3)) Looks pretty similar, right? Yet $\sigma^2_1=1,\sigma^2_2=1.96$! In case it's not clear from the code, population 2 is: -3.000 -2.650 -1.348 -0.674 0.000 0.674 1.348 -1.348 -0.674 0.000 0.674 1.348 -1.348 -0.674 0.000 0.674 1.348 -1.348 -0.674 0.000 0.674 1.348 -1.348 -0.674 0.000 0.674 1.348 2.650 3.000 And no, you cannot deduce that this population is normal just because it's exactly symmetrical. Here's a Q-Q plot of population 2: Sure doesn't look normal to me. Edit – Response to your comment: Variance is a numeric statistic. If two distributions' variances are literally equal, that's pretty much all you have to say about that. If two distributions are exactly normal, again, there's a mathematical definition they'll both fit. If two distributions are not exactly normal or equal in variance, you shouldn't say otherwise. If you want to say they're approximately equal or normal, you should probably define "approximate enough" in a way that's tailored to your purposes, which you haven't specified here. Sensitivity to distributional differences varies widely across the analyses that usually motivate questions like yours. For example, a parametric $t$-test assumes normal distributions with equal variance (though it's fairly robust to violations of the latter given equal sample sizes), so I wouldn't recommend that test for comparing my population 2 to population 1 (the normal distribution).
Deduce variance from boxplot Not without a lot of strict assumptions, no. If you were to assume the answer was yes (instead of asking, for which I applaud you), I bet I could fool you with this (counter)example: set.seed(1);box
19,474
Deduce variance from boxplot
This has been well answered. These extra comments are a little too long (UPDATE: now a lot too long) to go as comments. Strictly, all you can read off a boxplot about the variability of a distribution are its interquartile range (the length or height of the box) and range (the length or height between the extremes of the display). As an approximation, box plots that seem identical are likely to have very similar variances, but watch out. Box plots with very different box positions or tails (or both) are most unlikely to have similar variances, but it's not impossible. But even if box plots look identical, you get no information in a plain or vanilla box plot about variability within the box or indeed variability within the whiskers (the lines often shown between the box and the data points within 1.5 IQR of the nearer quartile). N.B. several variants of box plots exist; authors are often poor at documenting the precise rules used by their software. The popularity of the box plot has its price. Box plots can be very useful for showing the gross features of many groups or variables (say 20 or 30, sometimes even more). As commonly used for comparing say 2 or 3 groups they are oversold, in my view, as other plots can show much more detail intelligibly in the same space. Naturally, this is widely if not universally appreciated, and various enhancements of the box plot show more detail. Serious work with variances requires access to original data. This is broad brush, and more details could be added. For example, the position of the median within the box sometimes gives a little more information. UPDATE I guess that many more people are interested in the uses (and limitations) of box plots in general than in the specific question of inferring variance from a box plot (to which the short answer is "You can't, except indirectly, approximately, and sometimes"), so I will add yet further comments on alternatives, as prompted by @Christian Sauer. Histograms used sensibly are often still competitive. The modern classic introductory text by Freedman, Pisani and Purves uses them throughout. What are various known as dot or strip plots (charts) (and by many other names) are easy to understand. Identical points can be stacked, after binning if desired. You can add median and quartiles, or mean and confidence intervals, to your heart's content. Quantile plots are, it seems, an acquired taste but in several ways most versatile of all. I include here plots of ordered values again cumulative probability (plotting position) as well as quantile plots that would be straight if the data were any "brand-name" distribution being considered (normal, exponential, gamma, whatever). (Acknowledgments to @Scortchi for the reference to "brand-name" as used by C.J. Geyer.) But a comprehensive list is not possible. (I'll add, for example, that very occasionally, a stem-and-leaf representation is exactly right to see important detail in data, as when digit preference is rampant.) The key principle is that the best kinds of distribution plot allow the seemingly impossible, perception of fine structure in data that could be interesting or important (modality, granularity, outliers, etc.) as well as coarse structure (level, spread, skewness, etc.). Box plots are not equally good at showing all kinds of structure. They cannot be, and were not intended to be. It is worth flagging that J.W. Tukey in Exploratory data analysis Reading, MA: Addison-Wesley (1977) gave an example of bimodal data from Rayleigh which a box plot obscures the main structure completely. As a great statistician, he was well aware that box plots were not always the answer. A bizarre practice, widespread in introductory texts, is discussing ANOVA while inviting readers to look at box plots, which show medians and quartiles, not means and variances (rather SDs). Naturally, looking at the data is much better than not looking, but even so, a more appropriate graphical representation is arguably some plot of the raw data with fitted means +/- some appropriate multiple of SE.
Deduce variance from boxplot
This has been well answered. These extra comments are a little too long (UPDATE: now a lot too long) to go as comments. Strictly, all you can read off a boxplot about the variability of a distributio
Deduce variance from boxplot This has been well answered. These extra comments are a little too long (UPDATE: now a lot too long) to go as comments. Strictly, all you can read off a boxplot about the variability of a distribution are its interquartile range (the length or height of the box) and range (the length or height between the extremes of the display). As an approximation, box plots that seem identical are likely to have very similar variances, but watch out. Box plots with very different box positions or tails (or both) are most unlikely to have similar variances, but it's not impossible. But even if box plots look identical, you get no information in a plain or vanilla box plot about variability within the box or indeed variability within the whiskers (the lines often shown between the box and the data points within 1.5 IQR of the nearer quartile). N.B. several variants of box plots exist; authors are often poor at documenting the precise rules used by their software. The popularity of the box plot has its price. Box plots can be very useful for showing the gross features of many groups or variables (say 20 or 30, sometimes even more). As commonly used for comparing say 2 or 3 groups they are oversold, in my view, as other plots can show much more detail intelligibly in the same space. Naturally, this is widely if not universally appreciated, and various enhancements of the box plot show more detail. Serious work with variances requires access to original data. This is broad brush, and more details could be added. For example, the position of the median within the box sometimes gives a little more information. UPDATE I guess that many more people are interested in the uses (and limitations) of box plots in general than in the specific question of inferring variance from a box plot (to which the short answer is "You can't, except indirectly, approximately, and sometimes"), so I will add yet further comments on alternatives, as prompted by @Christian Sauer. Histograms used sensibly are often still competitive. The modern classic introductory text by Freedman, Pisani and Purves uses them throughout. What are various known as dot or strip plots (charts) (and by many other names) are easy to understand. Identical points can be stacked, after binning if desired. You can add median and quartiles, or mean and confidence intervals, to your heart's content. Quantile plots are, it seems, an acquired taste but in several ways most versatile of all. I include here plots of ordered values again cumulative probability (plotting position) as well as quantile plots that would be straight if the data were any "brand-name" distribution being considered (normal, exponential, gamma, whatever). (Acknowledgments to @Scortchi for the reference to "brand-name" as used by C.J. Geyer.) But a comprehensive list is not possible. (I'll add, for example, that very occasionally, a stem-and-leaf representation is exactly right to see important detail in data, as when digit preference is rampant.) The key principle is that the best kinds of distribution plot allow the seemingly impossible, perception of fine structure in data that could be interesting or important (modality, granularity, outliers, etc.) as well as coarse structure (level, spread, skewness, etc.). Box plots are not equally good at showing all kinds of structure. They cannot be, and were not intended to be. It is worth flagging that J.W. Tukey in Exploratory data analysis Reading, MA: Addison-Wesley (1977) gave an example of bimodal data from Rayleigh which a box plot obscures the main structure completely. As a great statistician, he was well aware that box plots were not always the answer. A bizarre practice, widespread in introductory texts, is discussing ANOVA while inviting readers to look at box plots, which show medians and quartiles, not means and variances (rather SDs). Naturally, looking at the data is much better than not looking, but even so, a more appropriate graphical representation is arguably some plot of the raw data with fitted means +/- some appropriate multiple of SE.
Deduce variance from boxplot This has been well answered. These extra comments are a little too long (UPDATE: now a lot too long) to go as comments. Strictly, all you can read off a boxplot about the variability of a distributio
19,475
Deduce variance from boxplot
A naive approach: In a Normal distribution, the 25% and 75% quantiles are located at $0.67\cdot\sigma$ distance from the center. That gives that the 50% centered density covers twice this distance ($1.35\cdot \sigma$). In a boxplot, the intequartile Range (IQR, the distance from the bottom of the box to the top) covers the 50% centered amount of sample. If you make the assumption that your population follows a Normal distribution (which sometimes is a BIG assumption to do, not so trivial), then the standard deviation of your population could be roughly estimated from the equation $IQR=1.35\cdot\sigma$, that is $\sigma=0.74\cdot IQR$. And about comparing variances by boxplot: wider boxes mean bigger variances, but that gives you exploratory understanding, and you have to take into account also whiskers and outliers. For confirmation you should use hypothesis contrast.
Deduce variance from boxplot
A naive approach: In a Normal distribution, the 25% and 75% quantiles are located at $0.67\cdot\sigma$ distance from the center. That gives that the 50% centered density covers twice this distance ($1
Deduce variance from boxplot A naive approach: In a Normal distribution, the 25% and 75% quantiles are located at $0.67\cdot\sigma$ distance from the center. That gives that the 50% centered density covers twice this distance ($1.35\cdot \sigma$). In a boxplot, the intequartile Range (IQR, the distance from the bottom of the box to the top) covers the 50% centered amount of sample. If you make the assumption that your population follows a Normal distribution (which sometimes is a BIG assumption to do, not so trivial), then the standard deviation of your population could be roughly estimated from the equation $IQR=1.35\cdot\sigma$, that is $\sigma=0.74\cdot IQR$. And about comparing variances by boxplot: wider boxes mean bigger variances, but that gives you exploratory understanding, and you have to take into account also whiskers and outliers. For confirmation you should use hypothesis contrast.
Deduce variance from boxplot A naive approach: In a Normal distribution, the 25% and 75% quantiles are located at $0.67\cdot\sigma$ distance from the center. That gives that the 50% centered density covers twice this distance ($1
19,476
Is it appropriate to plot the mean in a histogram?
Of course, why not? Here's an example (one of dozens I found with a simple google search): (Image source is is the measuring usability blog, here.) I've seen means, means plus or minus a standard deviation, various quantiles (like median, quartiles, 10th and 90th percentiles) all displayed in various ways. Instead of drawing a line right across the plot, you might mark information along the bottom of it - like so: There's an example (one of many to be found) with a boxplot across the top instead of at the bottom, here. Sometimes people mark in the data: (I have jittered the data locations slightly because the values were rounded to integers and you couldn't see the relative density well.) There's an example of this kind, done in Stata, on this page (see the third one here) Histograms are better with a little extra information - they can be misleading on their own You just need to take care to explain what your plot consists of! (You'd want a better title and x-axis label than I used here, for starters. Plus an explanation in a figure caption explaining what you had marked on it.) -- One last plot: -- My plots are generated in R. Edit: As @gung surmised, abline(v=mean... was used to draw the mean-line across the plot and rug was used to draw the data values (though I actually used rug(jitter(... because the data was rounded to integers). Here's a way to do the boxplot in between the histogram and the axis: hist(Davis2[,2],n=30) boxplot(Davis2[,2], add=TRUE,horizontal=TRUE,at=-0.75,border="darkred",boxwex=1.5,outline=FALSE) I'm not going to list what everything there is for, but you can check the arguments in the help (?boxplot) to find out what they're for, and play with them yourself. However, it's not a general solution - I don't guarantee it will always work as well as it does here (note I already changed the at and boxwex options*). If you don't write an intelligent function to take care of everything, it's necessary to pay attention to what everything does to make sure it's doing what you want. Here's how to create the data I used (I was trying to show how Theil regression was really able to handle several influential outliers). It just happened to be data I was playing with when I first answered this question. library("car") add <- data.frame(sex=c("F","F"), weight=c(150,130),height=c(NA,NA),repwt=c(55,50),repht=c(NA,NA)) Davis2 <- rbind(Davis,add) * -- an appropriate value for at is around -0.5 times the value of boxwex; that would be a good default if you write a function to do it; boxwex would need to be scaled in a way that relates to the y-scale (height) of the boxplot; I'd suggest 0.04 to 0.05 times the upper y-limit might often be okay. Code for the marginal stripchart: hist(Davis2[,2],n=30) stripchart(jitter(Davis2[,2],amount=.5), method="jitter",jitter=.5,pch=16,cex=.05,add=TRUE,at=-.75,col='purple3')
Is it appropriate to plot the mean in a histogram?
Of course, why not? Here's an example (one of dozens I found with a simple google search): (Image source is is the measuring usability blog, here.) I've seen means, means plus or minus a standard d
Is it appropriate to plot the mean in a histogram? Of course, why not? Here's an example (one of dozens I found with a simple google search): (Image source is is the measuring usability blog, here.) I've seen means, means plus or minus a standard deviation, various quantiles (like median, quartiles, 10th and 90th percentiles) all displayed in various ways. Instead of drawing a line right across the plot, you might mark information along the bottom of it - like so: There's an example (one of many to be found) with a boxplot across the top instead of at the bottom, here. Sometimes people mark in the data: (I have jittered the data locations slightly because the values were rounded to integers and you couldn't see the relative density well.) There's an example of this kind, done in Stata, on this page (see the third one here) Histograms are better with a little extra information - they can be misleading on their own You just need to take care to explain what your plot consists of! (You'd want a better title and x-axis label than I used here, for starters. Plus an explanation in a figure caption explaining what you had marked on it.) -- One last plot: -- My plots are generated in R. Edit: As @gung surmised, abline(v=mean... was used to draw the mean-line across the plot and rug was used to draw the data values (though I actually used rug(jitter(... because the data was rounded to integers). Here's a way to do the boxplot in between the histogram and the axis: hist(Davis2[,2],n=30) boxplot(Davis2[,2], add=TRUE,horizontal=TRUE,at=-0.75,border="darkred",boxwex=1.5,outline=FALSE) I'm not going to list what everything there is for, but you can check the arguments in the help (?boxplot) to find out what they're for, and play with them yourself. However, it's not a general solution - I don't guarantee it will always work as well as it does here (note I already changed the at and boxwex options*). If you don't write an intelligent function to take care of everything, it's necessary to pay attention to what everything does to make sure it's doing what you want. Here's how to create the data I used (I was trying to show how Theil regression was really able to handle several influential outliers). It just happened to be data I was playing with when I first answered this question. library("car") add <- data.frame(sex=c("F","F"), weight=c(150,130),height=c(NA,NA),repwt=c(55,50),repht=c(NA,NA)) Davis2 <- rbind(Davis,add) * -- an appropriate value for at is around -0.5 times the value of boxwex; that would be a good default if you write a function to do it; boxwex would need to be scaled in a way that relates to the y-scale (height) of the boxplot; I'd suggest 0.04 to 0.05 times the upper y-limit might often be okay. Code for the marginal stripchart: hist(Davis2[,2],n=30) stripchart(jitter(Davis2[,2],amount=.5), method="jitter",jitter=.5,pch=16,cex=.05,add=TRUE,at=-.75,col='purple3')
Is it appropriate to plot the mean in a histogram? Of course, why not? Here's an example (one of dozens I found with a simple google search): (Image source is is the measuring usability blog, here.) I've seen means, means plus or minus a standard d
19,477
Is it appropriate to plot the mean in a histogram?
Of course you can. Just be sure to clearly label/indicate what the line means, and avoid making the plot too 'busy'. Nothing is worse than a graph that conveys too much information to be easily understandable. The table is an often overlooked way to display summary statistics in a clear, concise matter.
Is it appropriate to plot the mean in a histogram?
Of course you can. Just be sure to clearly label/indicate what the line means, and avoid making the plot too 'busy'. Nothing is worse than a graph that conveys too much information to be easily unders
Is it appropriate to plot the mean in a histogram? Of course you can. Just be sure to clearly label/indicate what the line means, and avoid making the plot too 'busy'. Nothing is worse than a graph that conveys too much information to be easily understandable. The table is an often overlooked way to display summary statistics in a clear, concise matter.
Is it appropriate to plot the mean in a histogram? Of course you can. Just be sure to clearly label/indicate what the line means, and avoid making the plot too 'busy'. Nothing is worse than a graph that conveys too much information to be easily unders
19,478
Is it appropriate to plot the mean in a histogram?
Previous answers make excellent points, but here is one fundamental to be added. The mean is the centre of gravity of a distribution and so the pivot point of a histogram. It is where the distribution would balance. So, there is a reciprocal relation: not only can the mean help you think about a histogram, so also can a histogram help you think about the mean. This is even perhaps more helpful when a distribution is skewed and the mean of the distribution is not necessarily in the middle.
Is it appropriate to plot the mean in a histogram?
Previous answers make excellent points, but here is one fundamental to be added. The mean is the centre of gravity of a distribution and so the pivot point of a histogram. It is where the distributio
Is it appropriate to plot the mean in a histogram? Previous answers make excellent points, but here is one fundamental to be added. The mean is the centre of gravity of a distribution and so the pivot point of a histogram. It is where the distribution would balance. So, there is a reciprocal relation: not only can the mean help you think about a histogram, so also can a histogram help you think about the mean. This is even perhaps more helpful when a distribution is skewed and the mean of the distribution is not necessarily in the middle.
Is it appropriate to plot the mean in a histogram? Previous answers make excellent points, but here is one fundamental to be added. The mean is the centre of gravity of a distribution and so the pivot point of a histogram. It is where the distributio
19,479
Is it appropriate to plot the mean in a histogram?
I see no problem with it, see this, this, and this as examples.
Is it appropriate to plot the mean in a histogram?
I see no problem with it, see this, this, and this as examples.
Is it appropriate to plot the mean in a histogram? I see no problem with it, see this, this, and this as examples.
Is it appropriate to plot the mean in a histogram? I see no problem with it, see this, this, and this as examples.
19,480
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
I'll start with a quote for context and to point to a helpful resource that might have an answer for the OP. It's from V. Amrhein, S. Greenland, and B. McShane. Scientists rise up against statistical significance. Nature, 567:305–307, 2019. https://doi.org/10.1038/d41586-019-00857-9 We must learn to embrace uncertainty. I understand it to mean that there is no need to state that we reject a hypothesis, accept a hypothesis, or don't reject a hypothesis to explain what we've learned from a statistical analysis. The accept/reject language implies certainty; statistics is better at quantifying uncertainty. Note: I assume the question refers to making a binary reject/accept choice dictated by the significance (P ≤ 0.05) or non-significance (P > 0.05) of a p-value P. The simplest way to understand hypothesis testing (NHST) — at least for me — is to keep in mind that p-values are probabilities about the data (not about the null and alternative hypotheses): Large p-value means that the data is consistent with the null hypothesis, small p-value means that the data is inconsistent with the null hypothesis. NHST doesn't tell us what hypothesis to reject and/or accept so that we have 100% certainty in our decision: hypothesis testing doesn't prove anything٭. The reason is that a p-value is computed by assuming the null hypothesis is true [3]. So rather than wondering if, on calculating P ≤ 0.05, it's correct to declare that you "reject the null hypothesis" (technically correct) or "accept the alternative hypothesis" (technically incorrect), don't make a reject/don't reject determination but report what you've learned from the data: report the p-value or, better yet, your estimate of the quantity of interest and its standard error or confidence interval. ٭ Probability ≠ proof. For illustration, see this story about a small p-value at CERN leading scientists to announce they might have discovered a brand new force of nature: New physics at the Large Hadron Collider? Scientists are excited, but it’s too soon to be sure. Includes a bonus explanation of p-values. References [1] S. Goodman. A dirty dozen: Twelve p-value misconceptions. Seminars in Hematology, 45(3):135–140, 2008. https://doi.org/10.1053/j.seminhematol.2008.04.003 All twelve misconceptions are important to study, understand and avoid. But Misconception #12 is particularly relevant to this question: It's not the case that A scientific conclusion or treatment policy should be based on whether or not the P value is significant. Steven Goodman explains: "This misconception (...) is equivalent to saying that the magnitude of effect is not relevant, that only evidence relevant to a scientific conclusion is in the experiment at hand, and that both beliefs and actions flow directly from the statistical results." [2] Using p-values to test a hypothesis in Improving Your Statistical Inferences by Daniël Lakens. This is my favorite explanation of p-values, their history, theory and misapplications. Has lots of examples from the social sciences. [3] What is the meaning of p values and t values in statistical tests?
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
I'll start with a quote for context and to point to a helpful resource that might have an answer for the OP. It's from V. Amrhein, S. Greenland, and B. McShane. Scientists rise up against statistical
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? I'll start with a quote for context and to point to a helpful resource that might have an answer for the OP. It's from V. Amrhein, S. Greenland, and B. McShane. Scientists rise up against statistical significance. Nature, 567:305–307, 2019. https://doi.org/10.1038/d41586-019-00857-9 We must learn to embrace uncertainty. I understand it to mean that there is no need to state that we reject a hypothesis, accept a hypothesis, or don't reject a hypothesis to explain what we've learned from a statistical analysis. The accept/reject language implies certainty; statistics is better at quantifying uncertainty. Note: I assume the question refers to making a binary reject/accept choice dictated by the significance (P ≤ 0.05) or non-significance (P > 0.05) of a p-value P. The simplest way to understand hypothesis testing (NHST) — at least for me — is to keep in mind that p-values are probabilities about the data (not about the null and alternative hypotheses): Large p-value means that the data is consistent with the null hypothesis, small p-value means that the data is inconsistent with the null hypothesis. NHST doesn't tell us what hypothesis to reject and/or accept so that we have 100% certainty in our decision: hypothesis testing doesn't prove anything٭. The reason is that a p-value is computed by assuming the null hypothesis is true [3]. So rather than wondering if, on calculating P ≤ 0.05, it's correct to declare that you "reject the null hypothesis" (technically correct) or "accept the alternative hypothesis" (technically incorrect), don't make a reject/don't reject determination but report what you've learned from the data: report the p-value or, better yet, your estimate of the quantity of interest and its standard error or confidence interval. ٭ Probability ≠ proof. For illustration, see this story about a small p-value at CERN leading scientists to announce they might have discovered a brand new force of nature: New physics at the Large Hadron Collider? Scientists are excited, but it’s too soon to be sure. Includes a bonus explanation of p-values. References [1] S. Goodman. A dirty dozen: Twelve p-value misconceptions. Seminars in Hematology, 45(3):135–140, 2008. https://doi.org/10.1053/j.seminhematol.2008.04.003 All twelve misconceptions are important to study, understand and avoid. But Misconception #12 is particularly relevant to this question: It's not the case that A scientific conclusion or treatment policy should be based on whether or not the P value is significant. Steven Goodman explains: "This misconception (...) is equivalent to saying that the magnitude of effect is not relevant, that only evidence relevant to a scientific conclusion is in the experiment at hand, and that both beliefs and actions flow directly from the statistical results." [2] Using p-values to test a hypothesis in Improving Your Statistical Inferences by Daniël Lakens. This is my favorite explanation of p-values, their history, theory and misapplications. Has lots of examples from the social sciences. [3] What is the meaning of p values and t values in statistical tests?
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? I'll start with a quote for context and to point to a helpful resource that might have an answer for the OP. It's from V. Amrhein, S. Greenland, and B. McShane. Scientists rise up against statistical
19,481
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
In addition to the answers given by highly experienced users here, I'd like to offer a less formal and hopefully more intuitive view. Briefly, the "null hypothesis" is considered accepted, unless there is some compelling evidence to reject it in favour of an alternative. It helps to look at it from the decision-making perspective. Tests---not only statistical---help us make decisions. Before performing the test, we have one course of action. After performing the test, we may either keep the course or change it, depending on the test result. The null hypothesis is the default course of action, given no or not enough information. For example, imagine you are a flying an aeroplane. Without a reason to do otherwise, you'll probably fly it straight towards your destination. But, the whole time you'd be performing "tests", like checking your radar whether there is some unexpected obstacle on your path. If the radar shows no obstacle, you'll keep your course. This is the default decision, which you'd most likely make even if you had to fly without a radar. I mean, what else could you do? Wildly zigzag through the sky? In this analogy, the null hypothesis is that there is no reason to change the course. You don't "accept" it as a result of the test, because it has already been accepted before you took a look at the radar. Only if you discover an obstacle, you'd reject it in favour of changing the course. Or, as a more real-world example, imagine developing a new drug for a disease. The default status, before you perform any trials at all, is that the drug is not approved. You may run in vitro, in vivo, and clinical trials to prove that your drug is safe and helpful. If that fails, the drug remains "not approved". Again, there is nothing to "accept", or at least nothing with practical consequences. Only with compelling evidence of the drug's usefulness its status can change to "approved". As you can see from the examples, which hypothesis is treated as "null" is somewhat subjective. For example, is "homeopathy works" null, or does it need evidence to be accepted? That depends on your prior beliefs and experience. If you grew up in a homeopathic home, you are likely to consider it to work by default and would't change your mind unless you see strong evidence against it (or maybe ever). But, this can get arbitrarily philosophical / psychological.
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
In addition to the answers given by highly experienced users here, I'd like to offer a less formal and hopefully more intuitive view. Briefly, the "null hypothesis" is considered accepted, unless ther
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? In addition to the answers given by highly experienced users here, I'd like to offer a less formal and hopefully more intuitive view. Briefly, the "null hypothesis" is considered accepted, unless there is some compelling evidence to reject it in favour of an alternative. It helps to look at it from the decision-making perspective. Tests---not only statistical---help us make decisions. Before performing the test, we have one course of action. After performing the test, we may either keep the course or change it, depending on the test result. The null hypothesis is the default course of action, given no or not enough information. For example, imagine you are a flying an aeroplane. Without a reason to do otherwise, you'll probably fly it straight towards your destination. But, the whole time you'd be performing "tests", like checking your radar whether there is some unexpected obstacle on your path. If the radar shows no obstacle, you'll keep your course. This is the default decision, which you'd most likely make even if you had to fly without a radar. I mean, what else could you do? Wildly zigzag through the sky? In this analogy, the null hypothesis is that there is no reason to change the course. You don't "accept" it as a result of the test, because it has already been accepted before you took a look at the radar. Only if you discover an obstacle, you'd reject it in favour of changing the course. Or, as a more real-world example, imagine developing a new drug for a disease. The default status, before you perform any trials at all, is that the drug is not approved. You may run in vitro, in vivo, and clinical trials to prove that your drug is safe and helpful. If that fails, the drug remains "not approved". Again, there is nothing to "accept", or at least nothing with practical consequences. Only with compelling evidence of the drug's usefulness its status can change to "approved". As you can see from the examples, which hypothesis is treated as "null" is somewhat subjective. For example, is "homeopathy works" null, or does it need evidence to be accepted? That depends on your prior beliefs and experience. If you grew up in a homeopathic home, you are likely to consider it to work by default and would't change your mind unless you see strong evidence against it (or maybe ever). But, this can get arbitrarily philosophical / psychological.
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? In addition to the answers given by highly experienced users here, I'd like to offer a less formal and hopefully more intuitive view. Briefly, the "null hypothesis" is considered accepted, unless ther
19,482
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
Say you have the hypothesis "on stackexchange there is not yet an answer to my question" When you randomly sample 1000 questions then you might find zero answers. Based on this, can you 'accept' the null hypothesis? You can read about this among many older questions and answers, for instance: Why do statisticians say a non-significant result means "you can't reject the null" as opposed to accepting the null hypothesis? Why do we need alternative hypothesis? Is it possible to accept the alternative hypothesis? Also check out the questions about two one-sided tests (TOST) which is about formulating the statement behind a null hypothesis in a way such that it can be a statement that you can potentially 'accept'. More seriously, a problem with the question is that it is unclear. What does 'accept' actually mean? And also, it is a loaded question. It asks for something that is not true. Like 'why is it that the earth is flat, but the moon is round?'. There is no 'acceptance' of an alternative theory. Or at least, when we 'accept' some alternative hypothesis then either: Hypothesis testing: the alternative theory is extremely broad and reads as 'something else than the null hypothesis is true'. Whatever this 'something else' means, that is left open. There is no 'acceptance' of a particular theory. See also: https://en.m.wikipedia.org/wiki/Falsifiability Expression of significance: or 'acceptance' means that we observed an effect, and consider it as a 'significant' effect. There is no literal 'acceptance' of some theory/hypothesis here. There is just the consideration that we found that the data shows there is some effect and it is significantly different from a case when to there would be zero effect. Whether this means that the alternative theory should be accepted, that is not explicitly stated and should also not be assumed implicitly. The alternative hypothesis (related to the effect) works for the present data, but that is different from being accepted, (it just has not been rejected yet).
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
Say you have the hypothesis "on stackexchange there is not yet an answer to my question" When you randomly sample 1000 questions then you might find zero answers. Based on this, can you 'accept' the
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? Say you have the hypothesis "on stackexchange there is not yet an answer to my question" When you randomly sample 1000 questions then you might find zero answers. Based on this, can you 'accept' the null hypothesis? You can read about this among many older questions and answers, for instance: Why do statisticians say a non-significant result means "you can't reject the null" as opposed to accepting the null hypothesis? Why do we need alternative hypothesis? Is it possible to accept the alternative hypothesis? Also check out the questions about two one-sided tests (TOST) which is about formulating the statement behind a null hypothesis in a way such that it can be a statement that you can potentially 'accept'. More seriously, a problem with the question is that it is unclear. What does 'accept' actually mean? And also, it is a loaded question. It asks for something that is not true. Like 'why is it that the earth is flat, but the moon is round?'. There is no 'acceptance' of an alternative theory. Or at least, when we 'accept' some alternative hypothesis then either: Hypothesis testing: the alternative theory is extremely broad and reads as 'something else than the null hypothesis is true'. Whatever this 'something else' means, that is left open. There is no 'acceptance' of a particular theory. See also: https://en.m.wikipedia.org/wiki/Falsifiability Expression of significance: or 'acceptance' means that we observed an effect, and consider it as a 'significant' effect. There is no literal 'acceptance' of some theory/hypothesis here. There is just the consideration that we found that the data shows there is some effect and it is significantly different from a case when to there would be zero effect. Whether this means that the alternative theory should be accepted, that is not explicitly stated and should also not be assumed implicitly. The alternative hypothesis (related to the effect) works for the present data, but that is different from being accepted, (it just has not been rejected yet).
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? Say you have the hypothesis "on stackexchange there is not yet an answer to my question" When you randomly sample 1000 questions then you might find zero answers. Based on this, can you 'accept' the
19,483
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
We should not accept the research/alternative hypothesis. The main value of a null hypothesis statistical test is to help the researcher adopt a degree of self-skepticism about their research hypothesis. The null hypothesis is the hypothesis we need to nullify in order to proceed with promulgation of our research hypothesis. It doesn't mean the alternative hypothesis is right, just that it hasn't failed a test - we have managed to get over a (usually fairly low) hurdle, nothing more. I view this a little like naive falsificationism - we can't prove a theory, only disprove it†, so all we can say is that a theory has survived an attempt to refute it. IIRC Popper says that the test "corroborates" a theory, but this is a long way short of showing it is true (or accepting it). A good example of this is the classic XKCD cartoon (see this question): Is it reasonable for the frequentist to "accept" the alternative hypothesis that the sun has gone nova? No!!! In this case, the most obvious reason is that the analysis doesn't consider the prior probabilities of the two hypotheses, which a frequentist would do by setting a much more stringent significance level. But also there may be explanations for the neutrinos that have nothing to do with the sun going nova (perhaps I have just come back from a visit to the Cretaceous to see the dinosaurs, and you've detected my return to this timeline). So rejecting the null hypothesis doesn't mean the alternative hypothesis is true. A frequentist analysis fundamentally cannot assign a probability to the truth of a hypothesis, so it doesn't give much of a basis for accepting it. The "we reject the null hypothesis" is basically a an incantation in a ritual. It doesn't literally mean that we are discarding the null hypothesis as we are confident that it is false. It is just a convention that we proceed with the alternative hypothesis if we can "reject" the null hypothesis. There is no mathematical requirement that the null hypothesis is wrong. This isn't necessarily a bad thing, it is just best to take it as technical jargon and not read too much into the actual words. Unfortunately the semantics of Null Hypothesis Statistical Tests are rather subtle, and often not a direct answer to the question we actually want to pose, so I would recommend just saying "we reject the null hypothesis" or "we fail to reject the null hypothesis" and leave it at that. Those that understand the semantics will draw the appropriate conclusion. Those who don't understand the semantics won't be mislead into thinking that the alternative hypothesis has been shown to be true (by accepting it). † Sadly, we can't really disprove them either.
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
We should not accept the research/alternative hypothesis. The main value of a null hypothesis statistical test is to help the researcher adopt a degree of self-skepticism about their research hypothes
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? We should not accept the research/alternative hypothesis. The main value of a null hypothesis statistical test is to help the researcher adopt a degree of self-skepticism about their research hypothesis. The null hypothesis is the hypothesis we need to nullify in order to proceed with promulgation of our research hypothesis. It doesn't mean the alternative hypothesis is right, just that it hasn't failed a test - we have managed to get over a (usually fairly low) hurdle, nothing more. I view this a little like naive falsificationism - we can't prove a theory, only disprove it†, so all we can say is that a theory has survived an attempt to refute it. IIRC Popper says that the test "corroborates" a theory, but this is a long way short of showing it is true (or accepting it). A good example of this is the classic XKCD cartoon (see this question): Is it reasonable for the frequentist to "accept" the alternative hypothesis that the sun has gone nova? No!!! In this case, the most obvious reason is that the analysis doesn't consider the prior probabilities of the two hypotheses, which a frequentist would do by setting a much more stringent significance level. But also there may be explanations for the neutrinos that have nothing to do with the sun going nova (perhaps I have just come back from a visit to the Cretaceous to see the dinosaurs, and you've detected my return to this timeline). So rejecting the null hypothesis doesn't mean the alternative hypothesis is true. A frequentist analysis fundamentally cannot assign a probability to the truth of a hypothesis, so it doesn't give much of a basis for accepting it. The "we reject the null hypothesis" is basically a an incantation in a ritual. It doesn't literally mean that we are discarding the null hypothesis as we are confident that it is false. It is just a convention that we proceed with the alternative hypothesis if we can "reject" the null hypothesis. There is no mathematical requirement that the null hypothesis is wrong. This isn't necessarily a bad thing, it is just best to take it as technical jargon and not read too much into the actual words. Unfortunately the semantics of Null Hypothesis Statistical Tests are rather subtle, and often not a direct answer to the question we actually want to pose, so I would recommend just saying "we reject the null hypothesis" or "we fail to reject the null hypothesis" and leave it at that. Those that understand the semantics will draw the appropriate conclusion. Those who don't understand the semantics won't be mislead into thinking that the alternative hypothesis has been shown to be true (by accepting it). † Sadly, we can't really disprove them either.
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? We should not accept the research/alternative hypothesis. The main value of a null hypothesis statistical test is to help the researcher adopt a degree of self-skepticism about their research hypothes
19,484
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
The answer depends on whether you are using a pre-defined critical value (or p-value threshold like p<0.05) in a hypothesis test that yields a decision (a Neyman–Pearsonian hypothesis test), or whether you are using the magnitude of the actual p-value as an index of the evidence in the data (a [neo-]Fisherian significance test). If you are doing a hypothesis test then you are working with a set of rules that grant you a pre-set confidence of long-run performance of the test procedure. The way that the rules can give confidence about long-run test performance is by specifying what decision applies depending on the data, and the decision relates to the acceptance or non-acceptance (yes, that is rejection as far as I am concerned) of the null hypothesis. Rejection of the statistical null hypothesis can be thought of as acceptance of another hypothesis, but that other hypothesis can be nothing more than a set of all not-the-null hypotheses that exist within the statistical model. Accepting that not-the-null hypothesis is not very informative and so it is not unreasonable to simply say that the test rejects the null but does not accept anything else. There is (sometimes) a specific 'alternative' hypothesis specified for a hypothesis test: the hypothetical effect size plugged into the pre-experiment power analysis used to set the sample size. That 'alternative' hypothesis IS NOT tested by the hypothesis test and has very little meaning once the data are available. If you are doing a significance test then a small p-value implies that the data are inconsistent with the statistical model's expectations regarding probable observations where the null hypothesis is true. The analyst can then use that evidence to make a scientific inference. The scientific inference might well include an interim rejection of the statistical null hypothesis and acceptance of a specific 'alternative' hypothesis of scientific interest. It depends on the information available and the scientific objectives, and it is a process that is very rarely considered in statistical instruction. See this open access chapter for much more detail: https://link.springer.com/chapter/10.1007/164_2019_286
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
The answer depends on whether you are using a pre-defined critical value (or p-value threshold like p<0.05) in a hypothesis test that yields a decision (a Neyman–Pearsonian hypothesis test), or whethe
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? The answer depends on whether you are using a pre-defined critical value (or p-value threshold like p<0.05) in a hypothesis test that yields a decision (a Neyman–Pearsonian hypothesis test), or whether you are using the magnitude of the actual p-value as an index of the evidence in the data (a [neo-]Fisherian significance test). If you are doing a hypothesis test then you are working with a set of rules that grant you a pre-set confidence of long-run performance of the test procedure. The way that the rules can give confidence about long-run test performance is by specifying what decision applies depending on the data, and the decision relates to the acceptance or non-acceptance (yes, that is rejection as far as I am concerned) of the null hypothesis. Rejection of the statistical null hypothesis can be thought of as acceptance of another hypothesis, but that other hypothesis can be nothing more than a set of all not-the-null hypotheses that exist within the statistical model. Accepting that not-the-null hypothesis is not very informative and so it is not unreasonable to simply say that the test rejects the null but does not accept anything else. There is (sometimes) a specific 'alternative' hypothesis specified for a hypothesis test: the hypothetical effect size plugged into the pre-experiment power analysis used to set the sample size. That 'alternative' hypothesis IS NOT tested by the hypothesis test and has very little meaning once the data are available. If you are doing a significance test then a small p-value implies that the data are inconsistent with the statistical model's expectations regarding probable observations where the null hypothesis is true. The analyst can then use that evidence to make a scientific inference. The scientific inference might well include an interim rejection of the statistical null hypothesis and acceptance of a specific 'alternative' hypothesis of scientific interest. It depends on the information available and the scientific objectives, and it is a process that is very rarely considered in statistical instruction. See this open access chapter for much more detail: https://link.springer.com/chapter/10.1007/164_2019_286
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? The answer depends on whether you are using a pre-defined critical value (or p-value threshold like p<0.05) in a hypothesis test that yields a decision (a Neyman–Pearsonian hypothesis test), or whethe
19,485
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
Within the Bayesian framework you can "accept the null hypothesis" in the sense that the posterior probability of a point null hypothesis can tend to one with increasing sample size. This requires that the null hypothesis is exactly true and that you're willing to represent this in your prior by a point mass. Lindley (1957, p. 188) gives two examples where this is arguably reasonable: testing for linkage in genetics, and testing someone for telepathic powers. In addition, your prior on the parameter of interest must be proper under the alternative hypothesis. See for example this answer.
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
Within the Bayesian framework you can "accept the null hypothesis" in the sense that the posterior probability of a point null hypothesis can tend to one with increasing sample size. This requires th
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? Within the Bayesian framework you can "accept the null hypothesis" in the sense that the posterior probability of a point null hypothesis can tend to one with increasing sample size. This requires that the null hypothesis is exactly true and that you're willing to represent this in your prior by a point mass. Lindley (1957, p. 188) gives two examples where this is arguably reasonable: testing for linkage in genetics, and testing someone for telepathic powers. In addition, your prior on the parameter of interest must be proper under the alternative hypothesis. See for example this answer.
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? Within the Bayesian framework you can "accept the null hypothesis" in the sense that the posterior probability of a point null hypothesis can tend to one with increasing sample size. This requires th
19,486
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
"Absence of evidence is not evidence of absence." Carl Sagan. The null hypothesis specifies no effect, that is absence of effect. You reject the null if the results are statistically significant, that is, when you have evidence for rejecting the null. If the results are not statistically significant, what you have is absence of evidence.
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis?
"Absence of evidence is not evidence of absence." Carl Sagan. The null hypothesis specifies no effect, that is absence of effect. You reject the null if the results are statistically significant, that
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? "Absence of evidence is not evidence of absence." Carl Sagan. The null hypothesis specifies no effect, that is absence of effect. You reject the null if the results are statistically significant, that is, when you have evidence for rejecting the null. If the results are not statistically significant, what you have is absence of evidence.
Why can't we accept the null hypothesis, but we can accept the alternative hypothesis? "Absence of evidence is not evidence of absence." Carl Sagan. The null hypothesis specifies no effect, that is absence of effect. You reject the null if the results are statistically significant, that
19,487
Is Propensity Score Matching a "MUST" for Scientific Studies?
Propensity score methods are one type of method used to adjust for confounding. There are several other methods that rely on different assumptions. Some of the most popular include difference-in-differences, which relies on an assumption about stability over time, and instrumental variable analysis, which relies on an assumption about randomization of some other variable. A third class of methods includes methods that rely on an assumption that all confounding variables have been measured. I highly recommend this 2020 article by Matthay et al. for a comparison of these methods. Propensity score methods fall in the latter class. Other methods also fall in this class, including regression adjustment, "g"-methods, and doubly-robust methods. These are all different ways of adjusting for confounding by measured covariates by conditioning on them in certain ways. They differ primarily in their statistical performance under various assumptions about the functional form of the treatment and outcome processes. There are several ways to use propensity scores, including matching (which you described), weighting, subclassification, and regression adjustment, and there are ways to perform each of these methods without propensity scores. I mention all of this so that you see propensity scores as one particular implementation of methods that themselves are members of a broad class of methods that is one of several classes of methods one can use to adjust for confounding. Propensity score methods are not necessarily superior to any of them, and their ubiquity is likely a cultural artifact rather than truly justified by their statistical performance. Here are a few reasons (and rebuttals) for why propensity score may be popular: They are easy to implement (but only in their most basic, poorest performing way; to use them well requires extensive knowledge) They are easy to explain to lay audiences (but so are many methods that don't involve propensity scores, like other matching methods) They tend to be effective at removing bias due to confounding (but several methods are demonstrably better, especially better than propensity score methods as most commonly used) They separate the design and analysis phase, leading to more replicable research and decreasing model dependence (but when used poorly can increase model dependence and are not immune to snooping and nefarious or misguided use) They are implemented in most statistical software (but so are many other methods, and they are implemented differently in each software) They are a form of dimension reduction in high-dimensional datasets (but there are other ways to reduce dimensionality, and still propensity scores are used even to adjust for a few covariates) They rely less on modeling assumptions than regression-based methods (but there are many other methods that also allow for extreme flexibility with often improved performance) They sound fancy and make the analyst look sophisticated (but experienced statisticians can easily point out the errors amateur users constantly make) (You might think I am biased against propensity scores, but check the propensity-scores tag and see my involvement. I'm also the author of several R packages to facilitate the use of propensity score methods.) In my opinion, propensity scores are overused (or, at best, under-justified) in the medical literature. There are so many better performing and more sophisticated methods that rely on the same assumptions as propensity score methods do that are under-appreciated in medical research, often because the analysts and reviewers in medical research are not familiar with them. I hope to encourage people to consider propensity scores as one option in a vast sea of options, each of which has its own advantages and disadvantages that make it more or less suitable for a given problem. To decide which option is the best for a given problem requires the assistance of a statistician specially trained in the area of causal effect estimation.
Is Propensity Score Matching a "MUST" for Scientific Studies?
Propensity score methods are one type of method used to adjust for confounding. There are several other methods that rely on different assumptions. Some of the most popular include difference-in-diffe
Is Propensity Score Matching a "MUST" for Scientific Studies? Propensity score methods are one type of method used to adjust for confounding. There are several other methods that rely on different assumptions. Some of the most popular include difference-in-differences, which relies on an assumption about stability over time, and instrumental variable analysis, which relies on an assumption about randomization of some other variable. A third class of methods includes methods that rely on an assumption that all confounding variables have been measured. I highly recommend this 2020 article by Matthay et al. for a comparison of these methods. Propensity score methods fall in the latter class. Other methods also fall in this class, including regression adjustment, "g"-methods, and doubly-robust methods. These are all different ways of adjusting for confounding by measured covariates by conditioning on them in certain ways. They differ primarily in their statistical performance under various assumptions about the functional form of the treatment and outcome processes. There are several ways to use propensity scores, including matching (which you described), weighting, subclassification, and regression adjustment, and there are ways to perform each of these methods without propensity scores. I mention all of this so that you see propensity scores as one particular implementation of methods that themselves are members of a broad class of methods that is one of several classes of methods one can use to adjust for confounding. Propensity score methods are not necessarily superior to any of them, and their ubiquity is likely a cultural artifact rather than truly justified by their statistical performance. Here are a few reasons (and rebuttals) for why propensity score may be popular: They are easy to implement (but only in their most basic, poorest performing way; to use them well requires extensive knowledge) They are easy to explain to lay audiences (but so are many methods that don't involve propensity scores, like other matching methods) They tend to be effective at removing bias due to confounding (but several methods are demonstrably better, especially better than propensity score methods as most commonly used) They separate the design and analysis phase, leading to more replicable research and decreasing model dependence (but when used poorly can increase model dependence and are not immune to snooping and nefarious or misguided use) They are implemented in most statistical software (but so are many other methods, and they are implemented differently in each software) They are a form of dimension reduction in high-dimensional datasets (but there are other ways to reduce dimensionality, and still propensity scores are used even to adjust for a few covariates) They rely less on modeling assumptions than regression-based methods (but there are many other methods that also allow for extreme flexibility with often improved performance) They sound fancy and make the analyst look sophisticated (but experienced statisticians can easily point out the errors amateur users constantly make) (You might think I am biased against propensity scores, but check the propensity-scores tag and see my involvement. I'm also the author of several R packages to facilitate the use of propensity score methods.) In my opinion, propensity scores are overused (or, at best, under-justified) in the medical literature. There are so many better performing and more sophisticated methods that rely on the same assumptions as propensity score methods do that are under-appreciated in medical research, often because the analysts and reviewers in medical research are not familiar with them. I hope to encourage people to consider propensity scores as one option in a vast sea of options, each of which has its own advantages and disadvantages that make it more or less suitable for a given problem. To decide which option is the best for a given problem requires the assistance of a statistician specially trained in the area of causal effect estimation.
Is Propensity Score Matching a "MUST" for Scientific Studies? Propensity score methods are one type of method used to adjust for confounding. There are several other methods that rely on different assumptions. Some of the most popular include difference-in-diffe
19,488
Is Propensity Score Matching a "MUST" for Scientific Studies?
As Alexis pointed out, propensity score matching (PSM) is one of many tools we have in causal inference. Another one is Inverse Probability Weighted Estimator (IPWE). You can also use causal discovery to infer a causal diagram and use do-calculus to estimate the causal effect. Or make use of instrumental variables estimation. I'm just throwing a lot of names here (though with links, in case you want to see more about it) with a single intent: To show you there are many tools you have when your goal is causal inference in observational data. They all do something specific and have their advantages and limitations. Should we always use such tools when we want to do causal inference in observational data? Yes. Are all scientific studies about this? No. What's the best one? It depends on what you want, how you want and what you have :-). One last thing: Latent and unobserved are synonymous in this context. Latent confounders and unobserved confounders refer to the same thing. Besides, confounding is not your only enemy when it comes to inferring causality. Collider bias is another one and propensity score matching does not account for bias due to censoring.
Is Propensity Score Matching a "MUST" for Scientific Studies?
As Alexis pointed out, propensity score matching (PSM) is one of many tools we have in causal inference. Another one is Inverse Probability Weighted Estimator (IPWE). You can also use causal discovery
Is Propensity Score Matching a "MUST" for Scientific Studies? As Alexis pointed out, propensity score matching (PSM) is one of many tools we have in causal inference. Another one is Inverse Probability Weighted Estimator (IPWE). You can also use causal discovery to infer a causal diagram and use do-calculus to estimate the causal effect. Or make use of instrumental variables estimation. I'm just throwing a lot of names here (though with links, in case you want to see more about it) with a single intent: To show you there are many tools you have when your goal is causal inference in observational data. They all do something specific and have their advantages and limitations. Should we always use such tools when we want to do causal inference in observational data? Yes. Are all scientific studies about this? No. What's the best one? It depends on what you want, how you want and what you have :-). One last thing: Latent and unobserved are synonymous in this context. Latent confounders and unobserved confounders refer to the same thing. Besides, confounding is not your only enemy when it comes to inferring causality. Collider bias is another one and propensity score matching does not account for bias due to censoring.
Is Propensity Score Matching a "MUST" for Scientific Studies? As Alexis pointed out, propensity score matching (PSM) is one of many tools we have in causal inference. Another one is Inverse Probability Weighted Estimator (IPWE). You can also use causal discovery
19,489
Why is the jackknife less computationally intensive than the bootstrap?
The jackknife is not intrinsically faster than the bootstrap, as Cliff AB points out below. Nevertheless, two factors sometimes make it faster than the boostrap in practice. Convention During a jackknife, the estimation step is always done exactly $n$ times: one data point is omitted from each jackknife estimate. If you had a dataset of $n=50$ points, you'd therefore run the estimation procedure 50 times, leaving out the 1st, 2nd, ...nth point in turn. Bootstraps, by comparison, are almost run "a large number of times" (~1000); bootstrapping with only $k=50$ repeats is virtually unheard of and people rarely compute jackknife estimates from absolutely massive samples ($n=10^9$), in part because it would be pointlessly slow. Optimization Since the entire bootstrap sample is drawn anew on each iteration, each bootstrap samples can be totally different from the others, and so the statistic needs to be computed from scratch. Each jackknife sample, however, is almost identical to the one before it, with the exception of two data points: the one removed during the last iteration (and now added back) and the one removed for the current iteration (which was previously present). This opens the door to some computational optimizations. For example you want to estimate the mean. For the bootstrap, you're stuck adding all $n$ values together each time; $bn$ additions are required for $b$ bootstrap iterations. For the jackknife estimate, you can instead add all $n$ numbers *once* to find $S=\sum x$. Next, compute the mean for the sample where the $i$th data point is removed as $\frac{S-x_i}{n-1}$. This requires only $2n$ additions/subtractions for the whole jackknife. Similar tricks exist for other statistics. In fact, closed-form expressions can be derived for the jackknife estimates of certain quantities, allowing you to skip the (re)sampling altogether! For example, Bandos, Guo, and Gur provide a closed-form solution for the variance of auROC here.
Why is the jackknife less computationally intensive than the bootstrap?
The jackknife is not intrinsically faster than the bootstrap, as Cliff AB points out below. Nevertheless, two factors sometimes make it faster than the boostrap in practice. Convention During a jackk
Why is the jackknife less computationally intensive than the bootstrap? The jackknife is not intrinsically faster than the bootstrap, as Cliff AB points out below. Nevertheless, two factors sometimes make it faster than the boostrap in practice. Convention During a jackknife, the estimation step is always done exactly $n$ times: one data point is omitted from each jackknife estimate. If you had a dataset of $n=50$ points, you'd therefore run the estimation procedure 50 times, leaving out the 1st, 2nd, ...nth point in turn. Bootstraps, by comparison, are almost run "a large number of times" (~1000); bootstrapping with only $k=50$ repeats is virtually unheard of and people rarely compute jackknife estimates from absolutely massive samples ($n=10^9$), in part because it would be pointlessly slow. Optimization Since the entire bootstrap sample is drawn anew on each iteration, each bootstrap samples can be totally different from the others, and so the statistic needs to be computed from scratch. Each jackknife sample, however, is almost identical to the one before it, with the exception of two data points: the one removed during the last iteration (and now added back) and the one removed for the current iteration (which was previously present). This opens the door to some computational optimizations. For example you want to estimate the mean. For the bootstrap, you're stuck adding all $n$ values together each time; $bn$ additions are required for $b$ bootstrap iterations. For the jackknife estimate, you can instead add all $n$ numbers *once* to find $S=\sum x$. Next, compute the mean for the sample where the $i$th data point is removed as $\frac{S-x_i}{n-1}$. This requires only $2n$ additions/subtractions for the whole jackknife. Similar tricks exist for other statistics. In fact, closed-form expressions can be derived for the jackknife estimates of certain quantities, allowing you to skip the (re)sampling altogether! For example, Bandos, Guo, and Gur provide a closed-form solution for the variance of auROC here.
Why is the jackknife less computationally intensive than the bootstrap? The jackknife is not intrinsically faster than the bootstrap, as Cliff AB points out below. Nevertheless, two factors sometimes make it faster than the boostrap in practice. Convention During a jackk
19,490
How does one explain what an unbiased estimator is to a layperson?
Technically what you're describing when you say that your estimator gets closer to the true value as the sample size grows is (as others have mentioned) consistency, or convergence of statistical estimators. This convergence can either be convergence in probability, which says that $\lim_{n \to \infty} P(|\hat{\theta}_n - \theta| > \epsilon) = 0$ for every $\epsilon > 0$, or almost sure convergence which says that $P(\lim_{n \to \infty} |\hat{\theta}_n - \theta| > \epsilon) = 0$. Notice how the limit is actually inside the probability in the second case. It turns out this latter form of convergence is stronger than the other, but both of them mean essentially the same thing, which is that the estimate tends to get closer and closer to the thing we're estimating as we gather more samples. A subtle point here is that even when $\hat{\theta}_n \to \theta$ either in probability or almost surely, it is not true in general that $\lim_{n \to \infty} \text{E}(\hat{\theta}_n) = \theta$, so consistency does not imply asymptotic unbiasedness as you're suggesting. You have to be careful when moving between sequences of random variables (which are functions) to sequences of expectations (which are integrals). All the technical stuff aside, unbiased only means that $\text{E}(\hat{\theta}_n) = \theta$. So when you explain it to someone just say that if the experiment were repeated under identical conditions many times that the average value of the estimate would be close to the true value.
How does one explain what an unbiased estimator is to a layperson?
Technically what you're describing when you say that your estimator gets closer to the true value as the sample size grows is (as others have mentioned) consistency, or convergence of statistical esti
How does one explain what an unbiased estimator is to a layperson? Technically what you're describing when you say that your estimator gets closer to the true value as the sample size grows is (as others have mentioned) consistency, or convergence of statistical estimators. This convergence can either be convergence in probability, which says that $\lim_{n \to \infty} P(|\hat{\theta}_n - \theta| > \epsilon) = 0$ for every $\epsilon > 0$, or almost sure convergence which says that $P(\lim_{n \to \infty} |\hat{\theta}_n - \theta| > \epsilon) = 0$. Notice how the limit is actually inside the probability in the second case. It turns out this latter form of convergence is stronger than the other, but both of them mean essentially the same thing, which is that the estimate tends to get closer and closer to the thing we're estimating as we gather more samples. A subtle point here is that even when $\hat{\theta}_n \to \theta$ either in probability or almost surely, it is not true in general that $\lim_{n \to \infty} \text{E}(\hat{\theta}_n) = \theta$, so consistency does not imply asymptotic unbiasedness as you're suggesting. You have to be careful when moving between sequences of random variables (which are functions) to sequences of expectations (which are integrals). All the technical stuff aside, unbiased only means that $\text{E}(\hat{\theta}_n) = \theta$. So when you explain it to someone just say that if the experiment were repeated under identical conditions many times that the average value of the estimate would be close to the true value.
How does one explain what an unbiased estimator is to a layperson? Technically what you're describing when you say that your estimator gets closer to the true value as the sample size grows is (as others have mentioned) consistency, or convergence of statistical esti
19,491
How does one explain what an unbiased estimator is to a layperson?
I am not sure if you confuse consistency and unbiasedness. Consistency: The larger the sample size the closer the estimate to the true value. Depends on sample size Unbiasedness: The expected value of the estimator equals the true value of the parameters Does not depend on sample size So your sentence if you average a bunch of values of $\hat\theta$, as the sample size gets larger, you get a better approximation of $\theta$. Is not correct. Even if the sample size gets infinite an unbiased estimator will stay an unbiased estimator, e.g. If you estimate the mean as "mean +1" you can add one billion observations to your sample and your estimator will still not give you the true value. Here you can find a more profound discussion about the difference between consistency and unbiasedness. What is the difference between a consistent estimator and an unbiased estimator?
How does one explain what an unbiased estimator is to a layperson?
I am not sure if you confuse consistency and unbiasedness. Consistency: The larger the sample size the closer the estimate to the true value. Depends on sample size Unbiasedness: The expected value
How does one explain what an unbiased estimator is to a layperson? I am not sure if you confuse consistency and unbiasedness. Consistency: The larger the sample size the closer the estimate to the true value. Depends on sample size Unbiasedness: The expected value of the estimator equals the true value of the parameters Does not depend on sample size So your sentence if you average a bunch of values of $\hat\theta$, as the sample size gets larger, you get a better approximation of $\theta$. Is not correct. Even if the sample size gets infinite an unbiased estimator will stay an unbiased estimator, e.g. If you estimate the mean as "mean +1" you can add one billion observations to your sample and your estimator will still not give you the true value. Here you can find a more profound discussion about the difference between consistency and unbiasedness. What is the difference between a consistent estimator and an unbiased estimator?
How does one explain what an unbiased estimator is to a layperson? I am not sure if you confuse consistency and unbiasedness. Consistency: The larger the sample size the closer the estimate to the true value. Depends on sample size Unbiasedness: The expected value
19,492
How does one explain what an unbiased estimator is to a layperson?
@Ferdi already provided clear answer to your question, but let's make it a little bit more formal. Let $X_1,\dots,X_n$ be your sample of independent and identically distributed random variables from distribution $F$. You are interested in estimating unknown but fixed quantity $\theta$, using estimator $g$ being a function of $X_1,\dots,X_n$. Since $g$ is a function of random variables, estimate $$ \hat\theta_n = g(X_1,\dots,X_n)$$ is also a random variable. We define bias as $$ \mathrm{bias}(\hat\theta_n) = \mathbb{E}_\theta(\hat\theta_n) - \theta $$ estimator is unbiased when $\mathbb{E}_\theta(\hat\theta_n) = \theta$. Saying it in plain English: we are dealing with random variables, so unless it's degenerate, if we took different samples, we could expect to observe different data and so different estimates. Nonetheless, we could expect that across different samples "on average" estimated $\hat\theta_n$ would be "right" if the estimator is unbiased. So it would not be always right, but "on average" it would be right. It simply cannot always be "right" because of randomness associated with the data. As others already noted, the fact that your estimate gets "closer" to estimated quantity as your sample grows, i.e. that in converges in probability $$ \hat\theta_n \overset{P}{\to} \theta $$ has to do with estimators consistency, not unbiasedness. Unbiasedness alone does not tell us anything about sample size and its relation to obtained estimates. Moreover, unbiased estimators are not always available and not always preferable over biased ones. For example, after considering bias-variance tradeoff you may be willing to consider using estimator with greater bias, but smaller variance -- so "on average" it would be farther from the true value, but more often (smaller variance) the estimates would be closer to the true value, then in case of unbiased estimator.
How does one explain what an unbiased estimator is to a layperson?
@Ferdi already provided clear answer to your question, but let's make it a little bit more formal. Let $X_1,\dots,X_n$ be your sample of independent and identically distributed random variables from d
How does one explain what an unbiased estimator is to a layperson? @Ferdi already provided clear answer to your question, but let's make it a little bit more formal. Let $X_1,\dots,X_n$ be your sample of independent and identically distributed random variables from distribution $F$. You are interested in estimating unknown but fixed quantity $\theta$, using estimator $g$ being a function of $X_1,\dots,X_n$. Since $g$ is a function of random variables, estimate $$ \hat\theta_n = g(X_1,\dots,X_n)$$ is also a random variable. We define bias as $$ \mathrm{bias}(\hat\theta_n) = \mathbb{E}_\theta(\hat\theta_n) - \theta $$ estimator is unbiased when $\mathbb{E}_\theta(\hat\theta_n) = \theta$. Saying it in plain English: we are dealing with random variables, so unless it's degenerate, if we took different samples, we could expect to observe different data and so different estimates. Nonetheless, we could expect that across different samples "on average" estimated $\hat\theta_n$ would be "right" if the estimator is unbiased. So it would not be always right, but "on average" it would be right. It simply cannot always be "right" because of randomness associated with the data. As others already noted, the fact that your estimate gets "closer" to estimated quantity as your sample grows, i.e. that in converges in probability $$ \hat\theta_n \overset{P}{\to} \theta $$ has to do with estimators consistency, not unbiasedness. Unbiasedness alone does not tell us anything about sample size and its relation to obtained estimates. Moreover, unbiased estimators are not always available and not always preferable over biased ones. For example, after considering bias-variance tradeoff you may be willing to consider using estimator with greater bias, but smaller variance -- so "on average" it would be farther from the true value, but more often (smaller variance) the estimates would be closer to the true value, then in case of unbiased estimator.
How does one explain what an unbiased estimator is to a layperson? @Ferdi already provided clear answer to your question, but let's make it a little bit more formal. Let $X_1,\dots,X_n$ be your sample of independent and identically distributed random variables from d
19,493
How does one explain what an unbiased estimator is to a layperson?
First you must distinguish misunderstanding bias from statistical bias, especially for a lay person. The choice of say using median, mean or mode as your estimator for a population average, often contains a political, religious or science theory belief bias. The computation as to which estimator is the best form of average is of a different type to the arithmetic that affects statistical bias. Once you have got past the method selection bias, then you can address the potential biases in the estimation method. First you have to pick a method that can have a bias, and a mechanism that leads easily toward that bias. It can be easier to use a divide a conquer viewpoint where it becomes obvious as the sample size gets smaller, the estimate becomes clearly biased. For example the n-1 factor (vs 'n' factor) in sample spread estimators becomes obvious as n drops from 3 to 2 to 1 ! It all depends on how 'lay' the person is.
How does one explain what an unbiased estimator is to a layperson?
First you must distinguish misunderstanding bias from statistical bias, especially for a lay person. The choice of say using median, mean or mode as your estimator for a population average, often cont
How does one explain what an unbiased estimator is to a layperson? First you must distinguish misunderstanding bias from statistical bias, especially for a lay person. The choice of say using median, mean or mode as your estimator for a population average, often contains a political, religious or science theory belief bias. The computation as to which estimator is the best form of average is of a different type to the arithmetic that affects statistical bias. Once you have got past the method selection bias, then you can address the potential biases in the estimation method. First you have to pick a method that can have a bias, and a mechanism that leads easily toward that bias. It can be easier to use a divide a conquer viewpoint where it becomes obvious as the sample size gets smaller, the estimate becomes clearly biased. For example the n-1 factor (vs 'n' factor) in sample spread estimators becomes obvious as n drops from 3 to 2 to 1 ! It all depends on how 'lay' the person is.
How does one explain what an unbiased estimator is to a layperson? First you must distinguish misunderstanding bias from statistical bias, especially for a lay person. The choice of say using median, mean or mode as your estimator for a population average, often cont
19,494
When is it appropriate to select models by minimising the AIC?
Paraphrasing from Cosma Shalizi’s lecture notes on the truth about Linear Regression, thou shall never choose a model just because it happened to minimise a statistic like AIC, for Every time someone solely uses an AIC statistic for model selection, an angel loses its wings. Every time someone thoughtlessly minimises it, an angel not only loses its wings, but is cast out of Heaven and falls in most extreme agony into the everlasting fire.
When is it appropriate to select models by minimising the AIC?
Paraphrasing from Cosma Shalizi’s lecture notes on the truth about Linear Regression, thou shall never choose a model just because it happened to minimise a statistic like AIC, for Every time someone
When is it appropriate to select models by minimising the AIC? Paraphrasing from Cosma Shalizi’s lecture notes on the truth about Linear Regression, thou shall never choose a model just because it happened to minimise a statistic like AIC, for Every time someone solely uses an AIC statistic for model selection, an angel loses its wings. Every time someone thoughtlessly minimises it, an angel not only loses its wings, but is cast out of Heaven and falls in most extreme agony into the everlasting fire.
When is it appropriate to select models by minimising the AIC? Paraphrasing from Cosma Shalizi’s lecture notes on the truth about Linear Regression, thou shall never choose a model just because it happened to minimise a statistic like AIC, for Every time someone
19,495
When is it appropriate to select models by minimising the AIC?
I would say it is often appropriate to use AIC in model selection, but rarely right to use it as the sole basis for model selection. We must also use substantive knowledge. In your particular case, you are comparing a model with a 3rd order AR vs. one with a 1st order AR. In addition to AIC (or something similar) I would look at the the autocorrelation and partial autocorrelation plots. I would also consider what a 3rd order model would mean. Does it make sense? Does it add to substantive knowledge? (Or, if you are solely interested in prediction, does it help predict?) More generally, it is sometimes the case that finding a very small effect size is interesting.
When is it appropriate to select models by minimising the AIC?
I would say it is often appropriate to use AIC in model selection, but rarely right to use it as the sole basis for model selection. We must also use substantive knowledge. In your particular case, yo
When is it appropriate to select models by minimising the AIC? I would say it is often appropriate to use AIC in model selection, but rarely right to use it as the sole basis for model selection. We must also use substantive knowledge. In your particular case, you are comparing a model with a 3rd order AR vs. one with a 1st order AR. In addition to AIC (or something similar) I would look at the the autocorrelation and partial autocorrelation plots. I would also consider what a 3rd order model would mean. Does it make sense? Does it add to substantive knowledge? (Or, if you are solely interested in prediction, does it help predict?) More generally, it is sometimes the case that finding a very small effect size is interesting.
When is it appropriate to select models by minimising the AIC? I would say it is often appropriate to use AIC in model selection, but rarely right to use it as the sole basis for model selection. We must also use substantive knowledge. In your particular case, yo
19,496
When is it appropriate to select models by minimising the AIC?
You can think of AIC as a providing a more reasonable (i.e., larger) $P$-value cutoff. But model selection based on $P$-values or any other one-variable-at-a-time metric is frought with difficulties, having all the problems of stepwise variable selection. Generally speaking, AIC works best if used to select a unique single parameter (e.g., shrinkage coefficient) or to compare 2 or 3 candidate models. Otherwise, fitting the entire set of variables in some way, using shrinkage or data reduction, will often result in superior predictive discrimination. Parsimony is at odds with predictive discrimination.
When is it appropriate to select models by minimising the AIC?
You can think of AIC as a providing a more reasonable (i.e., larger) $P$-value cutoff. But model selection based on $P$-values or any other one-variable-at-a-time metric is frought with difficulties,
When is it appropriate to select models by minimising the AIC? You can think of AIC as a providing a more reasonable (i.e., larger) $P$-value cutoff. But model selection based on $P$-values or any other one-variable-at-a-time metric is frought with difficulties, having all the problems of stepwise variable selection. Generally speaking, AIC works best if used to select a unique single parameter (e.g., shrinkage coefficient) or to compare 2 or 3 candidate models. Otherwise, fitting the entire set of variables in some way, using shrinkage or data reduction, will often result in superior predictive discrimination. Parsimony is at odds with predictive discrimination.
When is it appropriate to select models by minimising the AIC? You can think of AIC as a providing a more reasonable (i.e., larger) $P$-value cutoff. But model selection based on $P$-values or any other one-variable-at-a-time metric is frought with difficulties,
19,497
Reporting results of a logistic regression
Your suggested reporting for a table seems reasonable, although z-values and p-values are redundant. Many journals I am familiar with don't report the z-value/p-value at all and only use asterisks to report statistical significance. I have also seen logistic tables only with the odd's ratios reported, although I personally prefer both the log odds and odds ratios reported if space permits in a table. But different venues may have different guides as to reporting procedures, so what is expected may vary. If I'm submitting a paper to a journal I will frequently just see how other recent papers have made their tables and just mimic those. If it is your own personal paper, asking whomever may be reviewing it would be a reasonable request. As I mentioned above, space constraints in some venues may prevent you from reporting ultimately redundant information (such as both the log odds and the odds ratios). Some places may force you to report the results entirely in text! There is also the question of what other model summaries to report. Although many journals I am familiar with frequently report pseudo $R^2$ values, here is a thread on the site that discusses the weaknesses of various measures. I personally prefer classification rates to be reported, but again I suspect this varies by venue (I can imagine some journals would specifically ask for one of the pseudo $R^2$ measures to be reported). To get the odd's ratio just exponentiate the regression coefficient (i.e. take $e^{\hat{\beta}}$ where $e$ is the base of the natural logarithm and $\hat{\beta}$ is the estimated logistic regression coefficient.) A good guess in any statistical language to calculate this is exp(coefficient). Also as a note, although this is the current accepted answer, lejohn and Frank Harrell both give very useful advice. While I would typically always want the statistics in the question reported somewhere, the other answers advice about other measures are useful ways to assess effect sizes relative to other estimated effects in the model. Graphical procedures are also useful to examine relative effect sizes, and see these two papers on turning tables into graphs as examples (Kastellec & Leoni, 2007; Gelman et al., 2002)
Reporting results of a logistic regression
Your suggested reporting for a table seems reasonable, although z-values and p-values are redundant. Many journals I am familiar with don't report the z-value/p-value at all and only use asterisks to
Reporting results of a logistic regression Your suggested reporting for a table seems reasonable, although z-values and p-values are redundant. Many journals I am familiar with don't report the z-value/p-value at all and only use asterisks to report statistical significance. I have also seen logistic tables only with the odd's ratios reported, although I personally prefer both the log odds and odds ratios reported if space permits in a table. But different venues may have different guides as to reporting procedures, so what is expected may vary. If I'm submitting a paper to a journal I will frequently just see how other recent papers have made their tables and just mimic those. If it is your own personal paper, asking whomever may be reviewing it would be a reasonable request. As I mentioned above, space constraints in some venues may prevent you from reporting ultimately redundant information (such as both the log odds and the odds ratios). Some places may force you to report the results entirely in text! There is also the question of what other model summaries to report. Although many journals I am familiar with frequently report pseudo $R^2$ values, here is a thread on the site that discusses the weaknesses of various measures. I personally prefer classification rates to be reported, but again I suspect this varies by venue (I can imagine some journals would specifically ask for one of the pseudo $R^2$ measures to be reported). To get the odd's ratio just exponentiate the regression coefficient (i.e. take $e^{\hat{\beta}}$ where $e$ is the base of the natural logarithm and $\hat{\beta}$ is the estimated logistic regression coefficient.) A good guess in any statistical language to calculate this is exp(coefficient). Also as a note, although this is the current accepted answer, lejohn and Frank Harrell both give very useful advice. While I would typically always want the statistics in the question reported somewhere, the other answers advice about other measures are useful ways to assess effect sizes relative to other estimated effects in the model. Graphical procedures are also useful to examine relative effect sizes, and see these two papers on turning tables into graphs as examples (Kastellec & Leoni, 2007; Gelman et al., 2002)
Reporting results of a logistic regression Your suggested reporting for a table seems reasonable, although z-values and p-values are redundant. Many journals I am familiar with don't report the z-value/p-value at all and only use asterisks to
19,498
Reporting results of a logistic regression
The answer to this question might depend on your disciplinary background. Here are some general considerations. The beta's in logistic regression are quite hard to interpret directly. Thus, reporting them explicitly is only of very limited use. You should stick to odds ratios or even to marginal effects. The marginal effect of variable x is the derivative of the probability that your dependent variables is equal to 1, with respect to x. This way of presenting results is very popular among economists. Personally I believe that marginal effects are more easily understood by laymen (but not only by them ... ) than odds ratios. Another interesting possibility is to use graphical displays. A place where you will find some illustrations of this approach is the book of Gelman and Hill. I find this even better than reporting marginal effects. Regarding the question on how to get odds ratios, here is how you can do it in R: model <- glm(y ~ x1 + x2, family=binomial("logit")) oddrat <- exp(coef(model))
Reporting results of a logistic regression
The answer to this question might depend on your disciplinary background. Here are some general considerations. The beta's in logistic regression are quite hard to interpret directly. Thus, reporting
Reporting results of a logistic regression The answer to this question might depend on your disciplinary background. Here are some general considerations. The beta's in logistic regression are quite hard to interpret directly. Thus, reporting them explicitly is only of very limited use. You should stick to odds ratios or even to marginal effects. The marginal effect of variable x is the derivative of the probability that your dependent variables is equal to 1, with respect to x. This way of presenting results is very popular among economists. Personally I believe that marginal effects are more easily understood by laymen (but not only by them ... ) than odds ratios. Another interesting possibility is to use graphical displays. A place where you will find some illustrations of this approach is the book of Gelman and Hill. I find this even better than reporting marginal effects. Regarding the question on how to get odds ratios, here is how you can do it in R: model <- glm(y ~ x1 + x2, family=binomial("logit")) oddrat <- exp(coef(model))
Reporting results of a logistic regression The answer to this question might depend on your disciplinary background. Here are some general considerations. The beta's in logistic regression are quite hard to interpret directly. Thus, reporting
19,499
Reporting results of a logistic regression
It's only in special cases where the coefficients and their anti-logs (odds ratios) are good summaries. This is when the relationships are linear and there is one coefficient associated with a predictor, and when a one-unit change is a good basis for computing the odds ratio (more O.K. for age, no so much for white blood count having a range of 500-100,000). In general, things like inter-quartile-range odds ratios are useful. I have more detail about this at http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/rms.pdf and the R rms package does all this automatically (handling nonlinear terms and interactions, compute quartiles of X, etc.).
Reporting results of a logistic regression
It's only in special cases where the coefficients and their anti-logs (odds ratios) are good summaries. This is when the relationships are linear and there is one coefficient associated with a predic
Reporting results of a logistic regression It's only in special cases where the coefficients and their anti-logs (odds ratios) are good summaries. This is when the relationships are linear and there is one coefficient associated with a predictor, and when a one-unit change is a good basis for computing the odds ratio (more O.K. for age, no so much for white blood count having a range of 500-100,000). In general, things like inter-quartile-range odds ratios are useful. I have more detail about this at http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/rms.pdf and the R rms package does all this automatically (handling nonlinear terms and interactions, compute quartiles of X, etc.).
Reporting results of a logistic regression It's only in special cases where the coefficients and their anti-logs (odds ratios) are good summaries. This is when the relationships are linear and there is one coefficient associated with a predic
19,500
Reporting results of a logistic regression
It likely depends on your audience and discipline. The answer below is what is normally done for Epidemiology journals, and to a lesser extent medical journals. To be blunt, we don't care about p-values. Seriously, we don't. Epidemiology won't even let you report them unless you have a really, really pressing need to, and the field has essentially followed suit. We might not even care about beta estimates, depending on the question. If your report is on something more methodological or simulation oriented, I'd probably report the beta estimate and standard error. If you're trying to report an effect as estimated in the population, I'd stick with the Odds Ratio and 95% Confidence Interval. That's the meat of your estimation, and what readers in that field will be looking for. Answers have been posted above for how to get the odds ratio, but for the OR & 95% CI: OR = exp(beta) 95% CI = exp(beta +/- 1.96*std error)
Reporting results of a logistic regression
It likely depends on your audience and discipline. The answer below is what is normally done for Epidemiology journals, and to a lesser extent medical journals. To be blunt, we don't care about p-valu
Reporting results of a logistic regression It likely depends on your audience and discipline. The answer below is what is normally done for Epidemiology journals, and to a lesser extent medical journals. To be blunt, we don't care about p-values. Seriously, we don't. Epidemiology won't even let you report them unless you have a really, really pressing need to, and the field has essentially followed suit. We might not even care about beta estimates, depending on the question. If your report is on something more methodological or simulation oriented, I'd probably report the beta estimate and standard error. If you're trying to report an effect as estimated in the population, I'd stick with the Odds Ratio and 95% Confidence Interval. That's the meat of your estimation, and what readers in that field will be looking for. Answers have been posted above for how to get the odds ratio, but for the OR & 95% CI: OR = exp(beta) 95% CI = exp(beta +/- 1.96*std error)
Reporting results of a logistic regression It likely depends on your audience and discipline. The answer below is what is normally done for Epidemiology journals, and to a lesser extent medical journals. To be blunt, we don't care about p-valu