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 |
|---|---|---|---|---|---|---|
38,601 | What does the assumption: "The independent variable is not random." in OLS mean? | Let's start with what the assumption means.
OLS usually motivates the outcome as random. We usually write
$$ y \vert x \sim \mathcal{N}(x^T\beta, \sigma^2) $$
The $y \vert x$ is a bit of an abuse of notation. It means that, assuming I already know $x$, then I can consider $y$ as a random draw from a normal distribut... | What does the assumption: "The independent variable is not random." in OLS mean? | Let's start with what the assumption means.
OLS usually motivates the outcome as random. We usually write
$$ y \vert x \sim \mathcal{N}(x^T\beta, \sigma^2) $$
The $y \vert x$ is a bit of an abuse of | What does the assumption: "The independent variable is not random." in OLS mean?
Let's start with what the assumption means.
OLS usually motivates the outcome as random. We usually write
$$ y \vert x \sim \mathcal{N}(x^T\beta, \sigma^2) $$
The $y \vert x$ is a bit of an abuse of notation. It means that, assuming I a... | What does the assumption: "The independent variable is not random." in OLS mean?
Let's start with what the assumption means.
OLS usually motivates the outcome as random. We usually write
$$ y \vert x \sim \mathcal{N}(x^T\beta, \sigma^2) $$
The $y \vert x$ is a bit of an abuse of |
38,602 | What does the assumption: "The independent variable is not random." in OLS mean? | Regression analysis is always done conditional on the explanatory ("independent") variables. Thus, these latter variables are always observed quantities. Mathematically, the theory of probability results in regression analysis are all conditional on these values, so they do not involve treatment of the $x_i$ valeus a... | What does the assumption: "The independent variable is not random." in OLS mean? | Regression analysis is always done conditional on the explanatory ("independent") variables. Thus, these latter variables are always observed quantities. Mathematically, the theory of probability re | What does the assumption: "The independent variable is not random." in OLS mean?
Regression analysis is always done conditional on the explanatory ("independent") variables. Thus, these latter variables are always observed quantities. Mathematically, the theory of probability results in regression analysis are all co... | What does the assumption: "The independent variable is not random." in OLS mean?
Regression analysis is always done conditional on the explanatory ("independent") variables. Thus, these latter variables are always observed quantities. Mathematically, the theory of probability re |
38,603 | How do you program a custom hypothesis test in R? | Here's what you need to do in general
Hypothesis testing functions in R create and output a list object of class h.test. This type of object has a specific set of required components set out in its documentation, and it also has a special method of printing under the print.htest setting in the global environment. Tha... | How do you program a custom hypothesis test in R? | Here's what you need to do in general
Hypothesis testing functions in R create and output a list object of class h.test. This type of object has a specific set of required components set out in its d | How do you program a custom hypothesis test in R?
Here's what you need to do in general
Hypothesis testing functions in R create and output a list object of class h.test. This type of object has a specific set of required components set out in its documentation, and it also has a special method of printing under the p... | How do you program a custom hypothesis test in R?
Here's what you need to do in general
Hypothesis testing functions in R create and output a list object of class h.test. This type of object has a specific set of required components set out in its d |
38,604 | How do you program a custom hypothesis test in R? | The hypothesis test functions in the stats package use classic S3 object-orientated programming. You write a function that creates a "htest" object, which is a list with a standard set of components, and R has a built-in print method for objects of that class. The user-level function is traditionally called something l... | How do you program a custom hypothesis test in R? | The hypothesis test functions in the stats package use classic S3 object-orientated programming. You write a function that creates a "htest" object, which is a list with a standard set of components, | How do you program a custom hypothesis test in R?
The hypothesis test functions in the stats package use classic S3 object-orientated programming. You write a function that creates a "htest" object, which is a list with a standard set of components, and R has a built-in print method for objects of that class. The user-... | How do you program a custom hypothesis test in R?
The hypothesis test functions in the stats package use classic S3 object-orientated programming. You write a function that creates a "htest" object, which is a list with a standard set of components, |
38,605 | How to find maximum likelihood estimates of an integer parameter? | You started well by writing down an expression for the likelihood. It is simpler to recognize that $Y,$ being the sum of $N$ independent Normal$(\mu,\sigma^2)$ variables, has a Normal distribution with mean $N\mu$ and variance $N\sigma^2,$ whence its likelihood is
$$\mathcal{L}(y,N) = \frac{1}{\sqrt{2\pi N\sigma^2}} \... | How to find maximum likelihood estimates of an integer parameter? | You started well by writing down an expression for the likelihood. It is simpler to recognize that $Y,$ being the sum of $N$ independent Normal$(\mu,\sigma^2)$ variables, has a Normal distribution wi | How to find maximum likelihood estimates of an integer parameter?
You started well by writing down an expression for the likelihood. It is simpler to recognize that $Y,$ being the sum of $N$ independent Normal$(\mu,\sigma^2)$ variables, has a Normal distribution with mean $N\mu$ and variance $N\sigma^2,$ whence its li... | How to find maximum likelihood estimates of an integer parameter?
You started well by writing down an expression for the likelihood. It is simpler to recognize that $Y,$ being the sum of $N$ independent Normal$(\mu,\sigma^2)$ variables, has a Normal distribution wi |
38,606 | How to find maximum likelihood estimates of an integer parameter? | The method whuber has used in his excellent answer is a common optimisation "trick" that involves extending the likelihood function to allow real values of $N$, and then using the concavity of the log-likelihood to show that the discrete maximising value is one of the discrete values on either side of a continuous opti... | How to find maximum likelihood estimates of an integer parameter? | The method whuber has used in his excellent answer is a common optimisation "trick" that involves extending the likelihood function to allow real values of $N$, and then using the concavity of the log | How to find maximum likelihood estimates of an integer parameter?
The method whuber has used in his excellent answer is a common optimisation "trick" that involves extending the likelihood function to allow real values of $N$, and then using the concavity of the log-likelihood to show that the discrete maximising value... | How to find maximum likelihood estimates of an integer parameter?
The method whuber has used in his excellent answer is a common optimisation "trick" that involves extending the likelihood function to allow real values of $N$, and then using the concavity of the log |
38,607 | How to find maximum likelihood estimates of an integer parameter? | Comment: Here is a brief simulation in R for $\mu = 50, \sigma = 3,$
which should be accurate to 2 or three places, approximating the
mean and SD of $Y.$ You should be able to find $E(Y)$ and $Var(Y)$
by elementary analytic methods as indicated in my earlier Comment.
If we had $N = 100$ then $E(\hat N)$ seems unbiased ... | How to find maximum likelihood estimates of an integer parameter? | Comment: Here is a brief simulation in R for $\mu = 50, \sigma = 3,$
which should be accurate to 2 or three places, approximating the
mean and SD of $Y.$ You should be able to find $E(Y)$ and $Var(Y)$ | How to find maximum likelihood estimates of an integer parameter?
Comment: Here is a brief simulation in R for $\mu = 50, \sigma = 3,$
which should be accurate to 2 or three places, approximating the
mean and SD of $Y.$ You should be able to find $E(Y)$ and $Var(Y)$
by elementary analytic methods as indicated in my ear... | How to find maximum likelihood estimates of an integer parameter?
Comment: Here is a brief simulation in R for $\mu = 50, \sigma = 3,$
which should be accurate to 2 or three places, approximating the
mean and SD of $Y.$ You should be able to find $E(Y)$ and $Var(Y)$ |
38,608 | Why are contours of a multivariate Gaussian distribution elliptical? | You can understand the shape of the ellipsoid better if you look at the spectral/eigen decomposition of the precision matrix (inverse of the covariance matrix). You want to look at the eigenvalues of this inverse, not the diagonal elements.
Just a supplement to the other answers: for a multivariate Normal with dimensio... | Why are contours of a multivariate Gaussian distribution elliptical? | You can understand the shape of the ellipsoid better if you look at the spectral/eigen decomposition of the precision matrix (inverse of the covariance matrix). You want to look at the eigenvalues of | Why are contours of a multivariate Gaussian distribution elliptical?
You can understand the shape of the ellipsoid better if you look at the spectral/eigen decomposition of the precision matrix (inverse of the covariance matrix). You want to look at the eigenvalues of this inverse, not the diagonal elements.
Just a sup... | Why are contours of a multivariate Gaussian distribution elliptical?
You can understand the shape of the ellipsoid better if you look at the spectral/eigen decomposition of the precision matrix (inverse of the covariance matrix). You want to look at the eigenvalues of |
38,609 | Why are contours of a multivariate Gaussian distribution elliptical? | Assume you are visualizing the distribution of a vector called $(X,Y)$ (assumed to have a bivariate normal distribution).
When $X$ and $Y$ have the same variance, the projections of the ellipse on both axes have the same length. This does mean it's a circle. It can be oblique. It's not a circle when $X$ and $Y$ are no... | Why are contours of a multivariate Gaussian distribution elliptical? | Assume you are visualizing the distribution of a vector called $(X,Y)$ (assumed to have a bivariate normal distribution).
When $X$ and $Y$ have the same variance, the projections of the ellipse on bo | Why are contours of a multivariate Gaussian distribution elliptical?
Assume you are visualizing the distribution of a vector called $(X,Y)$ (assumed to have a bivariate normal distribution).
When $X$ and $Y$ have the same variance, the projections of the ellipse on both axes have the same length. This does mean it's a... | Why are contours of a multivariate Gaussian distribution elliptical?
Assume you are visualizing the distribution of a vector called $(X,Y)$ (assumed to have a bivariate normal distribution).
When $X$ and $Y$ have the same variance, the projections of the ellipse on bo |
38,610 | Why are contours of a multivariate Gaussian distribution elliptical? | Consider this figure. Notice how both the circle and the dashed diagonal are inside the square. So, the circle is how the contours of the multivariate Gaussian looks when correlation is zero. The dashed diagonal is the contour of the perfectly correlated variables. The ovals (ellipses) are in between, when correlation ... | Why are contours of a multivariate Gaussian distribution elliptical? | Consider this figure. Notice how both the circle and the dashed diagonal are inside the square. So, the circle is how the contours of the multivariate Gaussian looks when correlation is zero. The dash | Why are contours of a multivariate Gaussian distribution elliptical?
Consider this figure. Notice how both the circle and the dashed diagonal are inside the square. So, the circle is how the contours of the multivariate Gaussian looks when correlation is zero. The dashed diagonal is the contour of the perfectly correla... | Why are contours of a multivariate Gaussian distribution elliptical?
Consider this figure. Notice how both the circle and the dashed diagonal are inside the square. So, the circle is how the contours of the multivariate Gaussian looks when correlation is zero. The dash |
38,611 | Time series prediction: Neural Network (nnetar) vs. exponential smoothing (ets) | which is the appropriate neuronal network / function for time series prediction? Please consider, that above example is just a simplified data-example.
Well, this totally depends on your data. In your example data you have
a small univariate time series (only 14 observations)
a linear trend
no white noise
no seasonal... | Time series prediction: Neural Network (nnetar) vs. exponential smoothing (ets) | which is the appropriate neuronal network / function for time series prediction? Please consider, that above example is just a simplified data-example.
Well, this totally depends on your data. In you | Time series prediction: Neural Network (nnetar) vs. exponential smoothing (ets)
which is the appropriate neuronal network / function for time series prediction? Please consider, that above example is just a simplified data-example.
Well, this totally depends on your data. In your example data you have
a small univari... | Time series prediction: Neural Network (nnetar) vs. exponential smoothing (ets)
which is the appropriate neuronal network / function for time series prediction? Please consider, that above example is just a simplified data-example.
Well, this totally depends on your data. In you |
38,612 | Time series prediction: Neural Network (nnetar) vs. exponential smoothing (ets) | That's because the data generating process is a deterministic model. This is a special case of an ARIMA(0,1,1) process, also known as exponential smoothing. Therefore the exponential smoothing model generates forecasts that match your expectation. The autoregressive neural network does not model this type of process. | Time series prediction: Neural Network (nnetar) vs. exponential smoothing (ets) | That's because the data generating process is a deterministic model. This is a special case of an ARIMA(0,1,1) process, also known as exponential smoothing. Therefore the exponential smoothing model g | Time series prediction: Neural Network (nnetar) vs. exponential smoothing (ets)
That's because the data generating process is a deterministic model. This is a special case of an ARIMA(0,1,1) process, also known as exponential smoothing. Therefore the exponential smoothing model generates forecasts that match your expec... | Time series prediction: Neural Network (nnetar) vs. exponential smoothing (ets)
That's because the data generating process is a deterministic model. This is a special case of an ARIMA(0,1,1) process, also known as exponential smoothing. Therefore the exponential smoothing model g |
38,613 | Always use Welch-t test (unequal variances t-test) instead of Student-t or Mann-Whitney test? | There have been a number of papers which examine this issue. Most of them come to the conclusion that Welch's version of the t-test can be safely used in most circumstances.
The only situation in which the test seems to have undesirable performance is in very small sample sizes.
Here are some quotes from two papers w... | Always use Welch-t test (unequal variances t-test) instead of Student-t or Mann-Whitney test? | There have been a number of papers which examine this issue. Most of them come to the conclusion that Welch's version of the t-test can be safely used in most circumstances.
The only situation in whi | Always use Welch-t test (unequal variances t-test) instead of Student-t or Mann-Whitney test?
There have been a number of papers which examine this issue. Most of them come to the conclusion that Welch's version of the t-test can be safely used in most circumstances.
The only situation in which the test seems to have ... | Always use Welch-t test (unequal variances t-test) instead of Student-t or Mann-Whitney test?
There have been a number of papers which examine this issue. Most of them come to the conclusion that Welch's version of the t-test can be safely used in most circumstances.
The only situation in whi |
38,614 | Always use Welch-t test (unequal variances t-test) instead of Student-t or Mann-Whitney test? | Do you see any drawbacks in always using the Welch-t test instead of the Student-t test or Mann-Whitney test?
Welch t-tests are inherently made for unpaired samples. If you have paired samples because you measured the same subjects twice, you should use that information. Paired sample t-tests are more powerful.
This o... | Always use Welch-t test (unequal variances t-test) instead of Student-t or Mann-Whitney test? | Do you see any drawbacks in always using the Welch-t test instead of the Student-t test or Mann-Whitney test?
Welch t-tests are inherently made for unpaired samples. If you have paired samples becaus | Always use Welch-t test (unequal variances t-test) instead of Student-t or Mann-Whitney test?
Do you see any drawbacks in always using the Welch-t test instead of the Student-t test or Mann-Whitney test?
Welch t-tests are inherently made for unpaired samples. If you have paired samples because you measured the same su... | Always use Welch-t test (unequal variances t-test) instead of Student-t or Mann-Whitney test?
Do you see any drawbacks in always using the Welch-t test instead of the Student-t test or Mann-Whitney test?
Welch t-tests are inherently made for unpaired samples. If you have paired samples becaus |
38,615 | Always use Welch-t test (unequal variances t-test) instead of Student-t or Mann-Whitney test? | As an aside, Mann-Whitney U is NOT a test of central tendency (aka median). It is a test of stochastic dominance (a random value from one sample is, on average, more likely to be higher that a random value from the other sample).
Only in some very specific (and hard to verify) cases does it become a test of the medians... | Always use Welch-t test (unequal variances t-test) instead of Student-t or Mann-Whitney test? | As an aside, Mann-Whitney U is NOT a test of central tendency (aka median). It is a test of stochastic dominance (a random value from one sample is, on average, more likely to be higher that a random | Always use Welch-t test (unequal variances t-test) instead of Student-t or Mann-Whitney test?
As an aside, Mann-Whitney U is NOT a test of central tendency (aka median). It is a test of stochastic dominance (a random value from one sample is, on average, more likely to be higher that a random value from the other sampl... | Always use Welch-t test (unequal variances t-test) instead of Student-t or Mann-Whitney test?
As an aside, Mann-Whitney U is NOT a test of central tendency (aka median). It is a test of stochastic dominance (a random value from one sample is, on average, more likely to be higher that a random |
38,616 | Machine learning courses: maths explained | To add on to @Digio, I would recommend Abu-Mostafa's Learning From Data, which contains enough statistical learning mathematics to get you excited and wanting more. | Machine learning courses: maths explained | To add on to @Digio, I would recommend Abu-Mostafa's Learning From Data, which contains enough statistical learning mathematics to get you excited and wanting more. | Machine learning courses: maths explained
To add on to @Digio, I would recommend Abu-Mostafa's Learning From Data, which contains enough statistical learning mathematics to get you excited and wanting more. | Machine learning courses: maths explained
To add on to @Digio, I would recommend Abu-Mostafa's Learning From Data, which contains enough statistical learning mathematics to get you excited and wanting more. |
38,617 | Machine learning courses: maths explained | Note, Andrew Ng has a more mathematical course in Stanford Online not Coursera.
Recommendations would always be subjective, for me, I personally like
The Elements of Statistical Learning
Convex Optimization
Both books are classical books in machine learning community and freely available.
Related question can be foun... | Machine learning courses: maths explained | Note, Andrew Ng has a more mathematical course in Stanford Online not Coursera.
Recommendations would always be subjective, for me, I personally like
The Elements of Statistical Learning
Convex Optim | Machine learning courses: maths explained
Note, Andrew Ng has a more mathematical course in Stanford Online not Coursera.
Recommendations would always be subjective, for me, I personally like
The Elements of Statistical Learning
Convex Optimization
Both books are classical books in machine learning community and freel... | Machine learning courses: maths explained
Note, Andrew Ng has a more mathematical course in Stanford Online not Coursera.
Recommendations would always be subjective, for me, I personally like
The Elements of Statistical Learning
Convex Optim |
38,618 | Machine learning courses: maths explained | Try to dig deeper in a specific topic. Ngs course only scratches the surface, but other more specific courses are more theoretical/mathematical.
Bayesian networks/ Markov networks:
Probability graphical models is a theoretical advanced coursera course on Bayesian networks/Markov networks. The book is even more theoreti... | Machine learning courses: maths explained | Try to dig deeper in a specific topic. Ngs course only scratches the surface, but other more specific courses are more theoretical/mathematical.
Bayesian networks/ Markov networks:
Probability graphic | Machine learning courses: maths explained
Try to dig deeper in a specific topic. Ngs course only scratches the surface, but other more specific courses are more theoretical/mathematical.
Bayesian networks/ Markov networks:
Probability graphical models is a theoretical advanced coursera course on Bayesian networks/Marko... | Machine learning courses: maths explained
Try to dig deeper in a specific topic. Ngs course only scratches the surface, but other more specific courses are more theoretical/mathematical.
Bayesian networks/ Markov networks:
Probability graphic |
38,619 | Machine learning courses: maths explained | This (archived) edX machine learning course from Columbia explains a lot of underlying math. For example they show regularized linear regression and probabilistic matrix factorization from Bayesian (Maximum A Posteriori) perspective.
Understanding Machine Learning is a (freely available) textbook that takes computation... | Machine learning courses: maths explained | This (archived) edX machine learning course from Columbia explains a lot of underlying math. For example they show regularized linear regression and probabilistic matrix factorization from Bayesian (M | Machine learning courses: maths explained
This (archived) edX machine learning course from Columbia explains a lot of underlying math. For example they show regularized linear regression and probabilistic matrix factorization from Bayesian (Maximum A Posteriori) perspective.
Understanding Machine Learning is a (freely ... | Machine learning courses: maths explained
This (archived) edX machine learning course from Columbia explains a lot of underlying math. For example they show regularized linear regression and probabilistic matrix factorization from Bayesian (M |
38,620 | Expected Value and Most Likely Outcome | It's not true in general that the expected value is the most likely outcome. Even for binomial distributions. For example, say we flip a fair coin 5 times. The number of heads has a binomial distribution with expected value 2.5. It's not even possible to obtain this outcome (similar to what Zen mentioned in the comment... | Expected Value and Most Likely Outcome | It's not true in general that the expected value is the most likely outcome. Even for binomial distributions. For example, say we flip a fair coin 5 times. The number of heads has a binomial distribut | Expected Value and Most Likely Outcome
It's not true in general that the expected value is the most likely outcome. Even for binomial distributions. For example, say we flip a fair coin 5 times. The number of heads has a binomial distribution with expected value 2.5. It's not even possible to obtain this outcome (simil... | Expected Value and Most Likely Outcome
It's not true in general that the expected value is the most likely outcome. Even for binomial distributions. For example, say we flip a fair coin 5 times. The number of heads has a binomial distribut |
38,621 | Is it possible to get a z-score greater than 3? | I will assume that you mean variables that are standardized by their own sample statistics.
Z-values larger than $3$ are certainly possible at $n=361$ for normally distributed data. Indeed, the largest-magnitude z-score should exceed 3 more than half the time. (If the data were drawn from a non-normal distribution, it... | Is it possible to get a z-score greater than 3? | I will assume that you mean variables that are standardized by their own sample statistics.
Z-values larger than $3$ are certainly possible at $n=361$ for normally distributed data. Indeed, the large | Is it possible to get a z-score greater than 3?
I will assume that you mean variables that are standardized by their own sample statistics.
Z-values larger than $3$ are certainly possible at $n=361$ for normally distributed data. Indeed, the largest-magnitude z-score should exceed 3 more than half the time. (If the da... | Is it possible to get a z-score greater than 3?
I will assume that you mean variables that are standardized by their own sample statistics.
Z-values larger than $3$ are certainly possible at $n=361$ for normally distributed data. Indeed, the large |
38,622 | Is it possible to get a z-score greater than 3? | For a data point $x$ and a distribution with mean $\mu$ and standard deviation $\sigma$, the z-score is just $(x-\mu) / \sigma$. So, a high z-score means the data point is many standard deviations away from the mean. This could happen as a matter of course with heavy/long tailed distributions, or could signify outliers... | Is it possible to get a z-score greater than 3? | For a data point $x$ and a distribution with mean $\mu$ and standard deviation $\sigma$, the z-score is just $(x-\mu) / \sigma$. So, a high z-score means the data point is many standard deviations awa | Is it possible to get a z-score greater than 3?
For a data point $x$ and a distribution with mean $\mu$ and standard deviation $\sigma$, the z-score is just $(x-\mu) / \sigma$. So, a high z-score means the data point is many standard deviations away from the mean. This could happen as a matter of course with heavy/long... | Is it possible to get a z-score greater than 3?
For a data point $x$ and a distribution with mean $\mu$ and standard deviation $\sigma$, the z-score is just $(x-\mu) / \sigma$. So, a high z-score means the data point is many standard deviations awa |
38,623 | Is it possible to get a z-score greater than 3? | This is an old question, but just to add another example here to illustrate how this can happen. Lets randomly generate a set of data on IQ scores that is normally distributed but has one extreme outlier: a really, really smart kid:
#### Load Libary and Set Random Seed ####
library(tidyverse)
set.seed(123)
#### Create... | Is it possible to get a z-score greater than 3? | This is an old question, but just to add another example here to illustrate how this can happen. Lets randomly generate a set of data on IQ scores that is normally distributed but has one extreme outl | Is it possible to get a z-score greater than 3?
This is an old question, but just to add another example here to illustrate how this can happen. Lets randomly generate a set of data on IQ scores that is normally distributed but has one extreme outlier: a really, really smart kid:
#### Load Libary and Set Random Seed ##... | Is it possible to get a z-score greater than 3?
This is an old question, but just to add another example here to illustrate how this can happen. Lets randomly generate a set of data on IQ scores that is normally distributed but has one extreme outl |
38,624 | Lasso Regression for predicting Continuous Variable + Variable Selection? | Be sure to install and load the glmnet package.
install.packages("glmnet")
library(glmnet)
First you need to form a matrix with all your predictors, we call that matrix $\mathbf{X}$. I have done this for three variables I have created but since you have more you will need to change the predictor matrix accordingly.
... | Lasso Regression for predicting Continuous Variable + Variable Selection? | Be sure to install and load the glmnet package.
install.packages("glmnet")
library(glmnet)
First you need to form a matrix with all your predictors, we call that matrix $\mathbf{X}$. I have done this | Lasso Regression for predicting Continuous Variable + Variable Selection?
Be sure to install and load the glmnet package.
install.packages("glmnet")
library(glmnet)
First you need to form a matrix with all your predictors, we call that matrix $\mathbf{X}$. I have done this for three variables I have created but since ... | Lasso Regression for predicting Continuous Variable + Variable Selection?
Be sure to install and load the glmnet package.
install.packages("glmnet")
library(glmnet)
First you need to form a matrix with all your predictors, we call that matrix $\mathbf{X}$. I have done this |
38,625 | Lasso Regression for predicting Continuous Variable + Variable Selection? | You might be better off using ridge regression rather than LASSO, or devising a scale that combines some of the correlated variables in an intelligent way, based on your knowledge of the subject matter. LASSO will not select the variables that are "driving the system," just a subset that happens to work on this data sa... | Lasso Regression for predicting Continuous Variable + Variable Selection? | You might be better off using ridge regression rather than LASSO, or devising a scale that combines some of the correlated variables in an intelligent way, based on your knowledge of the subject matte | Lasso Regression for predicting Continuous Variable + Variable Selection?
You might be better off using ridge regression rather than LASSO, or devising a scale that combines some of the correlated variables in an intelligent way, based on your knowledge of the subject matter. LASSO will not select the variables that ar... | Lasso Regression for predicting Continuous Variable + Variable Selection?
You might be better off using ridge regression rather than LASSO, or devising a scale that combines some of the correlated variables in an intelligent way, based on your knowledge of the subject matte |
38,626 | Lasso Regression for predicting Continuous Variable + Variable Selection? | The one thing that I hate about glmnet is that it doesn't use data frames as an argument. In order to use glmnet, a data frame needs to be transformed into a model matrix and a response vector. Most model functions, like lm and glm, allow for formulas and data frames.
The caret package is a wrapper for many modelling p... | Lasso Regression for predicting Continuous Variable + Variable Selection? | The one thing that I hate about glmnet is that it doesn't use data frames as an argument. In order to use glmnet, a data frame needs to be transformed into a model matrix and a response vector. Most m | Lasso Regression for predicting Continuous Variable + Variable Selection?
The one thing that I hate about glmnet is that it doesn't use data frames as an argument. In order to use glmnet, a data frame needs to be transformed into a model matrix and a response vector. Most model functions, like lm and glm, allow for for... | Lasso Regression for predicting Continuous Variable + Variable Selection?
The one thing that I hate about glmnet is that it doesn't use data frames as an argument. In order to use glmnet, a data frame needs to be transformed into a model matrix and a response vector. Most m |
38,627 | How to interpret ridge regression plot | The ridge regression will penalize your coefficients, such that those that are the least effective in your estimation will "shrink" the fastest.
Imagine you have a budget allocated and each coefficient can take some to play a role in the estimation. Naturally those who are more important will take more of the budget. A... | How to interpret ridge regression plot | The ridge regression will penalize your coefficients, such that those that are the least effective in your estimation will "shrink" the fastest.
Imagine you have a budget allocated and each coefficien | How to interpret ridge regression plot
The ridge regression will penalize your coefficients, such that those that are the least effective in your estimation will "shrink" the fastest.
Imagine you have a budget allocated and each coefficient can take some to play a role in the estimation. Naturally those who are more im... | How to interpret ridge regression plot
The ridge regression will penalize your coefficients, such that those that are the least effective in your estimation will "shrink" the fastest.
Imagine you have a budget allocated and each coefficien |
38,628 | How to interpret ridge regression plot | I know you say
I am interested in explanation and not prediction
but this is a road fraught with dangers. A model that does not predict its response well is not useful for explanation. Explanation and prediction are not independent desires, one should complement and enhance the other at all times, in both directions... | How to interpret ridge regression plot | I know you say
I am interested in explanation and not prediction
but this is a road fraught with dangers. A model that does not predict its response well is not useful for explanation. Explanation | How to interpret ridge regression plot
I know you say
I am interested in explanation and not prediction
but this is a road fraught with dangers. A model that does not predict its response well is not useful for explanation. Explanation and prediction are not independent desires, one should complement and enhance the... | How to interpret ridge regression plot
I know you say
I am interested in explanation and not prediction
but this is a road fraught with dangers. A model that does not predict its response well is not useful for explanation. Explanation |
38,629 | How to interpret ridge regression plot | Better check this?
http://www.mathworks.com/help/stats/ridge.html
There is a better picture an several more examples..... Though i dont know if you have Matlab...
EDIT - Command execution
Both the plot on the question and the image on the link show the ridge traces, showing the $k$ regularization coefficient on the x-a... | How to interpret ridge regression plot | Better check this?
http://www.mathworks.com/help/stats/ridge.html
There is a better picture an several more examples..... Though i dont know if you have Matlab...
EDIT - Command execution
Both the plo | How to interpret ridge regression plot
Better check this?
http://www.mathworks.com/help/stats/ridge.html
There is a better picture an several more examples..... Though i dont know if you have Matlab...
EDIT - Command execution
Both the plot on the question and the image on the link show the ridge traces, showing the $k... | How to interpret ridge regression plot
Better check this?
http://www.mathworks.com/help/stats/ridge.html
There is a better picture an several more examples..... Though i dont know if you have Matlab...
EDIT - Command execution
Both the plo |
38,630 | How to interpret ridge regression plot | One thing to watch out for is when a coefficient crosses zero, as Year does in the example.
If you made future predictions without regularization
$(\lambda = 0)$, you have a negative trend over time; however, this is an artifact of multicollinearity in the data.
With not very much regularization $(\lambda > 0.005)$, ... | How to interpret ridge regression plot | One thing to watch out for is when a coefficient crosses zero, as Year does in the example.
If you made future predictions without regularization
$(\lambda = 0)$, you have a negative trend over time | How to interpret ridge regression plot
One thing to watch out for is when a coefficient crosses zero, as Year does in the example.
If you made future predictions without regularization
$(\lambda = 0)$, you have a negative trend over time; however, this is an artifact of multicollinearity in the data.
With not very mu... | How to interpret ridge regression plot
One thing to watch out for is when a coefficient crosses zero, as Year does in the example.
If you made future predictions without regularization
$(\lambda = 0)$, you have a negative trend over time |
38,631 | versus (vs.): how to properly use this word in data analysis | On plotting: I regard it as natural and conventional to say -- for scatter plots, line plots, and so forth -- that I plot Y versus X and in each case always to mention the response first and the other variable second. Thus I (say that I) plot temperature versus or against time, and wheat yield versus or against rainfal... | versus (vs.): how to properly use this word in data analysis | On plotting: I regard it as natural and conventional to say -- for scatter plots, line plots, and so forth -- that I plot Y versus X and in each case always to mention the response first and the other | versus (vs.): how to properly use this word in data analysis
On plotting: I regard it as natural and conventional to say -- for scatter plots, line plots, and so forth -- that I plot Y versus X and in each case always to mention the response first and the other variable second. Thus I (say that I) plot temperature vers... | versus (vs.): how to properly use this word in data analysis
On plotting: I regard it as natural and conventional to say -- for scatter plots, line plots, and so forth -- that I plot Y versus X and in each case always to mention the response first and the other |
38,632 | versus (vs.): how to properly use this word in data analysis | On meta.CV, @Glen_b argues that "versus" isn't really a technical term in statistics. I agree. I think it is typically used in a loose and colloquial way. When used in a statistical context, the term mostly denotes comparison (as opposed to its sports-related competitive meaning).
Thus, it is natural to apply "ver... | versus (vs.): how to properly use this word in data analysis | On meta.CV, @Glen_b argues that "versus" isn't really a technical term in statistics. I agree. I think it is typically used in a loose and colloquial way. When used in a statistical context, the te | versus (vs.): how to properly use this word in data analysis
On meta.CV, @Glen_b argues that "versus" isn't really a technical term in statistics. I agree. I think it is typically used in a loose and colloquial way. When used in a statistical context, the term mostly denotes comparison (as opposed to its sports-rela... | versus (vs.): how to properly use this word in data analysis
On meta.CV, @Glen_b argues that "versus" isn't really a technical term in statistics. I agree. I think it is typically used in a loose and colloquial way. When used in a statistical context, the te |
38,633 | versus (vs.): how to properly use this word in data analysis | Versus just means "difference." It does not imply any kind of baseline-treatment relationship. You have a mean for Group A and mean for Group B. Testing A vs. B tests if the differences in the means is significantly greater than zero. Testing B vs. A is the same thing. Casual relationships or identifying one of the gro... | versus (vs.): how to properly use this word in data analysis | Versus just means "difference." It does not imply any kind of baseline-treatment relationship. You have a mean for Group A and mean for Group B. Testing A vs. B tests if the differences in the means i | versus (vs.): how to properly use this word in data analysis
Versus just means "difference." It does not imply any kind of baseline-treatment relationship. You have a mean for Group A and mean for Group B. Testing A vs. B tests if the differences in the means is significantly greater than zero. Testing B vs. A is the s... | versus (vs.): how to properly use this word in data analysis
Versus just means "difference." It does not imply any kind of baseline-treatment relationship. You have a mean for Group A and mean for Group B. Testing A vs. B tests if the differences in the means i |
38,634 | Conceptual understanding of standard deviation vs average distance from the mean | The standard deviation is the square root of the variance, as you might know. The variance is calculated by summing up the squared deviation from the mean, and dividing it by $n$.
$$\sigma^2 = \frac{\sum_{i}^{n} (x_i-\mu)^2 }{n}$$
Every difference $(x-\mu)$ is squared. When you take the square root of the variance, it... | Conceptual understanding of standard deviation vs average distance from the mean | The standard deviation is the square root of the variance, as you might know. The variance is calculated by summing up the squared deviation from the mean, and dividing it by $n$.
$$\sigma^2 = \frac{ | Conceptual understanding of standard deviation vs average distance from the mean
The standard deviation is the square root of the variance, as you might know. The variance is calculated by summing up the squared deviation from the mean, and dividing it by $n$.
$$\sigma^2 = \frac{\sum_{i}^{n} (x_i-\mu)^2 }{n}$$
Every d... | Conceptual understanding of standard deviation vs average distance from the mean
The standard deviation is the square root of the variance, as you might know. The variance is calculated by summing up the squared deviation from the mean, and dividing it by $n$.
$$\sigma^2 = \frac{ |
38,635 | Conceptual understanding of standard deviation vs average distance from the mean | Basil covered the essential issue (that the average distance from the mean is not the same thing as the standard deviation), but I think there's some additional points that should be added to that.
The mean of the absolute deviations (from the mean) - which is the average distance from the mean - will always be $\leq$ ... | Conceptual understanding of standard deviation vs average distance from the mean | Basil covered the essential issue (that the average distance from the mean is not the same thing as the standard deviation), but I think there's some additional points that should be added to that.
Th | Conceptual understanding of standard deviation vs average distance from the mean
Basil covered the essential issue (that the average distance from the mean is not the same thing as the standard deviation), but I think there's some additional points that should be added to that.
The mean of the absolute deviations (from... | Conceptual understanding of standard deviation vs average distance from the mean
Basil covered the essential issue (that the average distance from the mean is not the same thing as the standard deviation), but I think there's some additional points that should be added to that.
Th |
38,636 | Covariance greater than Variance? | I am not quite sure what the question is asking.
The absolute value of $\operatorname{cov}(X,Y)$, the covariance of $X$ and $Y$
is no larger than $\sigma_X\sigma_Y$ which is the geometric mean
of the variances of $X$ and $Y$.
Since
$$\min\{\sigma^2_X,\, \sigma^2_Y\} \leq \sigma_X\sigma_Y
\leq \max\{\sigma^2_X,\, \sig... | Covariance greater than Variance? | I am not quite sure what the question is asking.
The absolute value of $\operatorname{cov}(X,Y)$, the covariance of $X$ and $Y$
is no larger than $\sigma_X\sigma_Y$ which is the geometric mean
of the | Covariance greater than Variance?
I am not quite sure what the question is asking.
The absolute value of $\operatorname{cov}(X,Y)$, the covariance of $X$ and $Y$
is no larger than $\sigma_X\sigma_Y$ which is the geometric mean
of the variances of $X$ and $Y$.
Since
$$\min\{\sigma^2_X,\, \sigma^2_Y\} \leq \sigma_X\sigm... | Covariance greater than Variance?
I am not quite sure what the question is asking.
The absolute value of $\operatorname{cov}(X,Y)$, the covariance of $X$ and $Y$
is no larger than $\sigma_X\sigma_Y$ which is the geometric mean
of the |
38,637 | Covariance greater than Variance? | Unless I've made some mistake (which I may have, I'm not clear-headed right now):
$\text{Cov}(X,Y)/\text{Var}(X) = \rho \sigma_y/\sigma_x$ can be made smaller or larger by choosing different units for $x$ or $y$ (e.g. going from dollars to cents or meters to millimeters or vice-versa).
As a result, I think you can do i... | Covariance greater than Variance? | Unless I've made some mistake (which I may have, I'm not clear-headed right now):
$\text{Cov}(X,Y)/\text{Var}(X) = \rho \sigma_y/\sigma_x$ can be made smaller or larger by choosing different units for | Covariance greater than Variance?
Unless I've made some mistake (which I may have, I'm not clear-headed right now):
$\text{Cov}(X,Y)/\text{Var}(X) = \rho \sigma_y/\sigma_x$ can be made smaller or larger by choosing different units for $x$ or $y$ (e.g. going from dollars to cents or meters to millimeters or vice-versa).... | Covariance greater than Variance?
Unless I've made some mistake (which I may have, I'm not clear-headed right now):
$\text{Cov}(X,Y)/\text{Var}(X) = \rho \sigma_y/\sigma_x$ can be made smaller or larger by choosing different units for |
38,638 | Covariance greater than Variance? | The trees data from the R datasets package:
This data set provides measurements of the girth, height and volume of
timber in 31 felled black cherry trees. Note that girth is the
diameter of the tree (in inches) measured at 4 ft 6 in above the
ground.
The correlation between girth & height is $0.52$, while the ... | Covariance greater than Variance? | The trees data from the R datasets package:
This data set provides measurements of the girth, height and volume of
timber in 31 felled black cherry trees. Note that girth is the
diameter of the | Covariance greater than Variance?
The trees data from the R datasets package:
This data set provides measurements of the girth, height and volume of
timber in 31 felled black cherry trees. Note that girth is the
diameter of the tree (in inches) measured at 4 ft 6 in above the
ground.
The correlation between gi... | Covariance greater than Variance?
The trees data from the R datasets package:
This data set provides measurements of the girth, height and volume of
timber in 31 felled black cherry trees. Note that girth is the
diameter of the |
38,639 | Distribution of linear combination of OLS regression coefficients | It's actually not true that your variables need to be independent so that their sum will be normal.
If X and Y are jointly normally distributed with mean $\mu_{1} $ and $\mu_{2} $ and variance $\sigma_{1}^{2}$ and $\sigma_{2}^{2}$ with correlation $\rho $ then Z is still normally distributed with mean $\mu_{1}+\mu_{2}... | Distribution of linear combination of OLS regression coefficients | It's actually not true that your variables need to be independent so that their sum will be normal.
If X and Y are jointly normally distributed with mean $\mu_{1} $ and $\mu_{2} $ and variance $\sigm | Distribution of linear combination of OLS regression coefficients
It's actually not true that your variables need to be independent so that their sum will be normal.
If X and Y are jointly normally distributed with mean $\mu_{1} $ and $\mu_{2} $ and variance $\sigma_{1}^{2}$ and $\sigma_{2}^{2}$ with correlation $\rho... | Distribution of linear combination of OLS regression coefficients
It's actually not true that your variables need to be independent so that their sum will be normal.
If X and Y are jointly normally distributed with mean $\mu_{1} $ and $\mu_{2} $ and variance $\sigm |
38,640 | Distribution of linear combination of OLS regression coefficients | it would be better to explain this in matrix notation. Suppose the general Gauss-Markov linear model $$\mathbf{y = X \boldsymbol \beta + \boldsymbol \epsilon}$$For your case, $\mathbf{X}$ = ($\mathbf{1}$, $\mathbf{x_1}$, $\mathbf{x_2}$) and $\mathbf{\boldsymbol \beta} = (\alpha, \; \beta_1 \; \beta_2)'.$
The OLS estima... | Distribution of linear combination of OLS regression coefficients | it would be better to explain this in matrix notation. Suppose the general Gauss-Markov linear model $$\mathbf{y = X \boldsymbol \beta + \boldsymbol \epsilon}$$For your case, $\mathbf{X}$ = ($\mathbf{ | Distribution of linear combination of OLS regression coefficients
it would be better to explain this in matrix notation. Suppose the general Gauss-Markov linear model $$\mathbf{y = X \boldsymbol \beta + \boldsymbol \epsilon}$$For your case, $\mathbf{X}$ = ($\mathbf{1}$, $\mathbf{x_1}$, $\mathbf{x_2}$) and $\mathbf{\bol... | Distribution of linear combination of OLS regression coefficients
it would be better to explain this in matrix notation. Suppose the general Gauss-Markov linear model $$\mathbf{y = X \boldsymbol \beta + \boldsymbol \epsilon}$$For your case, $\mathbf{X}$ = ($\mathbf{ |
38,641 | How to get a valid distance metric? | First of all, in many applications you do not need a distance metric, but a dissimilarity will be okay. So make sure that triangle inequality is needed.
In mathematics, triangle inequality is part of the definition of a metric, and distances in mathematics are synonymous to metrics. But in database literature, often di... | How to get a valid distance metric? | First of all, in many applications you do not need a distance metric, but a dissimilarity will be okay. So make sure that triangle inequality is needed.
In mathematics, triangle inequality is part of | How to get a valid distance metric?
First of all, in many applications you do not need a distance metric, but a dissimilarity will be okay. So make sure that triangle inequality is needed.
In mathematics, triangle inequality is part of the definition of a metric, and distances in mathematics are synonymous to metrics. ... | How to get a valid distance metric?
First of all, in many applications you do not need a distance metric, but a dissimilarity will be okay. So make sure that triangle inequality is needed.
In mathematics, triangle inequality is part of |
38,642 | How to get a valid distance metric? | What are the proper distance metric? Please name some examples.
Euclidean distance, Levenshtein distance, Manhattan distance. As you write, any distance metric satisfies the definition of a distance, so there are quite a number of them. In one of Gunnar Carlsson's articles on topological data analysis, he uses (what I... | How to get a valid distance metric? | What are the proper distance metric? Please name some examples.
Euclidean distance, Levenshtein distance, Manhattan distance. As you write, any distance metric satisfies the definition of a distance, | How to get a valid distance metric?
What are the proper distance metric? Please name some examples.
Euclidean distance, Levenshtein distance, Manhattan distance. As you write, any distance metric satisfies the definition of a distance, so there are quite a number of them. In one of Gunnar Carlsson's articles on topolo... | How to get a valid distance metric?
What are the proper distance metric? Please name some examples.
Euclidean distance, Levenshtein distance, Manhattan distance. As you write, any distance metric satisfies the definition of a distance, |
38,643 | How to get a valid distance metric? | The choice of the metric depends on your problem. See this answer for a discussion on the cosine similarity and how to build a distance function based on it. Also, there is a reference on a paper discussing the issue of distance functions in a high dimensional setting.
The problem with cross product is that you need to... | How to get a valid distance metric? | The choice of the metric depends on your problem. See this answer for a discussion on the cosine similarity and how to build a distance function based on it. Also, there is a reference on a paper disc | How to get a valid distance metric?
The choice of the metric depends on your problem. See this answer for a discussion on the cosine similarity and how to build a distance function based on it. Also, there is a reference on a paper discussing the issue of distance functions in a high dimensional setting.
The problem wi... | How to get a valid distance metric?
The choice of the metric depends on your problem. See this answer for a discussion on the cosine similarity and how to build a distance function based on it. Also, there is a reference on a paper disc |
38,644 | What is the name of a distribution within $[a, b]$ but with a sloped straight line density? | A distribution with a linear PDF can be considered a special case of a (truncated) Pareto distribution, Beta distribution, or power distribution. Only particular values of the parameters in these distribution families will give a linear PDF, of course.
Among other things, such a distribution is a truncated Generalize... | What is the name of a distribution within $[a, b]$ but with a sloped straight line density? | A distribution with a linear PDF can be considered a special case of a (truncated) Pareto distribution, Beta distribution, or power distribution. Only particular values of the parameters in these dis | What is the name of a distribution within $[a, b]$ but with a sloped straight line density?
A distribution with a linear PDF can be considered a special case of a (truncated) Pareto distribution, Beta distribution, or power distribution. Only particular values of the parameters in these distribution families will give... | What is the name of a distribution within $[a, b]$ but with a sloped straight line density?
A distribution with a linear PDF can be considered a special case of a (truncated) Pareto distribution, Beta distribution, or power distribution. Only particular values of the parameters in these dis |
38,645 | What is the name of a distribution within $[a, b]$ but with a sloped straight line density? | It might be the triangular distribution. The general triangular distribution with support $[a,b]$ has 1 parameter $c\in[a,b]$ corresponding to the mode. When $c=a$ or $c=b$, the p.d.f. is a straight line segment. | What is the name of a distribution within $[a, b]$ but with a sloped straight line density? | It might be the triangular distribution. The general triangular distribution with support $[a,b]$ has 1 parameter $c\in[a,b]$ corresponding to the mode. When $c=a$ or $c=b$, the p.d.f. is a straight l | What is the name of a distribution within $[a, b]$ but with a sloped straight line density?
It might be the triangular distribution. The general triangular distribution with support $[a,b]$ has 1 parameter $c\in[a,b]$ corresponding to the mode. When $c=a$ or $c=b$, the p.d.f. is a straight line segment. | What is the name of a distribution within $[a, b]$ but with a sloped straight line density?
It might be the triangular distribution. The general triangular distribution with support $[a,b]$ has 1 parameter $c\in[a,b]$ corresponding to the mode. When $c=a$ or $c=b$, the p.d.f. is a straight l |
38,646 | Why does Fisher's method yield $p\gg 0.5$ when combining several p-values all equal to $0.5$? | The way that Fisher's approach measures the combined effect of p-values is to effectively look at their product (the ordering of possible statistics when adding the logs is the same as when taking the product). It then asks whether this is unusually low compared to what you'd find with random p-values when the null is ... | Why does Fisher's method yield $p\gg 0.5$ when combining several p-values all equal to $0.5$? | The way that Fisher's approach measures the combined effect of p-values is to effectively look at their product (the ordering of possible statistics when adding the logs is the same as when taking the | Why does Fisher's method yield $p\gg 0.5$ when combining several p-values all equal to $0.5$?
The way that Fisher's approach measures the combined effect of p-values is to effectively look at their product (the ordering of possible statistics when adding the logs is the same as when taking the product). It then asks wh... | Why does Fisher's method yield $p\gg 0.5$ when combining several p-values all equal to $0.5$?
The way that Fisher's approach measures the combined effect of p-values is to effectively look at their product (the ordering of possible statistics when adding the logs is the same as when taking the |
38,647 | Why does Fisher's method yield $p\gg 0.5$ when combining several p-values all equal to $0.5$? | A p-value of 0.5 is not the "most insignificant p-value". It says that if the null hypothesis is true, than 50% of the time you would expect a result that is at least as extreme as the observed result. You could call that a "typical" result under the null hypothesis, but certainly not "most insignificant". A p-value of... | Why does Fisher's method yield $p\gg 0.5$ when combining several p-values all equal to $0.5$? | A p-value of 0.5 is not the "most insignificant p-value". It says that if the null hypothesis is true, than 50% of the time you would expect a result that is at least as extreme as the observed result | Why does Fisher's method yield $p\gg 0.5$ when combining several p-values all equal to $0.5$?
A p-value of 0.5 is not the "most insignificant p-value". It says that if the null hypothesis is true, than 50% of the time you would expect a result that is at least as extreme as the observed result. You could call that a "t... | Why does Fisher's method yield $p\gg 0.5$ when combining several p-values all equal to $0.5$?
A p-value of 0.5 is not the "most insignificant p-value". It says that if the null hypothesis is true, than 50% of the time you would expect a result that is at least as extreme as the observed result |
38,648 | How to smear a histogram | There appears to be a difference in terminology (as so often is the case with a discipline used in so many areas), so I'm not 100% sure, but I think they're referring to kernel density estimation, with a Gaussian kernel, but performed on binned data.
[Edit: if someone familiar with how the term "Gaussian smearing" is u... | How to smear a histogram | There appears to be a difference in terminology (as so often is the case with a discipline used in so many areas), so I'm not 100% sure, but I think they're referring to kernel density estimation, wit | How to smear a histogram
There appears to be a difference in terminology (as so often is the case with a discipline used in so many areas), so I'm not 100% sure, but I think they're referring to kernel density estimation, with a Gaussian kernel, but performed on binned data.
[Edit: if someone familiar with how the term... | How to smear a histogram
There appears to be a difference in terminology (as so often is the case with a discipline used in so many areas), so I'm not 100% sure, but I think they're referring to kernel density estimation, wit |
38,649 | How to smear a histogram | The requester is probably referring to a kernel density smoother as Glen_b notes, but "smearing" is evocative of the shadowgram featured in the book Visual Statistics. To address the issue of choosing the right bin or kernel width, the shadowgram is a overlay of many different width choices. | How to smear a histogram | The requester is probably referring to a kernel density smoother as Glen_b notes, but "smearing" is evocative of the shadowgram featured in the book Visual Statistics. To address the issue of choosing | How to smear a histogram
The requester is probably referring to a kernel density smoother as Glen_b notes, but "smearing" is evocative of the shadowgram featured in the book Visual Statistics. To address the issue of choosing the right bin or kernel width, the shadowgram is a overlay of many different width choices. | How to smear a histogram
The requester is probably referring to a kernel density smoother as Glen_b notes, but "smearing" is evocative of the shadowgram featured in the book Visual Statistics. To address the issue of choosing |
38,650 | When using linear regression analysis to get the fitted values of an outcome, why do the more extreme values tend to be predicted closer to the mean? | Basically, it's because the regression isn't perfect.
Suppose you had purely random data - no relation between the dependent and independent variables. Then the best prediction of the DV for every subject would be the mean of the DV.
Suppose you had a perfect relationship; then you be able to exactly predict the DV.
In... | When using linear regression analysis to get the fitted values of an outcome, why do the more extrem | Basically, it's because the regression isn't perfect.
Suppose you had purely random data - no relation between the dependent and independent variables. Then the best prediction of the DV for every sub | When using linear regression analysis to get the fitted values of an outcome, why do the more extreme values tend to be predicted closer to the mean?
Basically, it's because the regression isn't perfect.
Suppose you had purely random data - no relation between the dependent and independent variables. Then the best pred... | When using linear regression analysis to get the fitted values of an outcome, why do the more extrem
Basically, it's because the regression isn't perfect.
Suppose you had purely random data - no relation between the dependent and independent variables. Then the best prediction of the DV for every sub |
38,651 | When using linear regression analysis to get the fitted values of an outcome, why do the more extreme values tend to be predicted closer to the mean? | Usual conventions
The usual conventional name and definition are
residuals = outcome $-$ fitted
Similarly, the usual conventional plot is residuals (y axis) versus fitted (x axis).
In R, given something like
mymodel = lm(outcome ~ predictor1 + predictor2 + predictor3)
then
plot(mymodel)
gives that plot as on... | When using linear regression analysis to get the fitted values of an outcome, why do the more extrem | Usual conventions
The usual conventional name and definition are
residuals = outcome $-$ fitted
Similarly, the usual conventional plot is residuals (y axis) versus fitted (x axis).
In R, given so | When using linear regression analysis to get the fitted values of an outcome, why do the more extreme values tend to be predicted closer to the mean?
Usual conventions
The usual conventional name and definition are
residuals = outcome $-$ fitted
Similarly, the usual conventional plot is residuals (y axis) versus fi... | When using linear regression analysis to get the fitted values of an outcome, why do the more extrem
Usual conventions
The usual conventional name and definition are
residuals = outcome $-$ fitted
Similarly, the usual conventional plot is residuals (y axis) versus fitted (x axis).
In R, given so |
38,652 | When using linear regression analysis to get the fitted values of an outcome, why do the more extreme values tend to be predicted closer to the mean? | This figure shows that there seems to be a significant variable you are missing.
Because the residuals have a clear trend, i.e containing important information.
If you have not more variable on the data, maybe you could try the interactions. | When using linear regression analysis to get the fitted values of an outcome, why do the more extrem | This figure shows that there seems to be a significant variable you are missing.
Because the residuals have a clear trend, i.e containing important information.
If you have not more variable on the da | When using linear regression analysis to get the fitted values of an outcome, why do the more extreme values tend to be predicted closer to the mean?
This figure shows that there seems to be a significant variable you are missing.
Because the residuals have a clear trend, i.e containing important information.
If you ha... | When using linear regression analysis to get the fitted values of an outcome, why do the more extrem
This figure shows that there seems to be a significant variable you are missing.
Because the residuals have a clear trend, i.e containing important information.
If you have not more variable on the da |
38,653 | When using linear regression analysis to get the fitted values of an outcome, why do the more extreme values tend to be predicted closer to the mean? | The concept is not new and is called Regression to the Mean, or Regression towards the Mean, see here for history and detail. In fact the story goes that this is how regression analysis (linear models, least squares, etc.) ended up being called "regression". | When using linear regression analysis to get the fitted values of an outcome, why do the more extrem | The concept is not new and is called Regression to the Mean, or Regression towards the Mean, see here for history and detail. In fact the story goes that this is how regression analysis (linear model | When using linear regression analysis to get the fitted values of an outcome, why do the more extreme values tend to be predicted closer to the mean?
The concept is not new and is called Regression to the Mean, or Regression towards the Mean, see here for history and detail. In fact the story goes that this is how reg... | When using linear regression analysis to get the fitted values of an outcome, why do the more extrem
The concept is not new and is called Regression to the Mean, or Regression towards the Mean, see here for history and detail. In fact the story goes that this is how regression analysis (linear model |
38,654 | Performance evaluation of a model: MAPE in R | You could always code it yourself:
mape <- function(y, yhat)
mean(abs((y - yhat)/y)) | Performance evaluation of a model: MAPE in R | You could always code it yourself:
mape <- function(y, yhat)
mean(abs((y - yhat)/y)) | Performance evaluation of a model: MAPE in R
You could always code it yourself:
mape <- function(y, yhat)
mean(abs((y - yhat)/y)) | Performance evaluation of a model: MAPE in R
You could always code it yourself:
mape <- function(y, yhat)
mean(abs((y - yhat)/y)) |
38,655 | Performance evaluation of a model: MAPE in R | For MAPE, use the following function:
mape <- function(actual,pred){
mape <- mean(abs((actual - pred)/actual))*100
return (mape)
}
For the formula, you can refer to the following link:
http://www.forecastpro.com/Trends/forecasting101August2011.html | Performance evaluation of a model: MAPE in R | For MAPE, use the following function:
mape <- function(actual,pred){
mape <- mean(abs((actual - pred)/actual))*100
return (mape)
}
For the formula, you can refer to the | Performance evaluation of a model: MAPE in R
For MAPE, use the following function:
mape <- function(actual,pred){
mape <- mean(abs((actual - pred)/actual))*100
return (mape)
}
For the formula, you can refer to the following link:
http://www.forecastpro.com/Trends/forecasting101August2011.... | Performance evaluation of a model: MAPE in R
For MAPE, use the following function:
mape <- function(actual,pred){
mape <- mean(abs((actual - pred)/actual))*100
return (mape)
}
For the formula, you can refer to the |
38,656 | Are there examples of more informative PCA plots? [duplicate] | In my humble opinion, it depends on what you want out of the PCA, but that there are two simple plots that are quite common and might be helpful:
To know which variables have high loadings in which principal component, a simple barplot of loadings (as small multiples) will display this pretty clearly.
To look for patt... | Are there examples of more informative PCA plots? [duplicate] | In my humble opinion, it depends on what you want out of the PCA, but that there are two simple plots that are quite common and might be helpful:
To know which variables have high loadings in which p | Are there examples of more informative PCA plots? [duplicate]
In my humble opinion, it depends on what you want out of the PCA, but that there are two simple plots that are quite common and might be helpful:
To know which variables have high loadings in which principal component, a simple barplot of loadings (as small... | Are there examples of more informative PCA plots? [duplicate]
In my humble opinion, it depends on what you want out of the PCA, but that there are two simple plots that are quite common and might be helpful:
To know which variables have high loadings in which p |
38,657 | Are there examples of more informative PCA plots? [duplicate] | Here are a few clues.
Depending on what the variables are, the loadings themselves can be very informative. For example, in PCAs derived from gene expression data, I can use the loadings in combination with Gene Ontology to test for enrichment of particular terms in the variables with large absolute loadings.
Biplots ... | Are there examples of more informative PCA plots? [duplicate] | Here are a few clues.
Depending on what the variables are, the loadings themselves can be very informative. For example, in PCAs derived from gene expression data, I can use the loadings in combinati | Are there examples of more informative PCA plots? [duplicate]
Here are a few clues.
Depending on what the variables are, the loadings themselves can be very informative. For example, in PCAs derived from gene expression data, I can use the loadings in combination with Gene Ontology to test for enrichment of particular... | Are there examples of more informative PCA plots? [duplicate]
Here are a few clues.
Depending on what the variables are, the loadings themselves can be very informative. For example, in PCAs derived from gene expression data, I can use the loadings in combinati |
38,658 | Are there examples of more informative PCA plots? [duplicate] | I find biplots very useful. A biplot represents both the variables and the observations in a space defined by two (or three) components. The length and direction of the vector representing each variable tell you how much it loads on these two components, directly addressing the question at the end of the first paragrap... | Are there examples of more informative PCA plots? [duplicate] | I find biplots very useful. A biplot represents both the variables and the observations in a space defined by two (or three) components. The length and direction of the vector representing each variab | Are there examples of more informative PCA plots? [duplicate]
I find biplots very useful. A biplot represents both the variables and the observations in a space defined by two (or three) components. The length and direction of the vector representing each variable tell you how much it loads on these two components, dir... | Are there examples of more informative PCA plots? [duplicate]
I find biplots very useful. A biplot represents both the variables and the observations in a space defined by two (or three) components. The length and direction of the vector representing each variab |
38,659 | Rounding when making a histogram | I don't believe there is any convention (see summary of statistical packages below.)
For considering the distribution of a set of data (e.g. examining rough normality of residuals in a linear regression with a histogram), this decision is somewhat arbitrary (but will potentially change the shape of the figure, dependin... | Rounding when making a histogram | I don't believe there is any convention (see summary of statistical packages below.)
For considering the distribution of a set of data (e.g. examining rough normality of residuals in a linear regressi | Rounding when making a histogram
I don't believe there is any convention (see summary of statistical packages below.)
For considering the distribution of a set of data (e.g. examining rough normality of residuals in a linear regression with a histogram), this decision is somewhat arbitrary (but will potentially change ... | Rounding when making a histogram
I don't believe there is any convention (see summary of statistical packages below.)
For considering the distribution of a set of data (e.g. examining rough normality of residuals in a linear regressi |
38,660 | Rounding when making a histogram | Pretty late to the party here, but I think that there is a convention. The convention seems to be that lower (left) bounds are included in a class. [1-3]
Specifically answering your example question - the value of 20 should go into the 20-30 bin.
However, as observed by James already - the convention isn't always obser... | Rounding when making a histogram | Pretty late to the party here, but I think that there is a convention. The convention seems to be that lower (left) bounds are included in a class. [1-3]
Specifically answering your example question - | Rounding when making a histogram
Pretty late to the party here, but I think that there is a convention. The convention seems to be that lower (left) bounds are included in a class. [1-3]
Specifically answering your example question - the value of 20 should go into the 20-30 bin.
However, as observed by James already - ... | Rounding when making a histogram
Pretty late to the party here, but I think that there is a convention. The convention seems to be that lower (left) bounds are included in a class. [1-3]
Specifically answering your example question - |
38,661 | Rounding when making a histogram | While there's no particularly broad convention, to me it would make some sense to follow the convention used for right-continuous CDFs, and so in general make histograms include their left boundary but not their right, so the $i$-th interval is $[l_i,l_{i+1})$. This at least seems to be done slightly more commonly, but... | Rounding when making a histogram | While there's no particularly broad convention, to me it would make some sense to follow the convention used for right-continuous CDFs, and so in general make histograms include their left boundary bu | Rounding when making a histogram
While there's no particularly broad convention, to me it would make some sense to follow the convention used for right-continuous CDFs, and so in general make histograms include their left boundary but not their right, so the $i$-th interval is $[l_i,l_{i+1})$. This at least seems to be... | Rounding when making a histogram
While there's no particularly broad convention, to me it would make some sense to follow the convention used for right-continuous CDFs, and so in general make histograms include their left boundary bu |
38,662 | Decision Tree as variable selection for Logistic Regression | If you have access to LASSO and your predictors are all numeric then that is a good choice as Peter mentioned.
If you have a massive number of predictors as experienced often in fields like marketing - then this can be computationally too expensive. In that case, a tree can be used, but a random forest or gradient boo... | Decision Tree as variable selection for Logistic Regression | If you have access to LASSO and your predictors are all numeric then that is a good choice as Peter mentioned.
If you have a massive number of predictors as experienced often in fields like marketing | Decision Tree as variable selection for Logistic Regression
If you have access to LASSO and your predictors are all numeric then that is a good choice as Peter mentioned.
If you have a massive number of predictors as experienced often in fields like marketing - then this can be computationally too expensive. In that c... | Decision Tree as variable selection for Logistic Regression
If you have access to LASSO and your predictors are all numeric then that is a good choice as Peter mentioned.
If you have a massive number of predictors as experienced often in fields like marketing |
38,663 | Decision Tree as variable selection for Logistic Regression | In addition to the usual problems with automatically choosing variables, this uses trees for a purpose they were not designed for. To me, there are two big advantages to classification trees:
1) They are intuitively very clear.
2) They allow you to look at interactions in ways that would be very difficult in a regressi... | Decision Tree as variable selection for Logistic Regression | In addition to the usual problems with automatically choosing variables, this uses trees for a purpose they were not designed for. To me, there are two big advantages to classification trees:
1) They | Decision Tree as variable selection for Logistic Regression
In addition to the usual problems with automatically choosing variables, this uses trees for a purpose they were not designed for. To me, there are two big advantages to classification trees:
1) They are intuitively very clear.
2) They allow you to look at int... | Decision Tree as variable selection for Logistic Regression
In addition to the usual problems with automatically choosing variables, this uses trees for a purpose they were not designed for. To me, there are two big advantages to classification trees:
1) They |
38,664 | Decision Tree as variable selection for Logistic Regression | The random forest technique is related to decision trees. A metric that it outputs is a variable importance measure. This measure of often used for feature selection, which is a technique to select a subset of variables. They key aspect to understand is that there are many ways to go wrong with feature selection (subse... | Decision Tree as variable selection for Logistic Regression | The random forest technique is related to decision trees. A metric that it outputs is a variable importance measure. This measure of often used for feature selection, which is a technique to select a | Decision Tree as variable selection for Logistic Regression
The random forest technique is related to decision trees. A metric that it outputs is a variable importance measure. This measure of often used for feature selection, which is a technique to select a subset of variables. They key aspect to understand is that t... | Decision Tree as variable selection for Logistic Regression
The random forest technique is related to decision trees. A metric that it outputs is a variable importance measure. This measure of often used for feature selection, which is a technique to select a |
38,665 | Decision Tree as variable selection for Logistic Regression | One of the problems with this approach is that logistic regression and decision trees are very different algorithms, so the set of features that work well with a decision tree are not necessarily going to be the features that work well with a logistic regression model (and vice versa). So my advice would be that this ... | Decision Tree as variable selection for Logistic Regression | One of the problems with this approach is that logistic regression and decision trees are very different algorithms, so the set of features that work well with a decision tree are not necessarily goin | Decision Tree as variable selection for Logistic Regression
One of the problems with this approach is that logistic regression and decision trees are very different algorithms, so the set of features that work well with a decision tree are not necessarily going to be the features that work well with a logistic regressi... | Decision Tree as variable selection for Logistic Regression
One of the problems with this approach is that logistic regression and decision trees are very different algorithms, so the set of features that work well with a decision tree are not necessarily goin |
38,666 | In regression analysis what does taking the log of a variable do? | There are two sorts of reasons for taking the log of a variable in a regression, one statistical, one substantive.
Statistically, OLS regression assumes that the errors, as estimated by the residuals, are normally distributed. When they are positively skewed (long right tail) taking logs can sometimes help. Sometimes l... | In regression analysis what does taking the log of a variable do? | There are two sorts of reasons for taking the log of a variable in a regression, one statistical, one substantive.
Statistically, OLS regression assumes that the errors, as estimated by the residuals, | In regression analysis what does taking the log of a variable do?
There are two sorts of reasons for taking the log of a variable in a regression, one statistical, one substantive.
Statistically, OLS regression assumes that the errors, as estimated by the residuals, are normally distributed. When they are positively sk... | In regression analysis what does taking the log of a variable do?
There are two sorts of reasons for taking the log of a variable in a regression, one statistical, one substantive.
Statistically, OLS regression assumes that the errors, as estimated by the residuals, |
38,667 | In regression analysis what does taking the log of a variable do? | Taking logs will make certain forms of relationship that look curved look linear or more nearly linear. Think of introducing new variables, $X_5 = \log(X_3)$ and $X_6 = \log(X_4)$ and then your model is linear in $X_1, X_2, X_5$ and $X_6$.
Sometimes these transformations are obvious from subject-matter considerations... | In regression analysis what does taking the log of a variable do? | Taking logs will make certain forms of relationship that look curved look linear or more nearly linear. Think of introducing new variables, $X_5 = \log(X_3)$ and $X_6 = \log(X_4)$ and then your model | In regression analysis what does taking the log of a variable do?
Taking logs will make certain forms of relationship that look curved look linear or more nearly linear. Think of introducing new variables, $X_5 = \log(X_3)$ and $X_6 = \log(X_4)$ and then your model is linear in $X_1, X_2, X_5$ and $X_6$.
Sometimes th... | In regression analysis what does taking the log of a variable do?
Taking logs will make certain forms of relationship that look curved look linear or more nearly linear. Think of introducing new variables, $X_5 = \log(X_3)$ and $X_6 = \log(X_4)$ and then your model |
38,668 | In regression analysis what does taking the log of a variable do? | This is an old question, but I often found myself looking for this specific interpretation in the past so I will add it here.
Another substantive example is in the field of econometrics, when regression analysis is used to calculate the elasticities (relative percentage change of one variable with respect to another). ... | In regression analysis what does taking the log of a variable do? | This is an old question, but I often found myself looking for this specific interpretation in the past so I will add it here.
Another substantive example is in the field of econometrics, when regressi | In regression analysis what does taking the log of a variable do?
This is an old question, but I often found myself looking for this specific interpretation in the past so I will add it here.
Another substantive example is in the field of econometrics, when regression analysis is used to calculate the elasticities (rel... | In regression analysis what does taking the log of a variable do?
This is an old question, but I often found myself looking for this specific interpretation in the past so I will add it here.
Another substantive example is in the field of econometrics, when regressi |
38,669 | Odds of drawing at least k identical values among m after n draws? | There are almost certainly easier ways, but one way of computing the value precisely is compute the number of ways of placing $n$ labeled balls in $m$ labeled bins such that no bin contains $k$ or more balls. We can compute this
using a simple recurrence. Let $W(n,j,m',k)$ be the number of ways of placing exactly $j$... | Odds of drawing at least k identical values among m after n draws? | There are almost certainly easier ways, but one way of computing the value precisely is compute the number of ways of placing $n$ labeled balls in $m$ labeled bins such that no bin contains $k$ or mor | Odds of drawing at least k identical values among m after n draws?
There are almost certainly easier ways, but one way of computing the value precisely is compute the number of ways of placing $n$ labeled balls in $m$ labeled bins such that no bin contains $k$ or more balls. We can compute this
using a simple recurren... | Odds of drawing at least k identical values among m after n draws?
There are almost certainly easier ways, but one way of computing the value precisely is compute the number of ways of placing $n$ labeled balls in $m$ labeled bins such that no bin contains $k$ or mor |
38,670 | Odds of drawing at least k identical values among m after n draws? | (Responding to the simulation question)
In R:
n <- 3000; m <- 300; k <- 20 # Problem parameters
nIterations <- 10000 # Number of iterations in the simulation
set.seed(17) # Make the output reproducible
#
# All the work is done in the following line.
#
t <- table(replicate(nIterations, any(tabula... | Odds of drawing at least k identical values among m after n draws? | (Responding to the simulation question)
In R:
n <- 3000; m <- 300; k <- 20 # Problem parameters
nIterations <- 10000 # Number of iterations in the simulation
set.seed(17) # Mak | Odds of drawing at least k identical values among m after n draws?
(Responding to the simulation question)
In R:
n <- 3000; m <- 300; k <- 20 # Problem parameters
nIterations <- 10000 # Number of iterations in the simulation
set.seed(17) # Make the output reproducible
#
# All the work is done in... | Odds of drawing at least k identical values among m after n draws?
(Responding to the simulation question)
In R:
n <- 3000; m <- 300; k <- 20 # Problem parameters
nIterations <- 10000 # Number of iterations in the simulation
set.seed(17) # Mak |
38,671 | Odds of drawing at least k identical values among m after n draws? | This is a harder question if you don't have the $n\gg k$ and assuming that this makes them 'close enough' to independent to not affect the answer non-trivially. Lets proceed with these assumptions. Let $X_j \sim Binomial(n,\frac{1}{m})$ $\forall j = 1,..,m$.
$$P(\max_j X_j \geq k) = 1 - P(\max_j X_j < k)$$
$$ = 1 - P(... | Odds of drawing at least k identical values among m after n draws? | This is a harder question if you don't have the $n\gg k$ and assuming that this makes them 'close enough' to independent to not affect the answer non-trivially. Lets proceed with these assumptions. Le | Odds of drawing at least k identical values among m after n draws?
This is a harder question if you don't have the $n\gg k$ and assuming that this makes them 'close enough' to independent to not affect the answer non-trivially. Lets proceed with these assumptions. Let $X_j \sim Binomial(n,\frac{1}{m})$ $\forall j = 1,.... | Odds of drawing at least k identical values among m after n draws?
This is a harder question if you don't have the $n\gg k$ and assuming that this makes them 'close enough' to independent to not affect the answer non-trivially. Lets proceed with these assumptions. Le |
38,672 | Odds of drawing at least k identical values among m after n draws? | The collection of numbers has a multinomial distribution with $m$ categories and $n$ sample size. Letting $N_i$ be the number of times the $i$th category is chosen/repeated, we have $$(N_1,\dots,N_m)\sim multinomial\left(n;\frac{1}{m},\frac{1}{m},\dots,\frac{1}{m}\right)$$ Now leveraging off of @danieljohnson's answer... | Odds of drawing at least k identical values among m after n draws? | The collection of numbers has a multinomial distribution with $m$ categories and $n$ sample size. Letting $N_i$ be the number of times the $i$th category is chosen/repeated, we have $$(N_1,\dots,N_m) | Odds of drawing at least k identical values among m after n draws?
The collection of numbers has a multinomial distribution with $m$ categories and $n$ sample size. Letting $N_i$ be the number of times the $i$th category is chosen/repeated, we have $$(N_1,\dots,N_m)\sim multinomial\left(n;\frac{1}{m},\frac{1}{m},\dots... | Odds of drawing at least k identical values among m after n draws?
The collection of numbers has a multinomial distribution with $m$ categories and $n$ sample size. Letting $N_i$ be the number of times the $i$th category is chosen/repeated, we have $$(N_1,\dots,N_m) |
38,673 | Is there a term for min + (max - min) / 2? | min + (max - min) / 2 = (min + max) / 2
It's called the mid-range. I don't know of an existing function in R. | Is there a term for min + (max - min) / 2? | min + (max - min) / 2 = (min + max) / 2
It's called the mid-range. I don't know of an existing function in R. | Is there a term for min + (max - min) / 2?
min + (max - min) / 2 = (min + max) / 2
It's called the mid-range. I don't know of an existing function in R. | Is there a term for min + (max - min) / 2?
min + (max - min) / 2 = (min + max) / 2
It's called the mid-range. I don't know of an existing function in R. |
38,674 | Is there a term for min + (max - min) / 2? | Isn’t mean what you want?
> mean(c(5, 11))
8
Note that the result of course differs as soon as you have a range with more than two values. I’m assuming that you only have two values, min and max.
If you’ve got a vector of more than two values, use range to get their minimum and maximum:
> x = 1 : 100
> mean(range(x))
... | Is there a term for min + (max - min) / 2? | Isn’t mean what you want?
> mean(c(5, 11))
8
Note that the result of course differs as soon as you have a range with more than two values. I’m assuming that you only have two values, min and max.
If | Is there a term for min + (max - min) / 2?
Isn’t mean what you want?
> mean(c(5, 11))
8
Note that the result of course differs as soon as you have a range with more than two values. I’m assuming that you only have two values, min and max.
If you’ve got a vector of more than two values, use range to get their minimum a... | Is there a term for min + (max - min) / 2?
Isn’t mean what you want?
> mean(c(5, 11))
8
Note that the result of course differs as soon as you have a range with more than two values. I’m assuming that you only have two values, min and max.
If |
38,675 | R-squared: X "explains" the percentage of variation of the Y values. Does axis order matter? | Your wording is implying causality, which is not what the R^2 represents. "Does price (x) determine square footage (y)?" is implying causality which is not what is captured through a correlation. "Price explains X% of the variation in square footage" describes that there is a relationship between price and square foota... | R-squared: X "explains" the percentage of variation of the Y values. Does axis order matter? | Your wording is implying causality, which is not what the R^2 represents. "Does price (x) determine square footage (y)?" is implying causality which is not what is captured through a correlation. "Pri | R-squared: X "explains" the percentage of variation of the Y values. Does axis order matter?
Your wording is implying causality, which is not what the R^2 represents. "Does price (x) determine square footage (y)?" is implying causality which is not what is captured through a correlation. "Price explains X% of the varia... | R-squared: X "explains" the percentage of variation of the Y values. Does axis order matter?
Your wording is implying causality, which is not what the R^2 represents. "Does price (x) determine square footage (y)?" is implying causality which is not what is captured through a correlation. "Pri |
38,676 | R-squared: X "explains" the percentage of variation of the Y values. Does axis order matter? | Edited with added material in response to comments by @whuber
This is an answer based on probability theory, not statistical estimates, so your mileage may vary.
If random variables $X$ and $Y$ have correlation coefficient $\rho$, then the linear least-mean-square error estimate of $Y$ given the value of $X$ is
$$\hat... | R-squared: X "explains" the percentage of variation of the Y values. Does axis order matter? | Edited with added material in response to comments by @whuber
This is an answer based on probability theory, not statistical estimates, so your mileage may vary.
If random variables $X$ and $Y$ have c | R-squared: X "explains" the percentage of variation of the Y values. Does axis order matter?
Edited with added material in response to comments by @whuber
This is an answer based on probability theory, not statistical estimates, so your mileage may vary.
If random variables $X$ and $Y$ have correlation coefficient $\rh... | R-squared: X "explains" the percentage of variation of the Y values. Does axis order matter?
Edited with added material in response to comments by @whuber
This is an answer based on probability theory, not statistical estimates, so your mileage may vary.
If random variables $X$ and $Y$ have c |
38,677 | R-squared: X "explains" the percentage of variation of the Y values. Does axis order matter? | Your example can legitimately be run the other way. Why not estimate square footage from price? Suppose price data is publicly available, but square footage is not. Yet you want to estimate square footage (to determine the carpet or furniture market, the likely heating cost, or whatever). It's perfectly valid to mode... | R-squared: X "explains" the percentage of variation of the Y values. Does axis order matter? | Your example can legitimately be run the other way. Why not estimate square footage from price? Suppose price data is publicly available, but square footage is not. Yet you want to estimate square f | R-squared: X "explains" the percentage of variation of the Y values. Does axis order matter?
Your example can legitimately be run the other way. Why not estimate square footage from price? Suppose price data is publicly available, but square footage is not. Yet you want to estimate square footage (to determine the ca... | R-squared: X "explains" the percentage of variation of the Y values. Does axis order matter?
Your example can legitimately be run the other way. Why not estimate square footage from price? Suppose price data is publicly available, but square footage is not. Yet you want to estimate square f |
38,678 | How can I determine if there's a statistically significant difference between two averages? | If your run time samples for each language are roughly normally distributed* (which is likely the case), then you could use a t-test, in particular, an independent two-sample t-test with unequal variances.
If you have R installed, you could do this by running t.test(x = c_sharp_samples, y = java_samples).
If, however, ... | How can I determine if there's a statistically significant difference between two averages? | If your run time samples for each language are roughly normally distributed* (which is likely the case), then you could use a t-test, in particular, an independent two-sample t-test with unequal varia | How can I determine if there's a statistically significant difference between two averages?
If your run time samples for each language are roughly normally distributed* (which is likely the case), then you could use a t-test, in particular, an independent two-sample t-test with unequal variances.
If you have R installe... | How can I determine if there's a statistically significant difference between two averages?
If your run time samples for each language are roughly normally distributed* (which is likely the case), then you could use a t-test, in particular, an independent two-sample t-test with unequal varia |
38,679 | How can I determine if there's a statistically significant difference between two averages? | A permutation test is another possibility, although I think for the problem you describe the alternatives that have been mentioned will be superior. | How can I determine if there's a statistically significant difference between two averages? | A permutation test is another possibility, although I think for the problem you describe the alternatives that have been mentioned will be superior. | How can I determine if there's a statistically significant difference between two averages?
A permutation test is another possibility, although I think for the problem you describe the alternatives that have been mentioned will be superior. | How can I determine if there's a statistically significant difference between two averages?
A permutation test is another possibility, although I think for the problem you describe the alternatives that have been mentioned will be superior. |
38,680 | How can I determine if there's a statistically significant difference between two averages? | It sounds like what you want is to use a t-test (here is the wikipedia page).
If you do not assume your observations distribute normally then try this, the Mann-Whitney U test, (but it can not be computed from mean/sd alone).
Make sure that your observations are independent, so that the validity of the t-test is prese... | How can I determine if there's a statistically significant difference between two averages? | It sounds like what you want is to use a t-test (here is the wikipedia page).
If you do not assume your observations distribute normally then try this, the Mann-Whitney U test, (but it can not be com | How can I determine if there's a statistically significant difference between two averages?
It sounds like what you want is to use a t-test (here is the wikipedia page).
If you do not assume your observations distribute normally then try this, the Mann-Whitney U test, (but it can not be computed from mean/sd alone).
M... | How can I determine if there's a statistically significant difference between two averages?
It sounds like what you want is to use a t-test (here is the wikipedia page).
If you do not assume your observations distribute normally then try this, the Mann-Whitney U test, (but it can not be com |
38,681 | Computing average value ignoring outliers | In boxplots, values that are more than 1.5 times the IQR (interquartile range, difference between quartile 1 and 3) away from (as in: in the direction away from the median) the quartiles are typically considered outliers.
I cannot say whether this is an appropriate measure for your data, though... | Computing average value ignoring outliers | In boxplots, values that are more than 1.5 times the IQR (interquartile range, difference between quartile 1 and 3) away from (as in: in the direction away from the median) the quartiles are typically | Computing average value ignoring outliers
In boxplots, values that are more than 1.5 times the IQR (interquartile range, difference between quartile 1 and 3) away from (as in: in the direction away from the median) the quartiles are typically considered outliers.
I cannot say whether this is an appropriate measure for ... | Computing average value ignoring outliers
In boxplots, values that are more than 1.5 times the IQR (interquartile range, difference between quartile 1 and 3) away from (as in: in the direction away from the median) the quartiles are typically |
38,682 | Computing average value ignoring outliers | You could consider using a trimmed mean. This would involve discarding, say, the highest 10% of values and the lowest 10% of values, regardless of whether you consider them to be bad. | Computing average value ignoring outliers | You could consider using a trimmed mean. This would involve discarding, say, the highest 10% of values and the lowest 10% of values, regardless of whether you consider them to be bad. | Computing average value ignoring outliers
You could consider using a trimmed mean. This would involve discarding, say, the highest 10% of values and the lowest 10% of values, regardless of whether you consider them to be bad. | Computing average value ignoring outliers
You could consider using a trimmed mean. This would involve discarding, say, the highest 10% of values and the lowest 10% of values, regardless of whether you consider them to be bad. |
38,683 | Computing average value ignoring outliers | I originally posted this on SO before it was deleted:
https://stats.stackexchange.com/ will probably help you better with this, and give a more comprehensive answer. I'm not a mathematician, but I suspect there are multiple ways to solve this issue.
As a programmer this is how I would tackle the problem. I'm not skille... | Computing average value ignoring outliers | I originally posted this on SO before it was deleted:
https://stats.stackexchange.com/ will probably help you better with this, and give a more comprehensive answer. I'm not a mathematician, but I sus | Computing average value ignoring outliers
I originally posted this on SO before it was deleted:
https://stats.stackexchange.com/ will probably help you better with this, and give a more comprehensive answer. I'm not a mathematician, but I suspect there are multiple ways to solve this issue.
As a programmer this is how ... | Computing average value ignoring outliers
I originally posted this on SO before it was deleted:
https://stats.stackexchange.com/ will probably help you better with this, and give a more comprehensive answer. I'm not a mathematician, but I sus |
38,684 | Computing average value ignoring outliers | Perhaps a robust estimator like RANSAC could be used here. | Computing average value ignoring outliers | Perhaps a robust estimator like RANSAC could be used here. | Computing average value ignoring outliers
Perhaps a robust estimator like RANSAC could be used here. | Computing average value ignoring outliers
Perhaps a robust estimator like RANSAC could be used here. |
38,685 | Computing average value ignoring outliers | hope this helps
Simplistic approaches , as suggested here , often fail to their lack of generality. In general you may have a series that has multiple trends and/or multiple levels thus to detect anomalies one has to "control" for these effects. Additionally there may be a seasonal effect that may have started in the l... | Computing average value ignoring outliers | hope this helps
Simplistic approaches , as suggested here , often fail to their lack of generality. In general you may have a series that has multiple trends and/or multiple levels thus to detect anom | Computing average value ignoring outliers
hope this helps
Simplistic approaches , as suggested here , often fail to their lack of generality. In general you may have a series that has multiple trends and/or multiple levels thus to detect anomalies one has to "control" for these effects. Additionally there may be a seas... | Computing average value ignoring outliers
hope this helps
Simplistic approaches , as suggested here , often fail to their lack of generality. In general you may have a series that has multiple trends and/or multiple levels thus to detect anom |
38,686 | Clustering of a matrix (homogeneity measurement) | This question is about spatial correlation. Many methods exist to characterize and quantify this. What they all have in common is comparing values at one location to those at nearby locations. Usually, the reference distribution is some kind of spatial stochastic process where data are generated independently from p... | Clustering of a matrix (homogeneity measurement) | This question is about spatial correlation. Many methods exist to characterize and quantify this. What they all have in common is comparing values at one location to those at nearby locations. Usua | Clustering of a matrix (homogeneity measurement)
This question is about spatial correlation. Many methods exist to characterize and quantify this. What they all have in common is comparing values at one location to those at nearby locations. Usually, the reference distribution is some kind of spatial stochastic proc... | Clustering of a matrix (homogeneity measurement)
This question is about spatial correlation. Many methods exist to characterize and quantify this. What they all have in common is comparing values at one location to those at nearby locations. Usua |
38,687 | Clustering of a matrix (homogeneity measurement) | You could also consider Moran's I which is available in the R package "ape". And then simply use a weighting based on distance:
nRows <- 30
nCols <- 15
nPixels <- nRows * nCols
# Create a Random Image
image <- matrix(sample.int(256, nPixels, replace=TRUE),
nrow=nRows, ncol=nCols) - 1L
# 1D to 2D Ind... | Clustering of a matrix (homogeneity measurement) | You could also consider Moran's I which is available in the R package "ape". And then simply use a weighting based on distance:
nRows <- 30
nCols <- 15
nPixels <- nRows * nCols
# Create a Random Im | Clustering of a matrix (homogeneity measurement)
You could also consider Moran's I which is available in the R package "ape". And then simply use a weighting based on distance:
nRows <- 30
nCols <- 15
nPixels <- nRows * nCols
# Create a Random Image
image <- matrix(sample.int(256, nPixels, replace=TRUE),
... | Clustering of a matrix (homogeneity measurement)
You could also consider Moran's I which is available in the R package "ape". And then simply use a weighting based on distance:
nRows <- 30
nCols <- 15
nPixels <- nRows * nCols
# Create a Random Im |
38,688 | Clustering of a matrix (homogeneity measurement) | Good question. A trivial way to find "cluster of high values in the upper left"
(as opposed to correlations)
is to split the image into tiles and look at tile means. For example,
means of 100 x 100 tiles:
[[ 82 78 80 94 99 100]
[ 80 53 66 62 80 100]
[ 82 61 65 64 72 98]
[ 87 83 99 81 80 100]
[100 ... | Clustering of a matrix (homogeneity measurement) | Good question. A trivial way to find "cluster of high values in the upper left"
(as opposed to correlations)
is to split the image into tiles and look at tile means. For example,
means of 100 x 100 t | Clustering of a matrix (homogeneity measurement)
Good question. A trivial way to find "cluster of high values in the upper left"
(as opposed to correlations)
is to split the image into tiles and look at tile means. For example,
means of 100 x 100 tiles:
[[ 82 78 80 94 99 100]
[ 80 53 66 62 80 100]
[ 82 61 ... | Clustering of a matrix (homogeneity measurement)
Good question. A trivial way to find "cluster of high values in the upper left"
(as opposed to correlations)
is to split the image into tiles and look at tile means. For example,
means of 100 x 100 t |
38,689 | Clustering of a matrix (homogeneity measurement) | The goal is just to find out a measure that will tell us how mixed up all the pixels are. Given 2 matrices of data with the exact same distribution of values, if the first one's values are ordered or clumped together in spatial groups and the 2nd one's values are well-dispersed (high points and not near other high poin... | Clustering of a matrix (homogeneity measurement) | The goal is just to find out a measure that will tell us how mixed up all the pixels are. Given 2 matrices of data with the exact same distribution of values, if the first one's values are ordered or | Clustering of a matrix (homogeneity measurement)
The goal is just to find out a measure that will tell us how mixed up all the pixels are. Given 2 matrices of data with the exact same distribution of values, if the first one's values are ordered or clumped together in spatial groups and the 2nd one's values are well-di... | Clustering of a matrix (homogeneity measurement)
The goal is just to find out a measure that will tell us how mixed up all the pixels are. Given 2 matrices of data with the exact same distribution of values, if the first one's values are ordered or |
38,690 | Gputools for R: how to interpret the experimental procedure? | But, the experimental conditions for the GPU side is unclear (to me). When using a GPU, for efficiency we should simultaneously make use of the CPUs.
That is not generally true, and in particular is not true for the gputools R package which offers an 'everything to the GPU' mode with new functions gpuMatMult(), gpuQr(... | Gputools for R: how to interpret the experimental procedure? | But, the experimental conditions for the GPU side is unclear (to me). When using a GPU, for efficiency we should simultaneously make use of the CPUs.
That is not generally true, and in particular is | Gputools for R: how to interpret the experimental procedure?
But, the experimental conditions for the GPU side is unclear (to me). When using a GPU, for efficiency we should simultaneously make use of the CPUs.
That is not generally true, and in particular is not true for the gputools R package which offers an 'everyt... | Gputools for R: how to interpret the experimental procedure?
But, the experimental conditions for the GPU side is unclear (to me). When using a GPU, for efficiency we should simultaneously make use of the CPUs.
That is not generally true, and in particular is |
38,691 | Gputools for R: how to interpret the experimental procedure? | There is fundamental difference between parallel computing in CPUs and GPUs. Essentially, the CPU has been designed to do clever things on behalf of the programmer. For example, Instruction level parallelism. The GPU on the other hand, stips away this useful stuff and instead contains many more cores. It's a trade off ... | Gputools for R: how to interpret the experimental procedure? | There is fundamental difference between parallel computing in CPUs and GPUs. Essentially, the CPU has been designed to do clever things on behalf of the programmer. For example, Instruction level para | Gputools for R: how to interpret the experimental procedure?
There is fundamental difference between parallel computing in CPUs and GPUs. Essentially, the CPU has been designed to do clever things on behalf of the programmer. For example, Instruction level parallelism. The GPU on the other hand, stips away this useful ... | Gputools for R: how to interpret the experimental procedure?
There is fundamental difference between parallel computing in CPUs and GPUs. Essentially, the CPU has been designed to do clever things on behalf of the programmer. For example, Instruction level para |
38,692 | Measurement level of percentile scores | Background to understand my answer
The critical property that distinguishes between ordinal and interval scale is whether we can take ratio of differences. While you cannot take ratio of direct measures for either scale the ratio of differences is meaningful for interval but not ordinal (See: http://en.wikipedia.org/wi... | Measurement level of percentile scores | Background to understand my answer
The critical property that distinguishes between ordinal and interval scale is whether we can take ratio of differences. While you cannot take ratio of direct measur | Measurement level of percentile scores
Background to understand my answer
The critical property that distinguishes between ordinal and interval scale is whether we can take ratio of differences. While you cannot take ratio of direct measures for either scale the ratio of differences is meaningful for interval but not o... | Measurement level of percentile scores
Background to understand my answer
The critical property that distinguishes between ordinal and interval scale is whether we can take ratio of differences. While you cannot take ratio of direct measur |
38,693 | Measurement level of percentile scores | John Tukey strongly and cogently argued for a proportion type of measurement in his book on EDA. One thing that makes proportions special and different from the classical "nominal, ordinal, interval, ratio" taxonomy is that frequently they enjoy an obvious symmetry: A proportion can be thought of as the average of a b... | Measurement level of percentile scores | John Tukey strongly and cogently argued for a proportion type of measurement in his book on EDA. One thing that makes proportions special and different from the classical "nominal, ordinal, interval, | Measurement level of percentile scores
John Tukey strongly and cogently argued for a proportion type of measurement in his book on EDA. One thing that makes proportions special and different from the classical "nominal, ordinal, interval, ratio" taxonomy is that frequently they enjoy an obvious symmetry: A proportion ... | Measurement level of percentile scores
John Tukey strongly and cogently argued for a proportion type of measurement in his book on EDA. One thing that makes proportions special and different from the classical "nominal, ordinal, interval, |
38,694 | Measurement level of percentile scores | Continuous (interval); this is a method how to convert ordinal data to something that may have some distribution that makes sense. | Measurement level of percentile scores | Continuous (interval); this is a method how to convert ordinal data to something that may have some distribution that makes sense. | Measurement level of percentile scores
Continuous (interval); this is a method how to convert ordinal data to something that may have some distribution that makes sense. | Measurement level of percentile scores
Continuous (interval); this is a method how to convert ordinal data to something that may have some distribution that makes sense. |
38,695 | The distribution function of the min of two random variables which are dependent via a common term | The distribution of $Y$ can also be written as $$Y = \min(Z_1,Z_2) = \min(U_1,U_2) - X_1 = Q-X_1$$
This contains two parts:
The distribution of a minimum of iid variables $Q=\min(U_1,U_2)$ whose cdf can be expressed in terms of the cdf of $U_i$, $$P(\min(U_1,U_2)> x) = P(U_i > x)^2$$
The distribution of a sum $Q-X_1$,... | The distribution function of the min of two random variables which are dependent via a common term | The distribution of $Y$ can also be written as $$Y = \min(Z_1,Z_2) = \min(U_1,U_2) - X_1 = Q-X_1$$
This contains two parts:
The distribution of a minimum of iid variables $Q=\min(U_1,U_2)$ whose cdf | The distribution function of the min of two random variables which are dependent via a common term
The distribution of $Y$ can also be written as $$Y = \min(Z_1,Z_2) = \min(U_1,U_2) - X_1 = Q-X_1$$
This contains two parts:
The distribution of a minimum of iid variables $Q=\min(U_1,U_2)$ whose cdf can be expressed in t... | The distribution function of the min of two random variables which are dependent via a common term
The distribution of $Y$ can also be written as $$Y = \min(Z_1,Z_2) = \min(U_1,U_2) - X_1 = Q-X_1$$
This contains two parts:
The distribution of a minimum of iid variables $Q=\min(U_1,U_2)$ whose cdf |
38,696 | The distribution function of the min of two random variables which are dependent via a common term | As noted by @YashaswiMohanty the expectation of $Y$ can sometimes
be found without explicting the probability distribution function.
Assume that all r.vs are of continuous type and $X_1$ is exponential
with rate $\lambda >0$. We can consider the survival function
$\bar{F}_Y(y) := 1 - F_Y(y)$
$$
\bar{F}_Y(y) = \text{Pr}... | The distribution function of the min of two random variables which are dependent via a common term | As noted by @YashaswiMohanty the expectation of $Y$ can sometimes
be found without explicting the probability distribution function.
Assume that all r.vs are of continuous type and $X_1$ is exponentia | The distribution function of the min of two random variables which are dependent via a common term
As noted by @YashaswiMohanty the expectation of $Y$ can sometimes
be found without explicting the probability distribution function.
Assume that all r.vs are of continuous type and $X_1$ is exponential
with rate $\lambda ... | The distribution function of the min of two random variables which are dependent via a common term
As noted by @YashaswiMohanty the expectation of $Y$ can sometimes
be found without explicting the probability distribution function.
Assume that all r.vs are of continuous type and $X_1$ is exponentia |
38,697 | Can age ever be confounded if it is the independent variable in an observational study? | First image below: With variables 'health' and 'wealth' you describe a situation with mediators. Age has a causal effect on health and wealth, and these in their turn have an effect on happiness.
Second image below: Controlling would relate to a (confounding) variable that has a causal effect on both the exposure varia... | Can age ever be confounded if it is the independent variable in an observational study? | First image below: With variables 'health' and 'wealth' you describe a situation with mediators. Age has a causal effect on health and wealth, and these in their turn have an effect on happiness.
Seco | Can age ever be confounded if it is the independent variable in an observational study?
First image below: With variables 'health' and 'wealth' you describe a situation with mediators. Age has a causal effect on health and wealth, and these in their turn have an effect on happiness.
Second image below: Controlling woul... | Can age ever be confounded if it is the independent variable in an observational study?
First image below: With variables 'health' and 'wealth' you describe a situation with mediators. Age has a causal effect on health and wealth, and these in their turn have an effect on happiness.
Seco |
38,698 | Can age ever be confounded if it is the independent variable in an observational study? | Observational studies adjust for age all the time! I would not be surprised if age was the most common adjustment variable in observational studies.
If age is the exposure (as in both examples of @SextusEmpiricus), the variable of interest, then you must include it in the model (how else are you going to estimate its e... | Can age ever be confounded if it is the independent variable in an observational study? | Observational studies adjust for age all the time! I would not be surprised if age was the most common adjustment variable in observational studies.
If age is the exposure (as in both examples of @Sex | Can age ever be confounded if it is the independent variable in an observational study?
Observational studies adjust for age all the time! I would not be surprised if age was the most common adjustment variable in observational studies.
If age is the exposure (as in both examples of @SextusEmpiricus), the variable of i... | Can age ever be confounded if it is the independent variable in an observational study?
Observational studies adjust for age all the time! I would not be surprised if age was the most common adjustment variable in observational studies.
If age is the exposure (as in both examples of @Sex |
38,699 | Is variance the area under the curve of the distribution of a population? | The area is the width times the height, but the variance is the width squared times the height. In statistics, we speak of "moments". The n-th moment is the integral of x the n-power times the function. The 0-th moment is $\int x^0 f(x)dx$, or just $\int f(x) dx$. For a PDF, that should be 1 no matter what. The 1st mom... | Is variance the area under the curve of the distribution of a population? | The area is the width times the height, but the variance is the width squared times the height. In statistics, we speak of "moments". The n-th moment is the integral of x the n-power times the functio | Is variance the area under the curve of the distribution of a population?
The area is the width times the height, but the variance is the width squared times the height. In statistics, we speak of "moments". The n-th moment is the integral of x the n-power times the function. The 0-th moment is $\int x^0 f(x)dx$, or ju... | Is variance the area under the curve of the distribution of a population?
The area is the width times the height, but the variance is the width squared times the height. In statistics, we speak of "moments". The n-th moment is the integral of x the n-power times the functio |
38,700 | Is variance the area under the curve of the distribution of a population? | While both the comments are correct, whuber ♦'s articulated it in a more comprehensive sense that can be conjured up as a "visual entity".
Variances are defined for those random variables which are residing in the space $\mathcal L^2$ where $\mathbb EX^2<\infty.$ It is a measure of spreadness.
For an intuitive take, th... | Is variance the area under the curve of the distribution of a population? | While both the comments are correct, whuber ♦'s articulated it in a more comprehensive sense that can be conjured up as a "visual entity".
Variances are defined for those random variables which are re | Is variance the area under the curve of the distribution of a population?
While both the comments are correct, whuber ♦'s articulated it in a more comprehensive sense that can be conjured up as a "visual entity".
Variances are defined for those random variables which are residing in the space $\mathcal L^2$ where $\mat... | Is variance the area under the curve of the distribution of a population?
While both the comments are correct, whuber ♦'s articulated it in a more comprehensive sense that can be conjured up as a "visual entity".
Variances are defined for those random variables which are re |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.