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
51,701
Why is a deterministic trend process not stationary?
A process $Y_t$ is stationary when for any vector of times $(t_1,...,t_n)$ and for every time interval $\tau$ the joint distribution of the vector $$ (Y_{t_1},...,Y_{t_n}) $$ coincides with the joint distribution of the vector $$ (Y_{t_1+\tau},...,Y_{t_n+\tau}) $$ In your example, the distribution of the "vector" $...
Why is a deterministic trend process not stationary?
A process $Y_t$ is stationary when for any vector of times $(t_1,...,t_n)$ and for every time interval $\tau$ the joint distribution of the vector $$ (Y_{t_1},...,Y_{t_n}) $$ coincides with the join
Why is a deterministic trend process not stationary? A process $Y_t$ is stationary when for any vector of times $(t_1,...,t_n)$ and for every time interval $\tau$ the joint distribution of the vector $$ (Y_{t_1},...,Y_{t_n}) $$ coincides with the joint distribution of the vector $$ (Y_{t_1+\tau},...,Y_{t_n+\tau}) $...
Why is a deterministic trend process not stationary? A process $Y_t$ is stationary when for any vector of times $(t_1,...,t_n)$ and for every time interval $\tau$ the joint distribution of the vector $$ (Y_{t_1},...,Y_{t_n}) $$ coincides with the join
51,702
SVM vs. artificial neural network
The no-free lunch theorems suggest there is no classifier that is a priori superior to any other, and the choice of classifier depends on the nature of the particular data set. I wouldn't cmomit myself to a choice of classifier and would instead evaluate several methods. The classes are only mildly imbalanced, so I su...
SVM vs. artificial neural network
The no-free lunch theorems suggest there is no classifier that is a priori superior to any other, and the choice of classifier depends on the nature of the particular data set. I wouldn't cmomit myse
SVM vs. artificial neural network The no-free lunch theorems suggest there is no classifier that is a priori superior to any other, and the choice of classifier depends on the nature of the particular data set. I wouldn't cmomit myself to a choice of classifier and would instead evaluate several methods. The classes a...
SVM vs. artificial neural network The no-free lunch theorems suggest there is no classifier that is a priori superior to any other, and the choice of classifier depends on the nature of the particular data set. I wouldn't cmomit myse
51,703
SVM vs. artificial neural network
For specificity in the following I'm going to assume that an ANN here means a feedforward multilayer neural network / perceptron as discussed in e.g. Bishop 1996. and an SVM is the the vanilla version e.g. from Hastie and Tibshirani. @Dikran Marsupial's points about the structure of the domain are important ones. In f...
SVM vs. artificial neural network
For specificity in the following I'm going to assume that an ANN here means a feedforward multilayer neural network / perceptron as discussed in e.g. Bishop 1996. and an SVM is the the vanilla version
SVM vs. artificial neural network For specificity in the following I'm going to assume that an ANN here means a feedforward multilayer neural network / perceptron as discussed in e.g. Bishop 1996. and an SVM is the the vanilla version e.g. from Hastie and Tibshirani. @Dikran Marsupial's points about the structure of th...
SVM vs. artificial neural network For specificity in the following I'm going to assume that an ANN here means a feedforward multilayer neural network / perceptron as discussed in e.g. Bishop 1996. and an SVM is the the vanilla version
51,704
SVM vs. artificial neural network
This question cannot be answered generically. It even depends on the multi-class classification strategy that you are using (i.e. one-vs-one, one-vs-rest, ...). Personally, I would use an SVM and choose an multi-class strategy that fit my problem and my computational resources. A nice paper how to do that is: Reducin...
SVM vs. artificial neural network
This question cannot be answered generically. It even depends on the multi-class classification strategy that you are using (i.e. one-vs-one, one-vs-rest, ...). Personally, I would use an SVM and choo
SVM vs. artificial neural network This question cannot be answered generically. It even depends on the multi-class classification strategy that you are using (i.e. one-vs-one, one-vs-rest, ...). Personally, I would use an SVM and choose an multi-class strategy that fit my problem and my computational resources. A nice ...
SVM vs. artificial neural network This question cannot be answered generically. It even depends on the multi-class classification strategy that you are using (i.e. one-vs-one, one-vs-rest, ...). Personally, I would use an SVM and choo
51,705
The disadvantage of using F-score in feature selection
Three years late, but it might help other people. I guess you refer to F-score used in the paper of Chen and Lin (2006) : "Combining SVMs with Various Feature Selection Strategies". They use an example to explain what you ask : I quote their words : "Both features of this data have low F-scores as the denominator (the...
The disadvantage of using F-score in feature selection
Three years late, but it might help other people. I guess you refer to F-score used in the paper of Chen and Lin (2006) : "Combining SVMs with Various Feature Selection Strategies". They use an exampl
The disadvantage of using F-score in feature selection Three years late, but it might help other people. I guess you refer to F-score used in the paper of Chen and Lin (2006) : "Combining SVMs with Various Feature Selection Strategies". They use an example to explain what you ask : I quote their words : "Both features...
The disadvantage of using F-score in feature selection Three years late, but it might help other people. I guess you refer to F-score used in the paper of Chen and Lin (2006) : "Combining SVMs with Various Feature Selection Strategies". They use an exampl
51,706
The disadvantage of using F-score in feature selection
In this reply, I assume that the questioned F-score is the one described in the article pointed out by @Guillaume Sutra. Here is the page describing the F-score, including its definition: Let us first look at the intuition behind the F-score for feature selection. For simplicity, let us consider a binary classificatio...
The disadvantage of using F-score in feature selection
In this reply, I assume that the questioned F-score is the one described in the article pointed out by @Guillaume Sutra. Here is the page describing the F-score, including its definition: Let us firs
The disadvantage of using F-score in feature selection In this reply, I assume that the questioned F-score is the one described in the article pointed out by @Guillaume Sutra. Here is the page describing the F-score, including its definition: Let us first look at the intuition behind the F-score for feature selection....
The disadvantage of using F-score in feature selection In this reply, I assume that the questioned F-score is the one described in the article pointed out by @Guillaume Sutra. Here is the page describing the F-score, including its definition: Let us firs
51,707
The disadvantage of using F-score in feature selection
The F-score is a ratio of two variables: F = F1/F2, where F1 is the variability between groups and F2 is the variability within each group. In other words, a high F value (leading to a significant p-value depending on your alpha) means that at least one of your groups is significantly different from the rest, but it do...
The disadvantage of using F-score in feature selection
The F-score is a ratio of two variables: F = F1/F2, where F1 is the variability between groups and F2 is the variability within each group. In other words, a high F value (leading to a significant p-v
The disadvantage of using F-score in feature selection The F-score is a ratio of two variables: F = F1/F2, where F1 is the variability between groups and F2 is the variability within each group. In other words, a high F value (leading to a significant p-value depending on your alpha) means that at least one of your gro...
The disadvantage of using F-score in feature selection The F-score is a ratio of two variables: F = F1/F2, where F1 is the variability between groups and F2 is the variability within each group. In other words, a high F value (leading to a significant p-v
51,708
How to set the optimal number of simulations
If you're using the simulations to try to estimate something, then you'd seek a sufficient number of replicates to achieve the desired precision. It's hard to see how one could make any general statement about the minimal number. It depends on the variation among replicates. There are cases where 5 might be sufficient,...
How to set the optimal number of simulations
If you're using the simulations to try to estimate something, then you'd seek a sufficient number of replicates to achieve the desired precision. It's hard to see how one could make any general statem
How to set the optimal number of simulations If you're using the simulations to try to estimate something, then you'd seek a sufficient number of replicates to achieve the desired precision. It's hard to see how one could make any general statement about the minimal number. It depends on the variation among replicates....
How to set the optimal number of simulations If you're using the simulations to try to estimate something, then you'd seek a sufficient number of replicates to achieve the desired precision. It's hard to see how one could make any general statem
51,709
How to set the optimal number of simulations
You can use Wald's sequential probability ratio test (SPRT). Suppose that your simulation is testing a null hypothesis---the primary null hypothesis. In testing the primary null, we use a level $p_0=0.05$ test. The interesting part is recognizing that the p-value given by your simulations is itself random. So we want ...
How to set the optimal number of simulations
You can use Wald's sequential probability ratio test (SPRT). Suppose that your simulation is testing a null hypothesis---the primary null hypothesis. In testing the primary null, we use a level $p_0=0
How to set the optimal number of simulations You can use Wald's sequential probability ratio test (SPRT). Suppose that your simulation is testing a null hypothesis---the primary null hypothesis. In testing the primary null, we use a level $p_0=0.05$ test. The interesting part is recognizing that the p-value given by y...
How to set the optimal number of simulations You can use Wald's sequential probability ratio test (SPRT). Suppose that your simulation is testing a null hypothesis---the primary null hypothesis. In testing the primary null, we use a level $p_0=0
51,710
How to set the optimal number of simulations
It very much depends on what you're trying to simulate. We'd need more details in terms of your simulation. My answer, when it comes down to it, is "as many as your computer can handle in the time you have". That admittedly isn't a great criteria. If you're trying to simulate a distribution or obtain an empirical confi...
How to set the optimal number of simulations
It very much depends on what you're trying to simulate. We'd need more details in terms of your simulation. My answer, when it comes down to it, is "as many as your computer can handle in the time you
How to set the optimal number of simulations It very much depends on what you're trying to simulate. We'd need more details in terms of your simulation. My answer, when it comes down to it, is "as many as your computer can handle in the time you have". That admittedly isn't a great criteria. If you're trying to simulat...
How to set the optimal number of simulations It very much depends on what you're trying to simulate. We'd need more details in terms of your simulation. My answer, when it comes down to it, is "as many as your computer can handle in the time you
51,711
How to set the optimal number of simulations
People finding this question may find this article useful. It goes into some detail on how to calculate number of simulations, as well as other facets of setting up a simulation study. It mentions that you can calculate the size B with: $$B = (\frac{Z_{1-(\alpha/2)\sigma}}{\delta})^2$$ where $Z_{1-(\alpha/2)}$ is the ...
How to set the optimal number of simulations
People finding this question may find this article useful. It goes into some detail on how to calculate number of simulations, as well as other facets of setting up a simulation study. It mentions tha
How to set the optimal number of simulations People finding this question may find this article useful. It goes into some detail on how to calculate number of simulations, as well as other facets of setting up a simulation study. It mentions that you can calculate the size B with: $$B = (\frac{Z_{1-(\alpha/2)\sigma}}{...
How to set the optimal number of simulations People finding this question may find this article useful. It goes into some detail on how to calculate number of simulations, as well as other facets of setting up a simulation study. It mentions tha
51,712
Can I delete excessive number of multivariate outliers, like over 10% in sample?
It's hard to see how 10% of the data could be called outlying. There's nothing that says you can't omit them, as long as you say clearly exactly what you did. But, this particular instance seems a bit extreme. When it comes to outliers, I first ask, are they errors? If they're errors, I'd want to fix them; if I could...
Can I delete excessive number of multivariate outliers, like over 10% in sample?
It's hard to see how 10% of the data could be called outlying. There's nothing that says you can't omit them, as long as you say clearly exactly what you did. But, this particular instance seems a bi
Can I delete excessive number of multivariate outliers, like over 10% in sample? It's hard to see how 10% of the data could be called outlying. There's nothing that says you can't omit them, as long as you say clearly exactly what you did. But, this particular instance seems a bit extreme. When it comes to outliers, I...
Can I delete excessive number of multivariate outliers, like over 10% in sample? It's hard to see how 10% of the data could be called outlying. There's nothing that says you can't omit them, as long as you say clearly exactly what you did. But, this particular instance seems a bi
51,713
Can I delete excessive number of multivariate outliers, like over 10% in sample?
In addition to @karl broman's excellent point, I'm curious as to how many variables there are. You could be running into the "curse of dimensionality". Also, I would NOT delete outliers just because of some arbitrary threshold. You haven't said what it is you are studying, but, often, the outliers are where the int...
Can I delete excessive number of multivariate outliers, like over 10% in sample?
In addition to @karl broman's excellent point, I'm curious as to how many variables there are. You could be running into the "curse of dimensionality". Also, I would NOT delete outliers just becaus
Can I delete excessive number of multivariate outliers, like over 10% in sample? In addition to @karl broman's excellent point, I'm curious as to how many variables there are. You could be running into the "curse of dimensionality". Also, I would NOT delete outliers just because of some arbitrary threshold. You hav...
Can I delete excessive number of multivariate outliers, like over 10% in sample? In addition to @karl broman's excellent point, I'm curious as to how many variables there are. You could be running into the "curse of dimensionality". Also, I would NOT delete outliers just becaus
51,714
Can I delete excessive number of multivariate outliers, like over 10% in sample?
While the above topics are interesting, with 171 items I think validity is going to be a concern that overrides statistical ones. There's a real risk that people are going to answer mechanically, resulting in straightlining or in a very large initial factor that represents a halo or horn effect. I think your team sho...
Can I delete excessive number of multivariate outliers, like over 10% in sample?
While the above topics are interesting, with 171 items I think validity is going to be a concern that overrides statistical ones. There's a real risk that people are going to answer mechanically, res
Can I delete excessive number of multivariate outliers, like over 10% in sample? While the above topics are interesting, with 171 items I think validity is going to be a concern that overrides statistical ones. There's a real risk that people are going to answer mechanically, resulting in straightlining or in a very l...
Can I delete excessive number of multivariate outliers, like over 10% in sample? While the above topics are interesting, with 171 items I think validity is going to be a concern that overrides statistical ones. There's a real risk that people are going to answer mechanically, res
51,715
Working with correlation coefficients
Can I say .8978 is the strongest relationship between shopping habits and weight gain? Descriptively, you can say that it is the strongest relationship. Whether it is significantly stronger than the other two depends on your sample size. There's an online calculator for that. Based on the diffference in the coefficie...
Working with correlation coefficients
Can I say .8978 is the strongest relationship between shopping habits and weight gain? Descriptively, you can say that it is the strongest relationship. Whether it is significantly stronger than the
Working with correlation coefficients Can I say .8978 is the strongest relationship between shopping habits and weight gain? Descriptively, you can say that it is the strongest relationship. Whether it is significantly stronger than the other two depends on your sample size. There's an online calculator for that. Bas...
Working with correlation coefficients Can I say .8978 is the strongest relationship between shopping habits and weight gain? Descriptively, you can say that it is the strongest relationship. Whether it is significantly stronger than the
51,716
Working with correlation coefficients
Averaging correlation coefficients is a meaningless operation. Correlation is $$\rho = \frac{\mbox{Cov}[X,Y]}{\sqrt{\mbox{Var}[X]\mbox{Var}[Y]}}.$$ You cannot even average the components of it (the covariance and two variances), unless the means of all groups on both variables are the same. If they are not, your popula...
Working with correlation coefficients
Averaging correlation coefficients is a meaningless operation. Correlation is $$\rho = \frac{\mbox{Cov}[X,Y]}{\sqrt{\mbox{Var}[X]\mbox{Var}[Y]}}.$$ You cannot even average the components of it (the co
Working with correlation coefficients Averaging correlation coefficients is a meaningless operation. Correlation is $$\rho = \frac{\mbox{Cov}[X,Y]}{\sqrt{\mbox{Var}[X]\mbox{Var}[Y]}}.$$ You cannot even average the components of it (the covariance and two variances), unless the means of all groups on both variables are ...
Working with correlation coefficients Averaging correlation coefficients is a meaningless operation. Correlation is $$\rho = \frac{\mbox{Cov}[X,Y]}{\sqrt{\mbox{Var}[X]\mbox{Var}[Y]}}.$$ You cannot even average the components of it (the co
51,717
Relationships between two variables
Normality seems to be strongly violated at least by your y variable. I would log transform y to see if that cleans things up a bit. Then, fit a regression to log(y) ~ x. The formula the regression will return will be of the form log(y) = \alpha + \beta*x which you can transform back to the original scale by y = exp(\...
Relationships between two variables
Normality seems to be strongly violated at least by your y variable. I would log transform y to see if that cleans things up a bit. Then, fit a regression to log(y) ~ x. The formula the regression wi
Relationships between two variables Normality seems to be strongly violated at least by your y variable. I would log transform y to see if that cleans things up a bit. Then, fit a regression to log(y) ~ x. The formula the regression will return will be of the form log(y) = \alpha + \beta*x which you can transform bac...
Relationships between two variables Normality seems to be strongly violated at least by your y variable. I would log transform y to see if that cleans things up a bit. Then, fit a regression to log(y) ~ x. The formula the regression wi
51,718
Relationships between two variables
Another solution to your problem (without transforming variables) is regression with error distribution other then Gaussian for example Gamma or skewed t-Student. Gamma is in GLM family, so there is a lot of software to fit model with this error distribution.
Relationships between two variables
Another solution to your problem (without transforming variables) is regression with error distribution other then Gaussian for example Gamma or skewed t-Student. Gamma is in GLM family, so there is a
Relationships between two variables Another solution to your problem (without transforming variables) is regression with error distribution other then Gaussian for example Gamma or skewed t-Student. Gamma is in GLM family, so there is a lot of software to fit model with this error distribution.
Relationships between two variables Another solution to your problem (without transforming variables) is regression with error distribution other then Gaussian for example Gamma or skewed t-Student. Gamma is in GLM family, so there is a
51,719
Relationships between two variables
What you are looking for is called regression; there are a lot of methods you can do it, both statistical and machine learning ones. If you want to find f, you must use statistics; in that case you must first assume that f is of some form, like f:y=a*x+b and then use some regression method to fit the parameters. The pl...
Relationships between two variables
What you are looking for is called regression; there are a lot of methods you can do it, both statistical and machine learning ones. If you want to find f, you must use statistics; in that case you mu
Relationships between two variables What you are looking for is called regression; there are a lot of methods you can do it, both statistical and machine learning ones. If you want to find f, you must use statistics; in that case you must first assume that f is of some form, like f:y=a*x+b and then use some regression ...
Relationships between two variables What you are looking for is called regression; there are a lot of methods you can do it, both statistical and machine learning ones. If you want to find f, you must use statistics; in that case you mu
51,720
Relationships between two variables
And just eyeballing the data, you are probably going to want to transform the data, as (at least to me) it looks skewed. Looking at the histograms of the two variables should suggest which transforms may be beneficial. As suggested by mbq, more text here.
Relationships between two variables
And just eyeballing the data, you are probably going to want to transform the data, as (at least to me) it looks skewed. Looking at the histograms of the two variables should suggest which transforms
Relationships between two variables And just eyeballing the data, you are probably going to want to transform the data, as (at least to me) it looks skewed. Looking at the histograms of the two variables should suggest which transforms may be beneficial. As suggested by mbq, more text here.
Relationships between two variables And just eyeballing the data, you are probably going to want to transform the data, as (at least to me) it looks skewed. Looking at the histograms of the two variables should suggest which transforms
51,721
Relationships between two variables
I agree with the suggestions about running a regression possibly with log(y) as the outcome variable or some other suitable transformation. I just wanted to add one comment, if you are reporting the bivariate association, you might prefer: (a) to correlate log(x) and log(y), (b) Spearman's rho, which correlates the ran...
Relationships between two variables
I agree with the suggestions about running a regression possibly with log(y) as the outcome variable or some other suitable transformation. I just wanted to add one comment, if you are reporting the b
Relationships between two variables I agree with the suggestions about running a regression possibly with log(y) as the outcome variable or some other suitable transformation. I just wanted to add one comment, if you are reporting the bivariate association, you might prefer: (a) to correlate log(x) and log(y), (b) Spea...
Relationships between two variables I agree with the suggestions about running a regression possibly with log(y) as the outcome variable or some other suitable transformation. I just wanted to add one comment, if you are reporting the b
51,722
Relationships between two variables
Try a bivariate robust regression (see http://cran.r-project.org/web/packages/rrcov/vignettes/rrcov.pdf for an intro). If your data points are all positive, you might want to try to regress log(y) on log(x). Note that log() is not a substitute for a robust regression, but it sometimes makes the results more interpreta...
Relationships between two variables
Try a bivariate robust regression (see http://cran.r-project.org/web/packages/rrcov/vignettes/rrcov.pdf for an intro). If your data points are all positive, you might want to try to regress log(y) on
Relationships between two variables Try a bivariate robust regression (see http://cran.r-project.org/web/packages/rrcov/vignettes/rrcov.pdf for an intro). If your data points are all positive, you might want to try to regress log(y) on log(x). Note that log() is not a substitute for a robust regression, but it sometim...
Relationships between two variables Try a bivariate robust regression (see http://cran.r-project.org/web/packages/rrcov/vignettes/rrcov.pdf for an intro). If your data points are all positive, you might want to try to regress log(y) on
51,723
Relationships between two variables
Many have already made excellent suggestions regarding transforming the variables and using robust regression methods. But, when looking at the scatter plot, I observe two separate data sets. One set has a very strong linear relationship where the correlation is a lot higher than the overall 0.6. And, visually it lo...
Relationships between two variables
Many have already made excellent suggestions regarding transforming the variables and using robust regression methods. But, when looking at the scatter plot, I observe two separate data sets. One se
Relationships between two variables Many have already made excellent suggestions regarding transforming the variables and using robust regression methods. But, when looking at the scatter plot, I observe two separate data sets. One set has a very strong linear relationship where the correlation is a lot higher than t...
Relationships between two variables Many have already made excellent suggestions regarding transforming the variables and using robust regression methods. But, when looking at the scatter plot, I observe two separate data sets. One se
51,724
Relationships between two variables
Like the others have said, some sort of transformation is recommended. Your data seems highly clustered, and could be roughly linear, but it's difficult to tell with all the other points around it. Others have suggested trying a log transformation, but it might also be a good idea to try a Box-Cox Transformation. If th...
Relationships between two variables
Like the others have said, some sort of transformation is recommended. Your data seems highly clustered, and could be roughly linear, but it's difficult to tell with all the other points around it. Ot
Relationships between two variables Like the others have said, some sort of transformation is recommended. Your data seems highly clustered, and could be roughly linear, but it's difficult to tell with all the other points around it. Others have suggested trying a log transformation, but it might also be a good idea to...
Relationships between two variables Like the others have said, some sort of transformation is recommended. Your data seems highly clustered, and could be roughly linear, but it's difficult to tell with all the other points around it. Ot
51,725
Gradient Descent and Learning Rate
Consider the convex function $f(x) = |x|$. Then gradient descent would bounce back and forth forever: since the gradient is always either $+1$ or $-1$, with learning rate $\lambda$ and if $x\in(0, \lambda)$, then $x$ would alternate between $x$ and $x-\lambda$. If, as another example, $f(x) = x^2$, then gradient descen...
Gradient Descent and Learning Rate
Consider the convex function $f(x) = |x|$. Then gradient descent would bounce back and forth forever: since the gradient is always either $+1$ or $-1$, with learning rate $\lambda$ and if $x\in(0, \la
Gradient Descent and Learning Rate Consider the convex function $f(x) = |x|$. Then gradient descent would bounce back and forth forever: since the gradient is always either $+1$ or $-1$, with learning rate $\lambda$ and if $x\in(0, \lambda)$, then $x$ would alternate between $x$ and $x-\lambda$. If, as another example,...
Gradient Descent and Learning Rate Consider the convex function $f(x) = |x|$. Then gradient descent would bounce back and forth forever: since the gradient is always either $+1$ or $-1$, with learning rate $\lambda$ and if $x\in(0, \la
51,726
Gradient Descent and Learning Rate
With arbitrary precision numbers, we can't expect that the $k$th iterate of gradient descent will ever exactly equal the optimal value $f(x^*)$. In practice on a computer with floating-point numbers, we may actually get exact convergence. In terms of the rate of convergence, there are two theorems that can be generally...
Gradient Descent and Learning Rate
With arbitrary precision numbers, we can't expect that the $k$th iterate of gradient descent will ever exactly equal the optimal value $f(x^*)$. In practice on a computer with floating-point numbers,
Gradient Descent and Learning Rate With arbitrary precision numbers, we can't expect that the $k$th iterate of gradient descent will ever exactly equal the optimal value $f(x^*)$. In practice on a computer with floating-point numbers, we may actually get exact convergence. In terms of the rate of convergence, there are...
Gradient Descent and Learning Rate With arbitrary precision numbers, we can't expect that the $k$th iterate of gradient descent will ever exactly equal the optimal value $f(x^*)$. In practice on a computer with floating-point numbers,
51,727
Why are my test data R-squared's identical despite using different training data?
This is a simple linear regression, so the predictions are a linear function of the x values. The correlation of y with a linear function of x is the same as the correlation of y with x; the coefficients of the function don't matter. Exceptions to this rule are slopes of zero (where correlation doesn't exist, because ...
Why are my test data R-squared's identical despite using different training data?
This is a simple linear regression, so the predictions are a linear function of the x values. The correlation of y with a linear function of x is the same as the correlation of y with x; the coeffici
Why are my test data R-squared's identical despite using different training data? This is a simple linear regression, so the predictions are a linear function of the x values. The correlation of y with a linear function of x is the same as the correlation of y with x; the coefficients of the function don't matter. Exc...
Why are my test data R-squared's identical despite using different training data? This is a simple linear regression, so the predictions are a linear function of the x values. The correlation of y with a linear function of x is the same as the correlation of y with x; the coeffici
51,728
Why are my test data R-squared's identical despite using different training data?
This is to help you understand what user2554330 means. Let $x$ and $y$ be test data, and a predicted line be $\hat{y} = \hat{a} + \hat{b}x$. Then \begin{equation} \begin{split} \textrm{cor}(y, \hat{y}) &= \frac{\textrm{cov}(y, \hat{y})}{\sqrt{\textrm{var}(y)}\sqrt{\textrm{var}(\hat{y})}}\\ &= \frac{\textrm{cov}(y, \hat...
Why are my test data R-squared's identical despite using different training data?
This is to help you understand what user2554330 means. Let $x$ and $y$ be test data, and a predicted line be $\hat{y} = \hat{a} + \hat{b}x$. Then \begin{equation} \begin{split} \textrm{cor}(y, \hat{y}
Why are my test data R-squared's identical despite using different training data? This is to help you understand what user2554330 means. Let $x$ and $y$ be test data, and a predicted line be $\hat{y} = \hat{a} + \hat{b}x$. Then \begin{equation} \begin{split} \textrm{cor}(y, \hat{y}) &= \frac{\textrm{cov}(y, \hat{y})}{\...
Why are my test data R-squared's identical despite using different training data? This is to help you understand what user2554330 means. Let $x$ and $y$ be test data, and a predicted line be $\hat{y} = \hat{a} + \hat{b}x$. Then \begin{equation} \begin{split} \textrm{cor}(y, \hat{y}
51,729
Are the RandomForest and Ranger libraries the same?
They are different implementations of the same algorithm. As random forest utilises bagging and bagging is inherently stochastic, we cannot guarantee that they will give exactly the same result. That said, if one downright errs, this is a coding issue rather than a statistical one.
Are the RandomForest and Ranger libraries the same?
They are different implementations of the same algorithm. As random forest utilises bagging and bagging is inherently stochastic, we cannot guarantee that they will give exactly the same result. That
Are the RandomForest and Ranger libraries the same? They are different implementations of the same algorithm. As random forest utilises bagging and bagging is inherently stochastic, we cannot guarantee that they will give exactly the same result. That said, if one downright errs, this is a coding issue rather than a st...
Are the RandomForest and Ranger libraries the same? They are different implementations of the same algorithm. As random forest utilises bagging and bagging is inherently stochastic, we cannot guarantee that they will give exactly the same result. That
51,730
Are the RandomForest and Ranger libraries the same?
The title of the paper introducing it is literally ranger: A Fast Implementation of Random Forests for High Dimensional Data in C++ and R (highlighting by myself). But as said by usεr11852, random forest is randomized and there may be implementational differences, so exactly the same results are not guaranteed.
Are the RandomForest and Ranger libraries the same?
The title of the paper introducing it is literally ranger: A Fast Implementation of Random Forests for High Dimensional Data in C++ and R (highlighting by myself). But as said by usεr11852, random f
Are the RandomForest and Ranger libraries the same? The title of the paper introducing it is literally ranger: A Fast Implementation of Random Forests for High Dimensional Data in C++ and R (highlighting by myself). But as said by usεr11852, random forest is randomized and there may be implementational differences, s...
Are the RandomForest and Ranger libraries the same? The title of the paper introducing it is literally ranger: A Fast Implementation of Random Forests for High Dimensional Data in C++ and R (highlighting by myself). But as said by usεr11852, random f
51,731
Validity of AUC for binary categorical variables
The ROC curve is a statistic of ranks, so it's valid as long as the way you're sorting the data is meaningful. In its most common application, we're sorting according to the predicted probabilities produced by a model. This is meaningful, in the sense that we have the most likely events at one extreme and the least lik...
Validity of AUC for binary categorical variables
The ROC curve is a statistic of ranks, so it's valid as long as the way you're sorting the data is meaningful. In its most common application, we're sorting according to the predicted probabilities pr
Validity of AUC for binary categorical variables The ROC curve is a statistic of ranks, so it's valid as long as the way you're sorting the data is meaningful. In its most common application, we're sorting according to the predicted probabilities produced by a model. This is meaningful, in the sense that we have the mo...
Validity of AUC for binary categorical variables The ROC curve is a statistic of ranks, so it's valid as long as the way you're sorting the data is meaningful. In its most common application, we're sorting according to the predicted probabilities pr
51,732
Validity of AUC for binary categorical variables
It's helpful to see that the ROC curve here isn't really a curve. Instead, you're effectively producing a model that says P(Survive|Male) = .18 and P(Survive|Female) = .74 (the averages in the data), and making predictions using a range of thresholds, e.g. prediction = 1 if p_survive > threshold, or 0 otherwise. You en...
Validity of AUC for binary categorical variables
It's helpful to see that the ROC curve here isn't really a curve. Instead, you're effectively producing a model that says P(Survive|Male) = .18 and P(Survive|Female) = .74 (the averages in the data),
Validity of AUC for binary categorical variables It's helpful to see that the ROC curve here isn't really a curve. Instead, you're effectively producing a model that says P(Survive|Male) = .18 and P(Survive|Female) = .74 (the averages in the data), and making predictions using a range of thresholds, e.g. prediction = 1...
Validity of AUC for binary categorical variables It's helpful to see that the ROC curve here isn't really a curve. Instead, you're effectively producing a model that says P(Survive|Male) = .18 and P(Survive|Female) = .74 (the averages in the data),
51,733
Validity of AUC for binary categorical variables
This approach isn't wrong, but it's not a very useful application of the ROC. The purpose of an ROC curve is to show model performance over a range of classification thresholds, and the AUC summarizes the quality of the model over all possible thresholds. With a two-class categorical predictor variable, you have only t...
Validity of AUC for binary categorical variables
This approach isn't wrong, but it's not a very useful application of the ROC. The purpose of an ROC curve is to show model performance over a range of classification thresholds, and the AUC summarizes
Validity of AUC for binary categorical variables This approach isn't wrong, but it's not a very useful application of the ROC. The purpose of an ROC curve is to show model performance over a range of classification thresholds, and the AUC summarizes the quality of the model over all possible thresholds. With a two-clas...
Validity of AUC for binary categorical variables This approach isn't wrong, but it's not a very useful application of the ROC. The purpose of an ROC curve is to show model performance over a range of classification thresholds, and the AUC summarizes
51,734
Validity of AUC for binary categorical variables
Just to clarify, ROC curve means plotting how much True Positives you get compared to False Positives. Whether the target label is numerical or categorical is a matter of implementation but it does not change the validity of the principles, you are still assessing how "good" (AUC) your model is at discriminating betwee...
Validity of AUC for binary categorical variables
Just to clarify, ROC curve means plotting how much True Positives you get compared to False Positives. Whether the target label is numerical or categorical is a matter of implementation but it does no
Validity of AUC for binary categorical variables Just to clarify, ROC curve means plotting how much True Positives you get compared to False Positives. Whether the target label is numerical or categorical is a matter of implementation but it does not change the validity of the principles, you are still assessing how "g...
Validity of AUC for binary categorical variables Just to clarify, ROC curve means plotting how much True Positives you get compared to False Positives. Whether the target label is numerical or categorical is a matter of implementation but it does no
51,735
What does $X=x|Y=y$ actually mean by itself?
Example: Say you have a group of men and women and know their handedness (left/right). It is like depicted in the table below $$\begin{array}{r|c|c | c} &\text{men}&\text{women} &\text{total}\\ \hline \text{left handed}&9&4&13\\\hline \text{right handed}&43&44&87\\\hline \text{total}&52&48&100 \end{array}$$ Say you pic...
What does $X=x|Y=y$ actually mean by itself?
Example: Say you have a group of men and women and know their handedness (left/right). It is like depicted in the table below $$\begin{array}{r|c|c | c} &\text{men}&\text{women} &\text{total}\\ \hline
What does $X=x|Y=y$ actually mean by itself? Example: Say you have a group of men and women and know their handedness (left/right). It is like depicted in the table below $$\begin{array}{r|c|c | c} &\text{men}&\text{women} &\text{total}\\ \hline \text{left handed}&9&4&13\\\hline \text{right handed}&43&44&87\\\hline \te...
What does $X=x|Y=y$ actually mean by itself? Example: Say you have a group of men and women and know their handedness (left/right). It is like depicted in the table below $$\begin{array}{r|c|c | c} &\text{men}&\text{women} &\text{total}\\ \hline
51,736
What does $X=x|Y=y$ actually mean by itself?
The $|$ symbol in probability theory stands for “given”. You would most commonly see it used for conditional probability $P(Y|X)$, the probability of $X$ given $Y$. While it’s a slight abuse of notation, you could see something like $$ Y|X \sim \mathcal{N}(\mu, \sigma) $$ for $Y$ conditionally on $X$ following normal d...
What does $X=x|Y=y$ actually mean by itself?
The $|$ symbol in probability theory stands for “given”. You would most commonly see it used for conditional probability $P(Y|X)$, the probability of $X$ given $Y$. While it’s a slight abuse of notati
What does $X=x|Y=y$ actually mean by itself? The $|$ symbol in probability theory stands for “given”. You would most commonly see it used for conditional probability $P(Y|X)$, the probability of $X$ given $Y$. While it’s a slight abuse of notation, you could see something like $$ Y|X \sim \mathcal{N}(\mu, \sigma) $$ fo...
What does $X=x|Y=y$ actually mean by itself? The $|$ symbol in probability theory stands for “given”. You would most commonly see it used for conditional probability $P(Y|X)$, the probability of $X$ given $Y$. While it’s a slight abuse of notati
51,737
What does $X=x|Y=y$ actually mean by itself?
This can get quite philosophical fast. But, Judea Pearl's book Causal Inference for Statistics Section 1.3.3 provides a nice intuition, the operator $|$ implies a filtering of the data in the frequentist interpretation. An intuitive example would be two variables having bounds $P(X>a|Y<b)$, so conditioning implies fi...
What does $X=x|Y=y$ actually mean by itself?
This can get quite philosophical fast. But, Judea Pearl's book Causal Inference for Statistics Section 1.3.3 provides a nice intuition, the operator $|$ implies a filtering of the data in the freque
What does $X=x|Y=y$ actually mean by itself? This can get quite philosophical fast. But, Judea Pearl's book Causal Inference for Statistics Section 1.3.3 provides a nice intuition, the operator $|$ implies a filtering of the data in the frequentist interpretation. An intuitive example would be two variables having bo...
What does $X=x|Y=y$ actually mean by itself? This can get quite philosophical fast. But, Judea Pearl's book Causal Inference for Statistics Section 1.3.3 provides a nice intuition, the operator $|$ implies a filtering of the data in the freque
51,738
Why does the t-test produce non significant p-values when there are outliers?
When you move an observation up you impact that group's sd as well as the mean. With the Welch test you also generally pull down the df. For two samples, of sizes 10 and 11, initially with the same standard deviation and half a standard deviation apart, here's the effect on the difference in means of moving one observa...
Why does the t-test produce non significant p-values when there are outliers?
When you move an observation up you impact that group's sd as well as the mean. With the Welch test you also generally pull down the df. For two samples, of sizes 10 and 11, initially with the same st
Why does the t-test produce non significant p-values when there are outliers? When you move an observation up you impact that group's sd as well as the mean. With the Welch test you also generally pull down the df. For two samples, of sizes 10 and 11, initially with the same standard deviation and half a standard devia...
Why does the t-test produce non significant p-values when there are outliers? When you move an observation up you impact that group's sd as well as the mean. With the Welch test you also generally pull down the df. For two samples, of sizes 10 and 11, initially with the same st
51,739
Why does the t-test produce non significant p-values when there are outliers?
You’re expecting to drag up the mean of that group by having a gigantic number, right? You’ll be successful in dragging up that mean by doing that. It also expands the variance, and that’s why you’re not getting a low p-value, despite the considerably different means. The t-test is hard to trick with these kinds of ext...
Why does the t-test produce non significant p-values when there are outliers?
You’re expecting to drag up the mean of that group by having a gigantic number, right? You’ll be successful in dragging up that mean by doing that. It also expands the variance, and that’s why you’re
Why does the t-test produce non significant p-values when there are outliers? You’re expecting to drag up the mean of that group by having a gigantic number, right? You’ll be successful in dragging up that mean by doing that. It also expands the variance, and that’s why you’re not getting a low p-value, despite the con...
Why does the t-test produce non significant p-values when there are outliers? You’re expecting to drag up the mean of that group by having a gigantic number, right? You’ll be successful in dragging up that mean by doing that. It also expands the variance, and that’s why you’re
51,740
Why does the t-test produce non significant p-values when there are outliers?
You get a small p-value from a t-test (and many other types of test as well) when the mean difference between the sample means is large, as you probably expected. However, the test is looking for 'large' relative the the variability in the samples and your introduction of an 'outlier' has inflated the variability and s...
Why does the t-test produce non significant p-values when there are outliers?
You get a small p-value from a t-test (and many other types of test as well) when the mean difference between the sample means is large, as you probably expected. However, the test is looking for 'lar
Why does the t-test produce non significant p-values when there are outliers? You get a small p-value from a t-test (and many other types of test as well) when the mean difference between the sample means is large, as you probably expected. However, the test is looking for 'large' relative the the variability in the sa...
Why does the t-test produce non significant p-values when there are outliers? You get a small p-value from a t-test (and many other types of test as well) when the mean difference between the sample means is large, as you probably expected. However, the test is looking for 'lar
51,741
Interpretation of coefficients in a poorly performing GLM
The statistical interpretation of the coefficients doesn't depend on how the model was fit. I could make completely random guesses of the coefficients and they would have the same interpretation as they would had I estimated them with maximum likelihood. For two units identical on all measured variables except that the...
Interpretation of coefficients in a poorly performing GLM
The statistical interpretation of the coefficients doesn't depend on how the model was fit. I could make completely random guesses of the coefficients and they would have the same interpretation as th
Interpretation of coefficients in a poorly performing GLM The statistical interpretation of the coefficients doesn't depend on how the model was fit. I could make completely random guesses of the coefficients and they would have the same interpretation as they would had I estimated them with maximum likelihood. For two...
Interpretation of coefficients in a poorly performing GLM The statistical interpretation of the coefficients doesn't depend on how the model was fit. I could make completely random guesses of the coefficients and they would have the same interpretation as th
51,742
Interpretation of coefficients in a poorly performing GLM
We do something like this all the time when we do t-testing of means. Remember that a t-test of means is a two-sample ANOVA, meaning that we do a regression like: $$\hat{y}_i = \hat{\beta}_0 + \hat{\beta}_1x_i$$ where $x_i$ is a $0/1$ indicator variable for group membership. When you do a t-test, you often leave lots o...
Interpretation of coefficients in a poorly performing GLM
We do something like this all the time when we do t-testing of means. Remember that a t-test of means is a two-sample ANOVA, meaning that we do a regression like: $$\hat{y}_i = \hat{\beta}_0 + \hat{\b
Interpretation of coefficients in a poorly performing GLM We do something like this all the time when we do t-testing of means. Remember that a t-test of means is a two-sample ANOVA, meaning that we do a regression like: $$\hat{y}_i = \hat{\beta}_0 + \hat{\beta}_1x_i$$ where $x_i$ is a $0/1$ indicator variable for grou...
Interpretation of coefficients in a poorly performing GLM We do something like this all the time when we do t-testing of means. Remember that a t-test of means is a two-sample ANOVA, meaning that we do a regression like: $$\hat{y}_i = \hat{\beta}_0 + \hat{\b
51,743
Interpretation of coefficients in a poorly performing GLM
My advice on how to gain some guidance in a particular context of a poor regression model, is to proceed to construct a model where, if the correct model specification is provided, along with its random error structure, it actually performs well. The latter is determined based on parameter estimation routines as commo...
Interpretation of coefficients in a poorly performing GLM
My advice on how to gain some guidance in a particular context of a poor regression model, is to proceed to construct a model where, if the correct model specification is provided, along with its ran
Interpretation of coefficients in a poorly performing GLM My advice on how to gain some guidance in a particular context of a poor regression model, is to proceed to construct a model where, if the correct model specification is provided, along with its random error structure, it actually performs well. The latter is ...
Interpretation of coefficients in a poorly performing GLM My advice on how to gain some guidance in a particular context of a poor regression model, is to proceed to construct a model where, if the correct model specification is provided, along with its ran
51,744
Logarithm of dependent variable is uniformly distributed. How to calculate a confidence interval for the mean?
In regression problems the marginal distribution of Y does not matter. The conditional distribution of Y | X is what matters. For some problems this translates to examining the distribution of the model residuals. But your sample size is too small to check assumptions. It would be far better to use a robust approach...
Logarithm of dependent variable is uniformly distributed. How to calculate a confidence interval for
In regression problems the marginal distribution of Y does not matter. The conditional distribution of Y | X is what matters. For some problems this translates to examining the distribution of the m
Logarithm of dependent variable is uniformly distributed. How to calculate a confidence interval for the mean? In regression problems the marginal distribution of Y does not matter. The conditional distribution of Y | X is what matters. For some problems this translates to examining the distribution of the model resi...
Logarithm of dependent variable is uniformly distributed. How to calculate a confidence interval for In regression problems the marginal distribution of Y does not matter. The conditional distribution of Y | X is what matters. For some problems this translates to examining the distribution of the m
51,745
Logarithm of dependent variable is uniformly distributed. How to calculate a confidence interval for the mean?
Can I treat this as log-normal data even though its logarithm is clearly not following a bell curve? No, in this case you are dealing with a variable that is log-uniform distributed. One approach is to use the bootstrap, where you takes samples repeatedly with replacement and compute the means of the samples. See the ...
Logarithm of dependent variable is uniformly distributed. How to calculate a confidence interval for
Can I treat this as log-normal data even though its logarithm is clearly not following a bell curve? No, in this case you are dealing with a variable that is log-uniform distributed. One approach is
Logarithm of dependent variable is uniformly distributed. How to calculate a confidence interval for the mean? Can I treat this as log-normal data even though its logarithm is clearly not following a bell curve? No, in this case you are dealing with a variable that is log-uniform distributed. One approach is to use th...
Logarithm of dependent variable is uniformly distributed. How to calculate a confidence interval for Can I treat this as log-normal data even though its logarithm is clearly not following a bell curve? No, in this case you are dealing with a variable that is log-uniform distributed. One approach is
51,746
Logarithm of dependent variable is uniformly distributed. How to calculate a confidence interval for the mean?
Something whose log would be close to uniform is somewhat skew, but not particularly difficult to deal with; sample means of size 24 will be very close to normally distributed. If it were actually log-uniform we could work out a suitable interval fairly readily but I wouldn't actually use the fact that the sample looks...
Logarithm of dependent variable is uniformly distributed. How to calculate a confidence interval for
Something whose log would be close to uniform is somewhat skew, but not particularly difficult to deal with; sample means of size 24 will be very close to normally distributed. If it were actually log
Logarithm of dependent variable is uniformly distributed. How to calculate a confidence interval for the mean? Something whose log would be close to uniform is somewhat skew, but not particularly difficult to deal with; sample means of size 24 will be very close to normally distributed. If it were actually log-uniform ...
Logarithm of dependent variable is uniformly distributed. How to calculate a confidence interval for Something whose log would be close to uniform is somewhat skew, but not particularly difficult to deal with; sample means of size 24 will be very close to normally distributed. If it were actually log
51,747
Inverse of the covariance matrix of a multivariate normal distribution
If the variables are perfectly correlated, i.e. $\rho=1$, then covariance matrix becomes: $$\Sigma=\begin{bmatrix}\sigma_1^2 & \sigma_1\sigma_2 \\ \sigma_1\sigma_2 & \sigma_2^2 \end{bmatrix}$$ and its determinant is $\Delta=\sigma_1^2\sigma_2^2-\sigma_1\sigma_2\sigma_1\sigma_2=0$, which means the matrix is not invertib...
Inverse of the covariance matrix of a multivariate normal distribution
If the variables are perfectly correlated, i.e. $\rho=1$, then covariance matrix becomes: $$\Sigma=\begin{bmatrix}\sigma_1^2 & \sigma_1\sigma_2 \\ \sigma_1\sigma_2 & \sigma_2^2 \end{bmatrix}$$ and its
Inverse of the covariance matrix of a multivariate normal distribution If the variables are perfectly correlated, i.e. $\rho=1$, then covariance matrix becomes: $$\Sigma=\begin{bmatrix}\sigma_1^2 & \sigma_1\sigma_2 \\ \sigma_1\sigma_2 & \sigma_2^2 \end{bmatrix}$$ and its determinant is $\Delta=\sigma_1^2\sigma_2^2-\sig...
Inverse of the covariance matrix of a multivariate normal distribution If the variables are perfectly correlated, i.e. $\rho=1$, then covariance matrix becomes: $$\Sigma=\begin{bmatrix}\sigma_1^2 & \sigma_1\sigma_2 \\ \sigma_1\sigma_2 & \sigma_2^2 \end{bmatrix}$$ and its
51,748
Inverse of the covariance matrix of a multivariate normal distribution
No. The covariance matrix of two perfectly correlated standard normal random variables is given by $\Sigma = \pmatrix{1 & 1 \\1 & 1}$, which is not invertible.
Inverse of the covariance matrix of a multivariate normal distribution
No. The covariance matrix of two perfectly correlated standard normal random variables is given by $\Sigma = \pmatrix{1 & 1 \\1 & 1}$, which is not invertible.
Inverse of the covariance matrix of a multivariate normal distribution No. The covariance matrix of two perfectly correlated standard normal random variables is given by $\Sigma = \pmatrix{1 & 1 \\1 & 1}$, which is not invertible.
Inverse of the covariance matrix of a multivariate normal distribution No. The covariance matrix of two perfectly correlated standard normal random variables is given by $\Sigma = \pmatrix{1 & 1 \\1 & 1}$, which is not invertible.
51,749
How can we calculate the probability that the randomly chosen function will be strictly increasing?
Let us pick $m$ elements from $\{1,\dotsc,n\}$, let us call these $a_1 < a_2 < \dotsc , a_m$. Clearly these define a strictly increasing function $f$ from $\{1,\dotsc,m\} \to \{1,\dotsc,n\}$ via the rule $f(i) = a_i$. Furthermore, any strictly increasing function defined on the above sets is of this form. Hence there a...
How can we calculate the probability that the randomly chosen function will be strictly increasing?
Let us pick $m$ elements from $\{1,\dotsc,n\}$, let us call these $a_1 < a_2 < \dotsc , a_m$. Clearly these define a strictly increasing function $f$ from $\{1,\dotsc,m\} \to \{1,\dotsc,n\}$ via the r
How can we calculate the probability that the randomly chosen function will be strictly increasing? Let us pick $m$ elements from $\{1,\dotsc,n\}$, let us call these $a_1 < a_2 < \dotsc , a_m$. Clearly these define a strictly increasing function $f$ from $\{1,\dotsc,m\} \to \{1,\dotsc,n\}$ via the rule $f(i) = a_i$. Fu...
How can we calculate the probability that the randomly chosen function will be strictly increasing? Let us pick $m$ elements from $\{1,\dotsc,n\}$, let us call these $a_1 < a_2 < \dotsc , a_m$. Clearly these define a strictly increasing function $f$ from $\{1,\dotsc,m\} \to \{1,\dotsc,n\}$ via the r
51,750
How can we calculate the probability that the randomly chosen function will be strictly increasing?
Let $S(n,m)$ be the number of sub-arrays $1 \leqslant k_1 < k_2 < \cdots < k_m \leqslant n$ containing $m$ integer values that are increasing and are bounded by the values one and $n$. This binary function is well-defined for all integers $1 \leqslant m \leqslant n$, giving a triangular array of values. With a simple ...
How can we calculate the probability that the randomly chosen function will be strictly increasing?
Let $S(n,m)$ be the number of sub-arrays $1 \leqslant k_1 < k_2 < \cdots < k_m \leqslant n$ containing $m$ integer values that are increasing and are bounded by the values one and $n$. This binary fu
How can we calculate the probability that the randomly chosen function will be strictly increasing? Let $S(n,m)$ be the number of sub-arrays $1 \leqslant k_1 < k_2 < \cdots < k_m \leqslant n$ containing $m$ integer values that are increasing and are bounded by the values one and $n$. This binary function is well-defin...
How can we calculate the probability that the randomly chosen function will be strictly increasing? Let $S(n,m)$ be the number of sub-arrays $1 \leqslant k_1 < k_2 < \cdots < k_m \leqslant n$ containing $m$ integer values that are increasing and are bounded by the values one and $n$. This binary fu
51,751
Why i.i.d. is the most conservative distribution assumption
I think the use of a word conservative here is interesting to say the least. I'm used to saying it's the strongest assumption, the one that's hardest to prove that it holds and frankly the one that's probably violated most easily. It's the assumption that's easiest to build upon when teaching the regression theory. You...
Why i.i.d. is the most conservative distribution assumption
I think the use of a word conservative here is interesting to say the least. I'm used to saying it's the strongest assumption, the one that's hardest to prove that it holds and frankly the one that's
Why i.i.d. is the most conservative distribution assumption I think the use of a word conservative here is interesting to say the least. I'm used to saying it's the strongest assumption, the one that's hardest to prove that it holds and frankly the one that's probably violated most easily. It's the assumption that's ea...
Why i.i.d. is the most conservative distribution assumption I think the use of a word conservative here is interesting to say the least. I'm used to saying it's the strongest assumption, the one that's hardest to prove that it holds and frankly the one that's
51,752
Why i.i.d. is the most conservative distribution assumption
(I must note that I have not read the book, and thus may be misinterpreting this passage, or criticizing it inappropriately. That said...) I don't think this is correct. The standard regression assumption of i.i.d. errors does not pertain to the population from which the data were drawn. It is about the data that...
Why i.i.d. is the most conservative distribution assumption
(I must note that I have not read the book, and thus may be misinterpreting this passage, or criticizing it inappropriately. That said...) I don't think this is correct. The standard regression a
Why i.i.d. is the most conservative distribution assumption (I must note that I have not read the book, and thus may be misinterpreting this passage, or criticizing it inappropriately. That said...) I don't think this is correct. The standard regression assumption of i.i.d. errors does not pertain to the populatio...
Why i.i.d. is the most conservative distribution assumption (I must note that I have not read the book, and thus may be misinterpreting this passage, or criticizing it inappropriately. That said...) I don't think this is correct. The standard regression a
51,753
Why i.i.d. is the most conservative distribution assumption
One possible interpretation of "conservative" is in the context of statistical testing. Conservative tests reject the null hypothesis less often than they should. An example of a conservative test is the Fisher's Exact Test: the actual false positive error rate is less than the nominal size of the test due to the discr...
Why i.i.d. is the most conservative distribution assumption
One possible interpretation of "conservative" is in the context of statistical testing. Conservative tests reject the null hypothesis less often than they should. An example of a conservative test is
Why i.i.d. is the most conservative distribution assumption One possible interpretation of "conservative" is in the context of statistical testing. Conservative tests reject the null hypothesis less often than they should. An example of a conservative test is the Fisher's Exact Test: the actual false positive error rat...
Why i.i.d. is the most conservative distribution assumption One possible interpretation of "conservative" is in the context of statistical testing. Conservative tests reject the null hypothesis less often than they should. An example of a conservative test is
51,754
Is there any limitation for the number of categories in Multinomial logistic regression?
There are a number of ways to think about this question. Probably the first consideration is resource dependent, boiling down to where you are doing your analysis: laptop or massively parallel platform? You should ask how much RAM or memory is accessible. RAM impacts the ability of your software to, e.g., invert a cros...
Is there any limitation for the number of categories in Multinomial logistic regression?
There are a number of ways to think about this question. Probably the first consideration is resource dependent, boiling down to where you are doing your analysis: laptop or massively parallel platfor
Is there any limitation for the number of categories in Multinomial logistic regression? There are a number of ways to think about this question. Probably the first consideration is resource dependent, boiling down to where you are doing your analysis: laptop or massively parallel platform? You should ask how much RAM ...
Is there any limitation for the number of categories in Multinomial logistic regression? There are a number of ways to think about this question. Probably the first consideration is resource dependent, boiling down to where you are doing your analysis: laptop or massively parallel platfor
51,755
Is there any limitation for the number of categories in Multinomial logistic regression?
There is no hard limit for the number of categories in multinomial logistic regression, but the number of parameters will grow very fast, so you will need a lot of data with many categories. Also, the interpretation of results will be difficult with many categories. This question is very broad, you are probably bette...
Is there any limitation for the number of categories in Multinomial logistic regression?
There is no hard limit for the number of categories in multinomial logistic regression, but the number of parameters will grow very fast, so you will need a lot of data with many categories. Also, th
Is there any limitation for the number of categories in Multinomial logistic regression? There is no hard limit for the number of categories in multinomial logistic regression, but the number of parameters will grow very fast, so you will need a lot of data with many categories. Also, the interpretation of results wil...
Is there any limitation for the number of categories in Multinomial logistic regression? There is no hard limit for the number of categories in multinomial logistic regression, but the number of parameters will grow very fast, so you will need a lot of data with many categories. Also, th
51,756
Is there any limitation for the number of categories in Multinomial logistic regression?
As estimating a single probability requires 96 observations to achieve a margin of error of +/- 0.10, one could say that if you have at least 96 observations in the smallest cell formed by cross-classifying $Y$ with any of the categorical $X$s the number of categories for $Y$ is not statistically problematic. See Secti...
Is there any limitation for the number of categories in Multinomial logistic regression?
As estimating a single probability requires 96 observations to achieve a margin of error of +/- 0.10, one could say that if you have at least 96 observations in the smallest cell formed by cross-class
Is there any limitation for the number of categories in Multinomial logistic regression? As estimating a single probability requires 96 observations to achieve a margin of error of +/- 0.10, one could say that if you have at least 96 observations in the smallest cell formed by cross-classifying $Y$ with any of the cate...
Is there any limitation for the number of categories in Multinomial logistic regression? As estimating a single probability requires 96 observations to achieve a margin of error of +/- 0.10, one could say that if you have at least 96 observations in the smallest cell formed by cross-class
51,757
Skew and Standard Deviation
No. Most simple example in excel: Skewness is equal in both cases, standard deviation highly different. Therefore it is not appropriate to say in general that high skew means large std. Skewness is a direction in which a sample "leans" and does not depend on scaling, whereas standard deviation highly depends on scali...
Skew and Standard Deviation
No. Most simple example in excel: Skewness is equal in both cases, standard deviation highly different. Therefore it is not appropriate to say in general that high skew means large std. Skewness is
Skew and Standard Deviation No. Most simple example in excel: Skewness is equal in both cases, standard deviation highly different. Therefore it is not appropriate to say in general that high skew means large std. Skewness is a direction in which a sample "leans" and does not depend on scaling, whereas standard devia...
Skew and Standard Deviation No. Most simple example in excel: Skewness is equal in both cases, standard deviation highly different. Therefore it is not appropriate to say in general that high skew means large std. Skewness is
51,758
Skew and Standard Deviation
Skewness (by any reasonable measure - and there are a number that are used) is a consequence of the shape of the distribution, not of its location or scale - you could add(/subtract) a constant to the random variable or multiply(/divide) by a constant, and it would not change how skewed the distribution was. For exampl...
Skew and Standard Deviation
Skewness (by any reasonable measure - and there are a number that are used) is a consequence of the shape of the distribution, not of its location or scale - you could add(/subtract) a constant to the
Skew and Standard Deviation Skewness (by any reasonable measure - and there are a number that are used) is a consequence of the shape of the distribution, not of its location or scale - you could add(/subtract) a constant to the random variable or multiply(/divide) by a constant, and it would not change how skewed the ...
Skew and Standard Deviation Skewness (by any reasonable measure - and there are a number that are used) is a consequence of the shape of the distribution, not of its location or scale - you could add(/subtract) a constant to the
51,759
Are these approaches Bayesian, Frequentist or both?
You're making a familiar category error here. The methods you are talking about all correspond to some logical or algebraic structure or other, which is 'just math'. Similarly, they each have a particular implementation, which we might describe as 'just programming'. Neither math nor programming are well described a...
Are these approaches Bayesian, Frequentist or both?
You're making a familiar category error here. The methods you are talking about all correspond to some logical or algebraic structure or other, which is 'just math'. Similarly, they each have a part
Are these approaches Bayesian, Frequentist or both? You're making a familiar category error here. The methods you are talking about all correspond to some logical or algebraic structure or other, which is 'just math'. Similarly, they each have a particular implementation, which we might describe as 'just programming'...
Are these approaches Bayesian, Frequentist or both? You're making a familiar category error here. The methods you are talking about all correspond to some logical or algebraic structure or other, which is 'just math'. Similarly, they each have a part
51,760
How can I prove that the median is a nonlinear function?
Median is homogenous of degree 1 Let $a$ be a real scalar and $\mathbf{x}$ be a vector in $\mathcal{R}^n$. Let us number the elements of $\mathbf{x}$ in order so that $x_1 \leq x_2 \leq \ldots \leq x_n $. Let $x_m = f(\mathbf{x})$ be the median of $\mathbf{x}$. Observe that for $a \geq 0$, the elements of the vector $...
How can I prove that the median is a nonlinear function?
Median is homogenous of degree 1 Let $a$ be a real scalar and $\mathbf{x}$ be a vector in $\mathcal{R}^n$. Let us number the elements of $\mathbf{x}$ in order so that $x_1 \leq x_2 \leq \ldots \leq x_
How can I prove that the median is a nonlinear function? Median is homogenous of degree 1 Let $a$ be a real scalar and $\mathbf{x}$ be a vector in $\mathcal{R}^n$. Let us number the elements of $\mathbf{x}$ in order so that $x_1 \leq x_2 \leq \ldots \leq x_n $. Let $x_m = f(\mathbf{x})$ be the median of $\mathbf{x}$. ...
How can I prove that the median is a nonlinear function? Median is homogenous of degree 1 Let $a$ be a real scalar and $\mathbf{x}$ be a vector in $\mathcal{R}^n$. Let us number the elements of $\mathbf{x}$ in order so that $x_1 \leq x_2 \leq \ldots \leq x_
51,761
How can I prove that the median is a nonlinear function?
The OP is correct -- median is not linear since additivity does not hold, but homogeneity of degree $1$ holds. Additivity does not hold We show by counterexample that the additivity does not hold: let $x=(0,1,2)$ and $y=(2,0,0)$ and let $f$ be the mapping from a vector to the median of its elements. Now, $f(x)=1,~f(y)=...
How can I prove that the median is a nonlinear function?
The OP is correct -- median is not linear since additivity does not hold, but homogeneity of degree $1$ holds. Additivity does not hold We show by counterexample that the additivity does not hold: let
How can I prove that the median is a nonlinear function? The OP is correct -- median is not linear since additivity does not hold, but homogeneity of degree $1$ holds. Additivity does not hold We show by counterexample that the additivity does not hold: let $x=(0,1,2)$ and $y=(2,0,0)$ and let $f$ be the mapping from a ...
How can I prove that the median is a nonlinear function? The OP is correct -- median is not linear since additivity does not hold, but homogeneity of degree $1$ holds. Additivity does not hold We show by counterexample that the additivity does not hold: let
51,762
How can I prove that the median is a nonlinear function?
First, median minimizes the absolute error (Hurley, 2009) and $\mathrm{abs}$ is not a linear function. As about $\alpha f(x) = f(\alpha x)$, there can be two interpretations depending on if you ask about case where $\alpha$ is a scalar, or a vector. Let's consider both cases, but first recall that we calculate median b...
How can I prove that the median is a nonlinear function?
First, median minimizes the absolute error (Hurley, 2009) and $\mathrm{abs}$ is not a linear function. As about $\alpha f(x) = f(\alpha x)$, there can be two interpretations depending on if you ask ab
How can I prove that the median is a nonlinear function? First, median minimizes the absolute error (Hurley, 2009) and $\mathrm{abs}$ is not a linear function. As about $\alpha f(x) = f(\alpha x)$, there can be two interpretations depending on if you ask about case where $\alpha$ is a scalar, or a vector. Let's conside...
How can I prove that the median is a nonlinear function? First, median minimizes the absolute error (Hurley, 2009) and $\mathrm{abs}$ is not a linear function. As about $\alpha f(x) = f(\alpha x)$, there can be two interpretations depending on if you ask ab
51,763
What's wrong to fit periodic data with polynomials?
In just the dataset you've provided, the only real downside to using polynomials over the Fourier basis is the issue of discontinuity at $T = 0$ and $T = 24$. As you stated, you can add constraints to fix this up if you really wished to. But more typically for this type of data, we observe several cycles. In this case...
What's wrong to fit periodic data with polynomials?
In just the dataset you've provided, the only real downside to using polynomials over the Fourier basis is the issue of discontinuity at $T = 0$ and $T = 24$. As you stated, you can add constraints to
What's wrong to fit periodic data with polynomials? In just the dataset you've provided, the only real downside to using polynomials over the Fourier basis is the issue of discontinuity at $T = 0$ and $T = 24$. As you stated, you can add constraints to fix this up if you really wished to. But more typically for this t...
What's wrong to fit periodic data with polynomials? In just the dataset you've provided, the only real downside to using polynomials over the Fourier basis is the issue of discontinuity at $T = 0$ and $T = 24$. As you stated, you can add constraints to
51,764
What's wrong to fit periodic data with polynomials?
The wrong is that to exactly capture the simplest periodic process such as a monochrome sine wave you need infinite number of polynomial terms. Look at Taylor expansion formula. Intuitively you want to fit function that (in some sense) looks like your underlying process. This way you'll have the fewest number of param...
What's wrong to fit periodic data with polynomials?
The wrong is that to exactly capture the simplest periodic process such as a monochrome sine wave you need infinite number of polynomial terms. Look at Taylor expansion formula. Intuitively you want t
What's wrong to fit periodic data with polynomials? The wrong is that to exactly capture the simplest periodic process such as a monochrome sine wave you need infinite number of polynomial terms. Look at Taylor expansion formula. Intuitively you want to fit function that (in some sense) looks like your underlying proc...
What's wrong to fit periodic data with polynomials? The wrong is that to exactly capture the simplest periodic process such as a monochrome sine wave you need infinite number of polynomial terms. Look at Taylor expansion formula. Intuitively you want t
51,765
What's wrong to fit periodic data with polynomials?
Discontinuity at $T=0$ and $T=24$ is problem. In fact, the plot is misleading because it only plots $T$ up to $21$. If we change the plot code as: plot(d$t,d$temp,type='b',xlim=c(0,24),ylim=c(-7.5,1.5)) We can see 3rd order polynomial is not a good fit: At time $0$, the temperature is $-1.7$, but next day at time $0$ ...
What's wrong to fit periodic data with polynomials?
Discontinuity at $T=0$ and $T=24$ is problem. In fact, the plot is misleading because it only plots $T$ up to $21$. If we change the plot code as: plot(d$t,d$temp,type='b',xlim=c(0,24),ylim=c(-7.5,1.5
What's wrong to fit periodic data with polynomials? Discontinuity at $T=0$ and $T=24$ is problem. In fact, the plot is misleading because it only plots $T$ up to $21$. If we change the plot code as: plot(d$t,d$temp,type='b',xlim=c(0,24),ylim=c(-7.5,1.5)) We can see 3rd order polynomial is not a good fit: At time $0$, ...
What's wrong to fit periodic data with polynomials? Discontinuity at $T=0$ and $T=24$ is problem. In fact, the plot is misleading because it only plots $T$ up to $21$. If we change the plot code as: plot(d$t,d$temp,type='b',xlim=c(0,24),ylim=c(-7.5,1.5
51,766
What's wrong to fit periodic data with polynomials?
If You fit data from a limited timeinterval, say one day, using splines, this does not take into account, the values of the preceding and following intervals. You find this effect even with fitting non periodic data with a polynom: the fitted data are "over reacting " to the last and first span interval. One way to sm...
What's wrong to fit periodic data with polynomials?
If You fit data from a limited timeinterval, say one day, using splines, this does not take into account, the values of the preceding and following intervals. You find this effect even with fitting no
What's wrong to fit periodic data with polynomials? If You fit data from a limited timeinterval, say one day, using splines, this does not take into account, the values of the preceding and following intervals. You find this effect even with fitting non periodic data with a polynom: the fitted data are "over reacting "...
What's wrong to fit periodic data with polynomials? If You fit data from a limited timeinterval, say one day, using splines, this does not take into account, the values of the preceding and following intervals. You find this effect even with fitting no
51,767
Does Bayesian Statistics have no concept of statistical hypothesis testing?
I am surprised at the textbook statement as testing hypotheses and comparing models are a most fundamental feature of Bayesian analysis, with a wide variety of possible resolutions that exposes the multiple and sometimes incompatible facets of the problem. (excerpt from our book, Bayesian essentials with R, Chapter 2, ...
Does Bayesian Statistics have no concept of statistical hypothesis testing?
I am surprised at the textbook statement as testing hypotheses and comparing models are a most fundamental feature of Bayesian analysis, with a wide variety of possible resolutions that exposes the mu
Does Bayesian Statistics have no concept of statistical hypothesis testing? I am surprised at the textbook statement as testing hypotheses and comparing models are a most fundamental feature of Bayesian analysis, with a wide variety of possible resolutions that exposes the multiple and sometimes incompatible facets of ...
Does Bayesian Statistics have no concept of statistical hypothesis testing? I am surprised at the textbook statement as testing hypotheses and comparing models are a most fundamental feature of Bayesian analysis, with a wide variety of possible resolutions that exposes the mu
51,768
Does Bayesian Statistics have no concept of statistical hypothesis testing?
No. Bayesian statistics has a concept of hypothesis testing. From Wagenmakers and Grünweld: A Bayesian hypothesis test (Jeffreys, 1961) proceeds by contrasting two quantities: the probability of the observed data $D$ given $H_{0}$ (i.e., $\theta = \frac{1}{2}$) and the probability of the observed data $D$ given $H_{1}...
Does Bayesian Statistics have no concept of statistical hypothesis testing?
No. Bayesian statistics has a concept of hypothesis testing. From Wagenmakers and Grünweld: A Bayesian hypothesis test (Jeffreys, 1961) proceeds by contrasting two quantities: the probability of the
Does Bayesian Statistics have no concept of statistical hypothesis testing? No. Bayesian statistics has a concept of hypothesis testing. From Wagenmakers and Grünweld: A Bayesian hypothesis test (Jeffreys, 1961) proceeds by contrasting two quantities: the probability of the observed data $D$ given $H_{0}$ (i.e., $\the...
Does Bayesian Statistics have no concept of statistical hypothesis testing? No. Bayesian statistics has a concept of hypothesis testing. From Wagenmakers and Grünweld: A Bayesian hypothesis test (Jeffreys, 1961) proceeds by contrasting two quantities: the probability of the
51,769
Regress IV on DV, or DV on IV?
Traditionally speaking, one regresses the dependent variable (the Y, the outcome) on the independent variable (the X, the input). However, this is such an egregious abuse of statistical language, many disciplines have abandoned such verbiage altogether. The mistake is that "dependence" (in the proper statistical sense)...
Regress IV on DV, or DV on IV?
Traditionally speaking, one regresses the dependent variable (the Y, the outcome) on the independent variable (the X, the input). However, this is such an egregious abuse of statistical language, many
Regress IV on DV, or DV on IV? Traditionally speaking, one regresses the dependent variable (the Y, the outcome) on the independent variable (the X, the input). However, this is such an egregious abuse of statistical language, many disciplines have abandoned such verbiage altogether. The mistake is that "dependence" (i...
Regress IV on DV, or DV on IV? Traditionally speaking, one regresses the dependent variable (the Y, the outcome) on the independent variable (the X, the input). However, this is such an egregious abuse of statistical language, many
51,770
Regress IV on DV, or DV on IV?
The question prejudges another question, good terminology for the variables concerned. Let's take that first. DV is common, but not universal, shorthand for dependent variable. It's probably old-fashioned to remind that DV has often been used to mean Deo volente, God willing, but those who know that and also some stat...
Regress IV on DV, or DV on IV?
The question prejudges another question, good terminology for the variables concerned. Let's take that first. DV is common, but not universal, shorthand for dependent variable. It's probably old-fash
Regress IV on DV, or DV on IV? The question prejudges another question, good terminology for the variables concerned. Let's take that first. DV is common, but not universal, shorthand for dependent variable. It's probably old-fashioned to remind that DV has often been used to mean Deo volente, God willing, but those w...
Regress IV on DV, or DV on IV? The question prejudges another question, good terminology for the variables concerned. Let's take that first. DV is common, but not universal, shorthand for dependent variable. It's probably old-fash
51,771
How to interpret a VIF of 4?
When you estimate a regression equation $y=\beta_0 + \beta_1 x_1 + \beta_2 x_2 + \epsilon$, where in your case $y$ is the election result, $x_1$ is personal income and $x_2$ is presidential popularity, then, when the 'usual' assumptions are fullfilled, the estimated coefficients $\hat{\beta}_i$ are random variables (i....
How to interpret a VIF of 4?
When you estimate a regression equation $y=\beta_0 + \beta_1 x_1 + \beta_2 x_2 + \epsilon$, where in your case $y$ is the election result, $x_1$ is personal income and $x_2$ is presidential popularity
How to interpret a VIF of 4? When you estimate a regression equation $y=\beta_0 + \beta_1 x_1 + \beta_2 x_2 + \epsilon$, where in your case $y$ is the election result, $x_1$ is personal income and $x_2$ is presidential popularity, then, when the 'usual' assumptions are fullfilled, the estimated coefficients $\hat{\beta...
How to interpret a VIF of 4? When you estimate a regression equation $y=\beta_0 + \beta_1 x_1 + \beta_2 x_2 + \epsilon$, where in your case $y$ is the election result, $x_1$ is personal income and $x_2$ is presidential popularity
51,772
How to interpret a VIF of 4?
Variance inflation factors (VIF) measure how much the variance of the estimated regression coefficients are inflated as compared to when the predictor variables are not linearly related. It is used to explain how much amount multicollinearity (correlation between predictors) exists in a regression analysis. Multicollin...
How to interpret a VIF of 4?
Variance inflation factors (VIF) measure how much the variance of the estimated regression coefficients are inflated as compared to when the predictor variables are not linearly related. It is used to
How to interpret a VIF of 4? Variance inflation factors (VIF) measure how much the variance of the estimated regression coefficients are inflated as compared to when the predictor variables are not linearly related. It is used to explain how much amount multicollinearity (correlation between predictors) exists in a reg...
How to interpret a VIF of 4? Variance inflation factors (VIF) measure how much the variance of the estimated regression coefficients are inflated as compared to when the predictor variables are not linearly related. It is used to
51,773
Returning unlikely results from a probability distribution
You can use geometric distribution to reason about such events after several trials. Let $p$ be the probability of obtaining 18 or more ($p = P(X > 18)$). Then the amount of trials $k$ until success (that is, until 18+ is generated) is distributed according to the geometric distribution: $$ k \sim (1-p)^{k-1} p $$ The...
Returning unlikely results from a probability distribution
You can use geometric distribution to reason about such events after several trials. Let $p$ be the probability of obtaining 18 or more ($p = P(X > 18)$). Then the amount of trials $k$ until success (
Returning unlikely results from a probability distribution You can use geometric distribution to reason about such events after several trials. Let $p$ be the probability of obtaining 18 or more ($p = P(X > 18)$). Then the amount of trials $k$ until success (that is, until 18+ is generated) is distributed according to ...
Returning unlikely results from a probability distribution You can use geometric distribution to reason about such events after several trials. Let $p$ be the probability of obtaining 18 or more ($p = P(X > 18)$). Then the amount of trials $k$ until success (
51,774
Returning unlikely results from a probability distribution
If you want to learn about some general results (and general phenomena) for probabilities of "extreme" values, or values very far away from the mean, you should look into extreme value theory or large deviations theory. To get you started, some links here on CV: Extreme value theory for count data Extreme Value Theory ...
Returning unlikely results from a probability distribution
If you want to learn about some general results (and general phenomena) for probabilities of "extreme" values, or values very far away from the mean, you should look into extreme value theory or large
Returning unlikely results from a probability distribution If you want to learn about some general results (and general phenomena) for probabilities of "extreme" values, or values very far away from the mean, you should look into extreme value theory or large deviations theory. To get you started, some links here on CV...
Returning unlikely results from a probability distribution If you want to learn about some general results (and general phenomena) for probabilities of "extreme" values, or values very far away from the mean, you should look into extreme value theory or large
51,775
Returning unlikely results from a probability distribution
You have a sequence of trials, with probability $p$ per trial of a "success" (that the simulation runs). a) If you want P(simulation is triggered at least once in $n$ trials) that's a calculation from a binomial distribution, but you can work the probability out from first principles by working out the probability of t...
Returning unlikely results from a probability distribution
You have a sequence of trials, with probability $p$ per trial of a "success" (that the simulation runs). a) If you want P(simulation is triggered at least once in $n$ trials) that's a calculation from
Returning unlikely results from a probability distribution You have a sequence of trials, with probability $p$ per trial of a "success" (that the simulation runs). a) If you want P(simulation is triggered at least once in $n$ trials) that's a calculation from a binomial distribution, but you can work the probability ou...
Returning unlikely results from a probability distribution You have a sequence of trials, with probability $p$ per trial of a "success" (that the simulation runs). a) If you want P(simulation is triggered at least once in $n$ trials) that's a calculation from
51,776
Gaussian is conjugate of Gaussian?
If we take your question to mean whether the product of the densities are Gaussian, then the answer is "yes" (P.A. Bromiley. Tina Memo No. 2003-003. "Products and Convolutions of Gaussian Probability Density Functions."). Take $f(x)$ and $g(x)$ to be two normal densities with means $\mu_f$ and $\mu_g$ and variances $\s...
Gaussian is conjugate of Gaussian?
If we take your question to mean whether the product of the densities are Gaussian, then the answer is "yes" (P.A. Bromiley. Tina Memo No. 2003-003. "Products and Convolutions of Gaussian Probability
Gaussian is conjugate of Gaussian? If we take your question to mean whether the product of the densities are Gaussian, then the answer is "yes" (P.A. Bromiley. Tina Memo No. 2003-003. "Products and Convolutions of Gaussian Probability Density Functions."). Take $f(x)$ and $g(x)$ to be two normal densities with means $\...
Gaussian is conjugate of Gaussian? If we take your question to mean whether the product of the densities are Gaussian, then the answer is "yes" (P.A. Bromiley. Tina Memo No. 2003-003. "Products and Convolutions of Gaussian Probability
51,777
Gaussian is conjugate of Gaussian?
Because a comment of mine about obtaining a simple answer seems to have generated interest, here are the details. Restatement of the question The question asks whether the product of two Normal distribution functions determines a Normally distributed variable. In the notation of the question, these functions have the ...
Gaussian is conjugate of Gaussian?
Because a comment of mine about obtaining a simple answer seems to have generated interest, here are the details. Restatement of the question The question asks whether the product of two Normal distri
Gaussian is conjugate of Gaussian? Because a comment of mine about obtaining a simple answer seems to have generated interest, here are the details. Restatement of the question The question asks whether the product of two Normal distribution functions determines a Normally distributed variable. In the notation of the ...
Gaussian is conjugate of Gaussian? Because a comment of mine about obtaining a simple answer seems to have generated interest, here are the details. Restatement of the question The question asks whether the product of two Normal distri
51,778
What is the Fourier Transform of a brownian motion?
As mentioned above, the first equation about which you were confused is a property of the Fourier transform. Here is a very explicit derivation. First define the Fourier transform over a finite interval $(a,b)$ as $$ \mathcal{F}\left\{f(t)\right\} = \int_{(a,b)} f(t) e^{-i \omega t}\ dt. $$ With suitable technical con...
What is the Fourier Transform of a brownian motion?
As mentioned above, the first equation about which you were confused is a property of the Fourier transform. Here is a very explicit derivation. First define the Fourier transform over a finite interv
What is the Fourier Transform of a brownian motion? As mentioned above, the first equation about which you were confused is a property of the Fourier transform. Here is a very explicit derivation. First define the Fourier transform over a finite interval $(a,b)$ as $$ \mathcal{F}\left\{f(t)\right\} = \int_{(a,b)} f(t)...
What is the Fourier Transform of a brownian motion? As mentioned above, the first equation about which you were confused is a property of the Fourier transform. Here is a very explicit derivation. First define the Fourier transform over a finite interv
51,779
What is the Fourier Transform of a brownian motion?
Sorry, I know this thread is old, but I feel like some statements are not very clear and/or misleading, and also I would like to add a more mathematically sound perspective on the matter. As was already pointed out, a Brownian path is with probability 1 not differentiable anywhere, at least not in a usual sense. It is ...
What is the Fourier Transform of a brownian motion?
Sorry, I know this thread is old, but I feel like some statements are not very clear and/or misleading, and also I would like to add a more mathematically sound perspective on the matter. As was alrea
What is the Fourier Transform of a brownian motion? Sorry, I know this thread is old, but I feel like some statements are not very clear and/or misleading, and also I would like to add a more mathematically sound perspective on the matter. As was already pointed out, a Brownian path is with probability 1 not differenti...
What is the Fourier Transform of a brownian motion? Sorry, I know this thread is old, but I feel like some statements are not very clear and/or misleading, and also I would like to add a more mathematically sound perspective on the matter. As was alrea
51,780
Library routine for rolling window lag 1 autocorrelation?
In python, the pandas library has a function called rolling_apply that, in conjunction with the Series object method .autocorr() should work. Here's an example for $N = 10$. import pandas as pd y = pd.Series(np.random.normal(size = 100)) pd.rolling_apply(y, 10, lambda x: pd.Series(x).autocorr()) Another option is pand...
Library routine for rolling window lag 1 autocorrelation?
In python, the pandas library has a function called rolling_apply that, in conjunction with the Series object method .autocorr() should work. Here's an example for $N = 10$. import pandas as pd y = pd
Library routine for rolling window lag 1 autocorrelation? In python, the pandas library has a function called rolling_apply that, in conjunction with the Series object method .autocorr() should work. Here's an example for $N = 10$. import pandas as pd y = pd.Series(np.random.normal(size = 100)) pd.rolling_apply(y, 10, ...
Library routine for rolling window lag 1 autocorrelation? In python, the pandas library has a function called rolling_apply that, in conjunction with the Series object method .autocorr() should work. Here's an example for $N = 10$. import pandas as pd y = pd
51,781
Library routine for rolling window lag 1 autocorrelation?
The formula for the ACF can be expressed as a rational function of sums. By far the fastest way to compute rolling sums is with the Fast Fourier Transform. Use this to accomplish the task thousands of times faster than a brute-force iterated calculation (such as offered by windowed "roll apply" functions in R, Python...
Library routine for rolling window lag 1 autocorrelation?
The formula for the ACF can be expressed as a rational function of sums. By far the fastest way to compute rolling sums is with the Fast Fourier Transform. Use this to accomplish the task thousands
Library routine for rolling window lag 1 autocorrelation? The formula for the ACF can be expressed as a rational function of sums. By far the fastest way to compute rolling sums is with the Fast Fourier Transform. Use this to accomplish the task thousands of times faster than a brute-force iterated calculation (such ...
Library routine for rolling window lag 1 autocorrelation? The formula for the ACF can be expressed as a rational function of sums. By far the fastest way to compute rolling sums is with the Fast Fourier Transform. Use this to accomplish the task thousands
51,782
Library routine for rolling window lag 1 autocorrelation?
Regarding R, if you have an existing function to calculate the lag 1 autocorrelation, I believe you can pass it as the FUN to apply.rolling in the PerformanceAnalytics package, which itself is described as a convenience wrapper for rollapply in package zoo. Example: sample <- rnorm(100) result <- rollapply(sample, widt...
Library routine for rolling window lag 1 autocorrelation?
Regarding R, if you have an existing function to calculate the lag 1 autocorrelation, I believe you can pass it as the FUN to apply.rolling in the PerformanceAnalytics package, which itself is describ
Library routine for rolling window lag 1 autocorrelation? Regarding R, if you have an existing function to calculate the lag 1 autocorrelation, I believe you can pass it as the FUN to apply.rolling in the PerformanceAnalytics package, which itself is described as a convenience wrapper for rollapply in package zoo. Exam...
Library routine for rolling window lag 1 autocorrelation? Regarding R, if you have an existing function to calculate the lag 1 autocorrelation, I believe you can pass it as the FUN to apply.rolling in the PerformanceAnalytics package, which itself is describ
51,783
How is the poisson distribution a distribution? It seems more like a formula
The formula $f$ is the probability mass function for the Poisson distribution. That formula, as explained in the video, can be used to calculate the probability of a given value under the assumed distribution. The related cumulative distribution function $F$ can be used to generate random numbers following the distrib...
How is the poisson distribution a distribution? It seems more like a formula
The formula $f$ is the probability mass function for the Poisson distribution. That formula, as explained in the video, can be used to calculate the probability of a given value under the assumed dis
How is the poisson distribution a distribution? It seems more like a formula The formula $f$ is the probability mass function for the Poisson distribution. That formula, as explained in the video, can be used to calculate the probability of a given value under the assumed distribution. The related cumulative distribut...
How is the poisson distribution a distribution? It seems more like a formula The formula $f$ is the probability mass function for the Poisson distribution. That formula, as explained in the video, can be used to calculate the probability of a given value under the assumed dis
51,784
How is the poisson distribution a distribution? It seems more like a formula
The function you link to is a random number generator. It does not return the Poisson distribution, but returns random numbers from a Poisson distribution. That is, it does exactly what its name suggests - gives you random Poisson variates, not the distribution. The Poisson probability function is of the form $P(X=x) =...
How is the poisson distribution a distribution? It seems more like a formula
The function you link to is a random number generator. It does not return the Poisson distribution, but returns random numbers from a Poisson distribution. That is, it does exactly what its name sugge
How is the poisson distribution a distribution? It seems more like a formula The function you link to is a random number generator. It does not return the Poisson distribution, but returns random numbers from a Poisson distribution. That is, it does exactly what its name suggests - gives you random Poisson variates, no...
How is the poisson distribution a distribution? It seems more like a formula The function you link to is a random number generator. It does not return the Poisson distribution, but returns random numbers from a Poisson distribution. That is, it does exactly what its name sugge
51,785
How is the poisson distribution a distribution? It seems more like a formula
I generally use R so my answer here is based on a quick web search. It looks like numpy supports generating random samples from a Poisson distribution and doesn't have functions for computing the probability mass function (PMF) described by the Poisson formula to which you refer. Generating random samples from a distri...
How is the poisson distribution a distribution? It seems more like a formula
I generally use R so my answer here is based on a quick web search. It looks like numpy supports generating random samples from a Poisson distribution and doesn't have functions for computing the prob
How is the poisson distribution a distribution? It seems more like a formula I generally use R so my answer here is based on a quick web search. It looks like numpy supports generating random samples from a Poisson distribution and doesn't have functions for computing the probability mass function (PMF) described by th...
How is the poisson distribution a distribution? It seems more like a formula I generally use R so my answer here is based on a quick web search. It looks like numpy supports generating random samples from a Poisson distribution and doesn't have functions for computing the prob
51,786
Why is a mixed model a non-linear statistical model?
Hopefully the amount of notation suppressed and corners cut in what follows still leaves something intelligible: On what 'mixed' means. Imagine somewhere at the heart of the model we have a line looking something like this. $$\eta = \beta_0 + \beta_1 x_1 + ... + \beta_p x_p$$ Where the $x_k$ are our covariates. Focus...
Why is a mixed model a non-linear statistical model?
Hopefully the amount of notation suppressed and corners cut in what follows still leaves something intelligible: On what 'mixed' means. Imagine somewhere at the heart of the model we have a line looki
Why is a mixed model a non-linear statistical model? Hopefully the amount of notation suppressed and corners cut in what follows still leaves something intelligible: On what 'mixed' means. Imagine somewhere at the heart of the model we have a line looking something like this. $$\eta = \beta_0 + \beta_1 x_1 + ... + \b...
Why is a mixed model a non-linear statistical model? Hopefully the amount of notation suppressed and corners cut in what follows still leaves something intelligible: On what 'mixed' means. Imagine somewhere at the heart of the model we have a line looki
51,787
Why is a mixed model a non-linear statistical model?
And, here's a "street" version of the above: a) what is a linear model? It's one which can be expressed in the form of sums and scalar products of the inputs (y = ax + b at the simplest). If "a" is a function of some other factor ("z" not "x") perhaps a random function, A(z), then we have y = A(z)x + b which is no lon...
Why is a mixed model a non-linear statistical model?
And, here's a "street" version of the above: a) what is a linear model? It's one which can be expressed in the form of sums and scalar products of the inputs (y = ax + b at the simplest). If "a" is a
Why is a mixed model a non-linear statistical model? And, here's a "street" version of the above: a) what is a linear model? It's one which can be expressed in the form of sums and scalar products of the inputs (y = ax + b at the simplest). If "a" is a function of some other factor ("z" not "x") perhaps a random funct...
Why is a mixed model a non-linear statistical model? And, here's a "street" version of the above: a) what is a linear model? It's one which can be expressed in the form of sums and scalar products of the inputs (y = ax + b at the simplest). If "a" is a
51,788
Should the Shapiro-Wilk test and QQ-Plot always be combined?
At least two reasons: 1) A Shapiro Wilk test, at least if you base a decision on a p-value, is sample size dependent. With a small sample, you'll almost always conclude "normal" and with a large enough sample, even a tiny deviation from normal will be significant 2) A QQ plot tells you a lot about how the distribution ...
Should the Shapiro-Wilk test and QQ-Plot always be combined?
At least two reasons: 1) A Shapiro Wilk test, at least if you base a decision on a p-value, is sample size dependent. With a small sample, you'll almost always conclude "normal" and with a large enoug
Should the Shapiro-Wilk test and QQ-Plot always be combined? At least two reasons: 1) A Shapiro Wilk test, at least if you base a decision on a p-value, is sample size dependent. With a small sample, you'll almost always conclude "normal" and with a large enough sample, even a tiny deviation from normal will be signifi...
Should the Shapiro-Wilk test and QQ-Plot always be combined? At least two reasons: 1) A Shapiro Wilk test, at least if you base a decision on a p-value, is sample size dependent. With a small sample, you'll almost always conclude "normal" and with a large enoug
51,789
Should the Shapiro-Wilk test and QQ-Plot always be combined?
Citations would be helpful, but at face value, the claim is false. One of our favorite questions here (one of mine, anyway) is, "Is normality testing 'essentially useless'?" Answers to this question generally argue that Q–Q plots are more valuable than the Shapiro–Wilk test. I.e., if one of these is to be excluded, let...
Should the Shapiro-Wilk test and QQ-Plot always be combined?
Citations would be helpful, but at face value, the claim is false. One of our favorite questions here (one of mine, anyway) is, "Is normality testing 'essentially useless'?" Answers to this question g
Should the Shapiro-Wilk test and QQ-Plot always be combined? Citations would be helpful, but at face value, the claim is false. One of our favorite questions here (one of mine, anyway) is, "Is normality testing 'essentially useless'?" Answers to this question generally argue that Q–Q plots are more valuable than the Sh...
Should the Shapiro-Wilk test and QQ-Plot always be combined? Citations would be helpful, but at face value, the claim is false. One of our favorite questions here (one of mine, anyway) is, "Is normality testing 'essentially useless'?" Answers to this question g
51,790
Implausibly small standard error
You have way overcorrected the individual doctor effects twice using methods that simply do not work together. If your model is regress outcome i.doctor, vce(cluster doctor), then Stata should have complained that you've exhausted your degrees of freedom. xtreg may not be as smart, and may miss a perfect determination ...
Implausibly small standard error
You have way overcorrected the individual doctor effects twice using methods that simply do not work together. If your model is regress outcome i.doctor, vce(cluster doctor), then Stata should have co
Implausibly small standard error You have way overcorrected the individual doctor effects twice using methods that simply do not work together. If your model is regress outcome i.doctor, vce(cluster doctor), then Stata should have complained that you've exhausted your degrees of freedom. xtreg may not be as smart, and ...
Implausibly small standard error You have way overcorrected the individual doctor effects twice using methods that simply do not work together. If your model is regress outcome i.doctor, vce(cluster doctor), then Stata should have co
51,791
Implausibly small standard error
If I understand your problem, this can happen when the intra-cluster correlations are negative. See Stata FAQ for the therapist version with some intuition. Edit: I think Stas is right about the deeper issue. I was too hasty. Here's my attempt to replicate this with a dataset of pharmacy visits by 27,766 Vietnamese vi...
Implausibly small standard error
If I understand your problem, this can happen when the intra-cluster correlations are negative. See Stata FAQ for the therapist version with some intuition. Edit: I think Stas is right about the deep
Implausibly small standard error If I understand your problem, this can happen when the intra-cluster correlations are negative. See Stata FAQ for the therapist version with some intuition. Edit: I think Stas is right about the deeper issue. I was too hasty. Here's my attempt to replicate this with a dataset of pharma...
Implausibly small standard error If I understand your problem, this can happen when the intra-cluster correlations are negative. See Stata FAQ for the therapist version with some intuition. Edit: I think Stas is right about the deep
51,792
Controlling covariates in linear regression in R
The question, as phrased, is slightly ambiguous. It states that "the coefficients in each model appear to be exactly the same". There are two ways that statement could be interpreted, with respect to: (1) the Estimates of the coefficients, or (2) the tests of the coefficients. Regarding the Estimates of the coeffi...
Controlling covariates in linear regression in R
The question, as phrased, is slightly ambiguous. It states that "the coefficients in each model appear to be exactly the same". There are two ways that statement could be interpreted, with respect t
Controlling covariates in linear regression in R The question, as phrased, is slightly ambiguous. It states that "the coefficients in each model appear to be exactly the same". There are two ways that statement could be interpreted, with respect to: (1) the Estimates of the coefficients, or (2) the tests of the coeff...
Controlling covariates in linear regression in R The question, as phrased, is slightly ambiguous. It states that "the coefficients in each model appear to be exactly the same". There are two ways that statement could be interpreted, with respect t
51,793
Calculate tail probabilities from density() call in R
I would take the same approach as @Flounderer, but exploit another feature of R's density() function; namely the from and to arguments, which restrict the density estimation to the region enclosed by the two arguments. This results in the same density estimates as running the function without from and/or to, but by res...
Calculate tail probabilities from density() call in R
I would take the same approach as @Flounderer, but exploit another feature of R's density() function; namely the from and to arguments, which restrict the density estimation to the region enclosed by
Calculate tail probabilities from density() call in R I would take the same approach as @Flounderer, but exploit another feature of R's density() function; namely the from and to arguments, which restrict the density estimation to the region enclosed by the two arguments. This results in the same density estimates as r...
Calculate tail probabilities from density() call in R I would take the same approach as @Flounderer, but exploit another feature of R's density() function; namely the from and to arguments, which restrict the density estimation to the region enclosed by
51,794
Calculate tail probabilities from density() call in R
The density function returns an object with various properties. You can access the $x$ and $y$ values using density(x)$x and density(x)$y. So you can do it like this: set.seed(100) x <- rnorm(1000) d <- density(x) x0 <- 1 idx <- which(abs(d$x-x0)==min(abs(d$x-x0))) approx.tail.prob <- sum(d$y[idx:length(d$x)] * diff(d$...
Calculate tail probabilities from density() call in R
The density function returns an object with various properties. You can access the $x$ and $y$ values using density(x)$x and density(x)$y. So you can do it like this: set.seed(100) x <- rnorm(1000) d
Calculate tail probabilities from density() call in R The density function returns an object with various properties. You can access the $x$ and $y$ values using density(x)$x and density(x)$y. So you can do it like this: set.seed(100) x <- rnorm(1000) d <- density(x) x0 <- 1 idx <- which(abs(d$x-x0)==min(abs(d$x-x0))) ...
Calculate tail probabilities from density() call in R The density function returns an object with various properties. You can access the $x$ and $y$ values using density(x)$x and density(x)$y. So you can do it like this: set.seed(100) x <- rnorm(1000) d
51,795
Calculate tail probabilities from density() call in R
By definition, given a "bandwidth" $h$ and a kernel density $k,$ the KDE of a data vector $\mathbf{x} = (x_1, x_2, \ldots, x_n)$ is $$f(x; \mathbf{x}, h, k) = \frac{1}{nh}\sum_{i=1}^n k\left(\frac{x - x_i}{h}\right).$$ Consequently the distribution function (left tail probability function) is its integral, $$F(x; \mat...
Calculate tail probabilities from density() call in R
By definition, given a "bandwidth" $h$ and a kernel density $k,$ the KDE of a data vector $\mathbf{x} = (x_1, x_2, \ldots, x_n)$ is $$f(x; \mathbf{x}, h, k) = \frac{1}{nh}\sum_{i=1}^n k\left(\frac{x -
Calculate tail probabilities from density() call in R By definition, given a "bandwidth" $h$ and a kernel density $k,$ the KDE of a data vector $\mathbf{x} = (x_1, x_2, \ldots, x_n)$ is $$f(x; \mathbf{x}, h, k) = \frac{1}{nh}\sum_{i=1}^n k\left(\frac{x - x_i}{h}\right).$$ Consequently the distribution function (left ta...
Calculate tail probabilities from density() call in R By definition, given a "bandwidth" $h$ and a kernel density $k,$ the KDE of a data vector $\mathbf{x} = (x_1, x_2, \ldots, x_n)$ is $$f(x; \mathbf{x}, h, k) = \frac{1}{nh}\sum_{i=1}^n k\left(\frac{x -
51,796
Calculate tail probabilities from density() call in R
You can do this with the KDE function in the utilties package For this type of problem, you can use the KDE function in the utilties package. This function generates the KDE in the same way as the density function in R,$^\dagger$ but instead of producing an output computed over a relatively small set of points, it pro...
Calculate tail probabilities from density() call in R
You can do this with the KDE function in the utilties package For this type of problem, you can use the KDE function in the utilties package. This function generates the KDE in the same way as the de
Calculate tail probabilities from density() call in R You can do this with the KDE function in the utilties package For this type of problem, you can use the KDE function in the utilties package. This function generates the KDE in the same way as the density function in R,$^\dagger$ but instead of producing an output ...
Calculate tail probabilities from density() call in R You can do this with the KDE function in the utilties package For this type of problem, you can use the KDE function in the utilties package. This function generates the KDE in the same way as the de
51,797
Compare 2 regression lines in R
You have to use a Chow test (wikipedia). It's an application of the Fisher test to test the equality of coefficients among two groups of individuals. You can compute it easily using the sum of squared residuals of each model. See my gist file to see how I compute the Chow test. In your case, the null hypothesis of equa...
Compare 2 regression lines in R
You have to use a Chow test (wikipedia). It's an application of the Fisher test to test the equality of coefficients among two groups of individuals. You can compute it easily using the sum of squared
Compare 2 regression lines in R You have to use a Chow test (wikipedia). It's an application of the Fisher test to test the equality of coefficients among two groups of individuals. You can compute it easily using the sum of squared residuals of each model. See my gist file to see how I compute the Chow test. In your c...
Compare 2 regression lines in R You have to use a Chow test (wikipedia). It's an application of the Fisher test to test the equality of coefficients among two groups of individuals. You can compute it easily using the sum of squared
51,798
Compare 2 regression lines in R
You would do best to test for a difference in slopes by including sex and a sex:Age interaction in a multiple regression analysis. The t-test of the interaction term will assess whether or not the slopes differ significantly. The R code for your situation would be (I'm guessing): lm(formula = SBR ~ Sex + Age + Sex:...
Compare 2 regression lines in R
You would do best to test for a difference in slopes by including sex and a sex:Age interaction in a multiple regression analysis. The t-test of the interaction term will assess whether or not the sl
Compare 2 regression lines in R You would do best to test for a difference in slopes by including sex and a sex:Age interaction in a multiple regression analysis. The t-test of the interaction term will assess whether or not the slopes differ significantly. The R code for your situation would be (I'm guessing): lm(...
Compare 2 regression lines in R You would do best to test for a difference in slopes by including sex and a sex:Age interaction in a multiple regression analysis. The t-test of the interaction term will assess whether or not the sl
51,799
Compare 2 regression lines in R
In R you can use anova for an analysis of covariance. I tried quickly with the anova command to run a test with your data but the sample size for the two models are different which gives problems at the moment. Code by PAC also works nicely. Based on gung's answer you can also do an anova test using the following cod...
Compare 2 regression lines in R
In R you can use anova for an analysis of covariance. I tried quickly with the anova command to run a test with your data but the sample size for the two models are different which gives problems at t
Compare 2 regression lines in R In R you can use anova for an analysis of covariance. I tried quickly with the anova command to run a test with your data but the sample size for the two models are different which gives problems at the moment. Code by PAC also works nicely. Based on gung's answer you can also do an an...
Compare 2 regression lines in R In R you can use anova for an analysis of covariance. I tried quickly with the anova command to run a test with your data but the sample size for the two models are different which gives problems at t
51,800
Fallacy in p-value definition
The StatSoft definition is incorrect. (I know, a short answer, but sometimes there is no long answer).
Fallacy in p-value definition
The StatSoft definition is incorrect. (I know, a short answer, but sometimes there is no long answer).
Fallacy in p-value definition The StatSoft definition is incorrect. (I know, a short answer, but sometimes there is no long answer).
Fallacy in p-value definition The StatSoft definition is incorrect. (I know, a short answer, but sometimes there is no long answer).