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 |
|---|---|---|---|---|---|---|
55,601 | How can residuals be iid and sum to zero at the same time? | I think you are confusing residuals and errors.
Residuals, often noted $\hat{\varepsilon}_i$ or $e_i$ are
$$\hat{\varepsilon}_i = y_i - \hat{y}_i = y_i - \hat{\beta}_0 - \hat{\beta}_1 x_i$$
whereas errors are
$$\varepsilon_i = y_i - {\beta}_0 - {\beta}_1 x_i$$
The small (but critical!) difference is the hat over the be... | How can residuals be iid and sum to zero at the same time? | I think you are confusing residuals and errors.
Residuals, often noted $\hat{\varepsilon}_i$ or $e_i$ are
$$\hat{\varepsilon}_i = y_i - \hat{y}_i = y_i - \hat{\beta}_0 - \hat{\beta}_1 x_i$$
whereas er | How can residuals be iid and sum to zero at the same time?
I think you are confusing residuals and errors.
Residuals, often noted $\hat{\varepsilon}_i$ or $e_i$ are
$$\hat{\varepsilon}_i = y_i - \hat{y}_i = y_i - \hat{\beta}_0 - \hat{\beta}_1 x_i$$
whereas errors are
$$\varepsilon_i = y_i - {\beta}_0 - {\beta}_1 x_i$$
... | How can residuals be iid and sum to zero at the same time?
I think you are confusing residuals and errors.
Residuals, often noted $\hat{\varepsilon}_i$ or $e_i$ are
$$\hat{\varepsilon}_i = y_i - \hat{y}_i = y_i - \hat{\beta}_0 - \hat{\beta}_1 x_i$$
whereas er |
55,602 | Why is my Fisher's test "significant" but odds ratio overlaps 1? | This is an interesting phenomenon.
The difference is basically that the null hypothesis is more powerful because it ends up being one-sided. The confidence interval is not based on the same powerful tests (but it could).
Null hypothesis is tested with variable weight in left and right tails
Note that probability for th... | Why is my Fisher's test "significant" but odds ratio overlaps 1? | This is an interesting phenomenon.
The difference is basically that the null hypothesis is more powerful because it ends up being one-sided. The confidence interval is not based on the same powerful t | Why is my Fisher's test "significant" but odds ratio overlaps 1?
This is an interesting phenomenon.
The difference is basically that the null hypothesis is more powerful because it ends up being one-sided. The confidence interval is not based on the same powerful tests (but it could).
Null hypothesis is tested with var... | Why is my Fisher's test "significant" but odds ratio overlaps 1?
This is an interesting phenomenon.
The difference is basically that the null hypothesis is more powerful because it ends up being one-sided. The confidence interval is not based on the same powerful t |
55,603 | High-dimensional Bernoulli Factory? | Your problem is related to the problem of simulating Boolean circuits that take inputs with a separate probability of being 0 or 1. This is called the stochastic logic problem.
In this sense, Qian and Riedel (2008) proved that a function can arise this way if and only if it's a polynomial whose Bernstein coefficients a... | High-dimensional Bernoulli Factory? | Your problem is related to the problem of simulating Boolean circuits that take inputs with a separate probability of being 0 or 1. This is called the stochastic logic problem.
In this sense, Qian and | High-dimensional Bernoulli Factory?
Your problem is related to the problem of simulating Boolean circuits that take inputs with a separate probability of being 0 or 1. This is called the stochastic logic problem.
In this sense, Qian and Riedel (2008) proved that a function can arise this way if and only if it's a polyn... | High-dimensional Bernoulli Factory?
Your problem is related to the problem of simulating Boolean circuits that take inputs with a separate probability of being 0 or 1. This is called the stochastic logic problem.
In this sense, Qian and |
55,604 | Proper Scoring Rule in Optical Character Recognition | First off, I wouldn't say it's CrossValidated that "likes to promote proper scoring rules". It's more a few very vociferous users. Present company not excepted.
I would agree that the role of scoring rules is much smaller in optical character recognition (OCR) than in many other domains, like medical diagnostics. The r... | Proper Scoring Rule in Optical Character Recognition | First off, I wouldn't say it's CrossValidated that "likes to promote proper scoring rules". It's more a few very vociferous users. Present company not excepted.
I would agree that the role of scoring | Proper Scoring Rule in Optical Character Recognition
First off, I wouldn't say it's CrossValidated that "likes to promote proper scoring rules". It's more a few very vociferous users. Present company not excepted.
I would agree that the role of scoring rules is much smaller in optical character recognition (OCR) than i... | Proper Scoring Rule in Optical Character Recognition
First off, I wouldn't say it's CrossValidated that "likes to promote proper scoring rules". It's more a few very vociferous users. Present company not excepted.
I would agree that the role of scoring |
55,605 | Interpreting nested random effects | Does mod2 specify that the same people for same treatment should be more similar than others?
mod2 implies that you have repeated measures within every combination of treatment and id. From your description, this does not seem to be the case.
What kind of dependence does mod3 suggest? What's the difference from mod2?... | Interpreting nested random effects | Does mod2 specify that the same people for same treatment should be more similar than others?
mod2 implies that you have repeated measures within every combination of treatment and id. From your desc | Interpreting nested random effects
Does mod2 specify that the same people for same treatment should be more similar than others?
mod2 implies that you have repeated measures within every combination of treatment and id. From your description, this does not seem to be the case.
What kind of dependence does mod3 sugges... | Interpreting nested random effects
Does mod2 specify that the same people for same treatment should be more similar than others?
mod2 implies that you have repeated measures within every combination of treatment and id. From your desc |
55,606 | Visualizing the folly of fitting random slopes for variables that don't vary within groups | I think it makes sense here to step back and simplify things. For the purpose of this answer we can think about this model:
Y ~ X + (X | G)
...in two scenarios: where X varies at the individual / unit level, and where X varies at the group level.
The motivation for fitting random slopes often arises out of the followi... | Visualizing the folly of fitting random slopes for variables that don't vary within groups | I think it makes sense here to step back and simplify things. For the purpose of this answer we can think about this model:
Y ~ X + (X | G)
...in two scenarios: where X varies at the individual / uni | Visualizing the folly of fitting random slopes for variables that don't vary within groups
I think it makes sense here to step back and simplify things. For the purpose of this answer we can think about this model:
Y ~ X + (X | G)
...in two scenarios: where X varies at the individual / unit level, and where X varies a... | Visualizing the folly of fitting random slopes for variables that don't vary within groups
I think it makes sense here to step back and simplify things. For the purpose of this answer we can think about this model:
Y ~ X + (X | G)
...in two scenarios: where X varies at the individual / uni |
55,607 | ARIMA Model Changing With New Data | The updated data is presumably more correct, so it appears like a model fitted to the updated data is likely closer to the true data generating process, as well. So I would use the new model.
Then again, large changes in the forecast (note that different models may give forecasts that are not very different, at least a... | ARIMA Model Changing With New Data | The updated data is presumably more correct, so it appears like a model fitted to the updated data is likely closer to the true data generating process, as well. So I would use the new model.
Then aga | ARIMA Model Changing With New Data
The updated data is presumably more correct, so it appears like a model fitted to the updated data is likely closer to the true data generating process, as well. So I would use the new model.
Then again, large changes in the forecast (note that different models may give forecasts that... | ARIMA Model Changing With New Data
The updated data is presumably more correct, so it appears like a model fitted to the updated data is likely closer to the true data generating process, as well. So I would use the new model.
Then aga |
55,608 | Controlling for baseline in pre-post between design: using $\Delta(T_2-T_1)$ or controlling for T1 in the regression model (or both)? [duplicate] | The options under (d) are wrong, as a change score is associated with the baseline value. See this page, for example.
Otherwise, it depends on what you mean by "taking into account the baseline measurement." You already note that option (a) doesn't do that at all.
Option (b) looks only at the change from baseline as a ... | Controlling for baseline in pre-post between design: using $\Delta(T_2-T_1)$ or controlling for T1 i | The options under (d) are wrong, as a change score is associated with the baseline value. See this page, for example.
Otherwise, it depends on what you mean by "taking into account the baseline measur | Controlling for baseline in pre-post between design: using $\Delta(T_2-T_1)$ or controlling for T1 in the regression model (or both)? [duplicate]
The options under (d) are wrong, as a change score is associated with the baseline value. See this page, for example.
Otherwise, it depends on what you mean by "taking into a... | Controlling for baseline in pre-post between design: using $\Delta(T_2-T_1)$ or controlling for T1 i
The options under (d) are wrong, as a change score is associated with the baseline value. See this page, for example.
Otherwise, it depends on what you mean by "taking into account the baseline measur |
55,609 | How do you know the number of random effects in a mixed effects model? | This is expected behavious whenever you try to fit a model with random slopes where the variable for the random slopes is categorical and there is only one observation per treatment/group combination.
This is because the levels of a categorical variable are represented by dummy variables - essentially they are treated ... | How do you know the number of random effects in a mixed effects model? | This is expected behavious whenever you try to fit a model with random slopes where the variable for the random slopes is categorical and there is only one observation per treatment/group combination. | How do you know the number of random effects in a mixed effects model?
This is expected behavious whenever you try to fit a model with random slopes where the variable for the random slopes is categorical and there is only one observation per treatment/group combination.
This is because the levels of a categorical vari... | How do you know the number of random effects in a mixed effects model?
This is expected behavious whenever you try to fit a model with random slopes where the variable for the random slopes is categorical and there is only one observation per treatment/group combination. |
55,610 | Interpreting the statistical model implied by an lmer formula for mixed effect modelling | It depends on the study design and on how the data are encoded.
Generally speaking, in the first model we have an intercept varying within g1 and g2, while in the 2nd model we have an intercept varying within g1, and g2 varying within g1. The second formulation is typically used for nested factors, where levels of g2 a... | Interpreting the statistical model implied by an lmer formula for mixed effect modelling | It depends on the study design and on how the data are encoded.
Generally speaking, in the first model we have an intercept varying within g1 and g2, while in the 2nd model we have an intercept varyin | Interpreting the statistical model implied by an lmer formula for mixed effect modelling
It depends on the study design and on how the data are encoded.
Generally speaking, in the first model we have an intercept varying within g1 and g2, while in the 2nd model we have an intercept varying within g1, and g2 varying wit... | Interpreting the statistical model implied by an lmer formula for mixed effect modelling
It depends on the study design and on how the data are encoded.
Generally speaking, in the first model we have an intercept varying within g1 and g2, while in the 2nd model we have an intercept varyin |
55,611 | What does it mean to say that a regression method is (not) "scale invariant"? | Scale invariance means that rescaling any or all of the columns will not change the results - that is, multiplying or dividing all the values from any variable will not affect the model predictions (ref). As @ericperkeson mentioned, rescaling in this manner is known as dilation (ref). Scale invariance for metrics about... | What does it mean to say that a regression method is (not) "scale invariant"? | Scale invariance means that rescaling any or all of the columns will not change the results - that is, multiplying or dividing all the values from any variable will not affect the model predictions (r | What does it mean to say that a regression method is (not) "scale invariant"?
Scale invariance means that rescaling any or all of the columns will not change the results - that is, multiplying or dividing all the values from any variable will not affect the model predictions (ref). As @ericperkeson mentioned, rescaling... | What does it mean to say that a regression method is (not) "scale invariant"?
Scale invariance means that rescaling any or all of the columns will not change the results - that is, multiplying or dividing all the values from any variable will not affect the model predictions (r |
55,612 | What does it mean to say that a regression method is (not) "scale invariant"? | Start with the technical meanings of "location" and "scale" with respect to a one-dimensional probability distribution. The NIST handbook says:
A probability distribution is characterized by location and scale parameters ... a location parameter simply shifts the graph left or right on the horizontal axis ... The effe... | What does it mean to say that a regression method is (not) "scale invariant"? | Start with the technical meanings of "location" and "scale" with respect to a one-dimensional probability distribution. The NIST handbook says:
A probability distribution is characterized by location | What does it mean to say that a regression method is (not) "scale invariant"?
Start with the technical meanings of "location" and "scale" with respect to a one-dimensional probability distribution. The NIST handbook says:
A probability distribution is characterized by location and scale parameters ... a location param... | What does it mean to say that a regression method is (not) "scale invariant"?
Start with the technical meanings of "location" and "scale" with respect to a one-dimensional probability distribution. The NIST handbook says:
A probability distribution is characterized by location |
55,613 | What does it mean to say that a regression method is (not) "scale invariant"? | I think the comment by user "erikperkerson" was short and highly informative:
I was under the impression that scale invariant usually means invariant with respect to a dilation (a proper linear mapping, like $f(x) = kx$ for some constant $k$), such as the unit conversion from miles to millimeters that EdM suggested. T... | What does it mean to say that a regression method is (not) "scale invariant"? | I think the comment by user "erikperkerson" was short and highly informative:
I was under the impression that scale invariant usually means invariant with respect to a dilation (a proper linear mappi | What does it mean to say that a regression method is (not) "scale invariant"?
I think the comment by user "erikperkerson" was short and highly informative:
I was under the impression that scale invariant usually means invariant with respect to a dilation (a proper linear mapping, like $f(x) = kx$ for some constant $k$... | What does it mean to say that a regression method is (not) "scale invariant"?
I think the comment by user "erikperkerson" was short and highly informative:
I was under the impression that scale invariant usually means invariant with respect to a dilation (a proper linear mappi |
55,614 | How to evaluate logistic regression on continuous metric by having binary 0/1 data | Remember that a logistic regression outputs a probability, not a category. Your idea for using square loss is fine. In fact, that is known as the Brier score.
If your label is $1$ and your predicted probability is $0.75$, your Brier score loss for that point is $(1-0.75)^2 = 0.0625$.
If your next label is $0$ and your ... | How to evaluate logistic regression on continuous metric by having binary 0/1 data | Remember that a logistic regression outputs a probability, not a category. Your idea for using square loss is fine. In fact, that is known as the Brier score.
If your label is $1$ and your predicted p | How to evaluate logistic regression on continuous metric by having binary 0/1 data
Remember that a logistic regression outputs a probability, not a category. Your idea for using square loss is fine. In fact, that is known as the Brier score.
If your label is $1$ and your predicted probability is $0.75$, your Brier scor... | How to evaluate logistic regression on continuous metric by having binary 0/1 data
Remember that a logistic regression outputs a probability, not a category. Your idea for using square loss is fine. In fact, that is known as the Brier score.
If your label is $1$ and your predicted p |
55,615 | what does it mean that there is leakage of information when one uses a test set? | Data leakage occurs when there is information in your test set's predictors that wouldn't be available when the model is "live." There are egregious and subtle cases of data leakage.
Egregious case.
Say the goal is predicting retention of an insurance policy during the first year. At month 3 there is a scheduled check-... | what does it mean that there is leakage of information when one uses a test set? | Data leakage occurs when there is information in your test set's predictors that wouldn't be available when the model is "live." There are egregious and subtle cases of data leakage.
Egregious case.
S | what does it mean that there is leakage of information when one uses a test set?
Data leakage occurs when there is information in your test set's predictors that wouldn't be available when the model is "live." There are egregious and subtle cases of data leakage.
Egregious case.
Say the goal is predicting retention of ... | what does it mean that there is leakage of information when one uses a test set?
Data leakage occurs when there is information in your test set's predictors that wouldn't be available when the model is "live." There are egregious and subtle cases of data leakage.
Egregious case.
S |
55,616 | Are residuals random variables? | Let's say that your model is
$$y=X\beta+\epsilon,\quad E[y]=X\beta,\quad \epsilon\sim N(0,\sigma^2 I).$$
You estimate the $\beta$ coefficients by
$$\hat\beta=(X'X)^{-1}X'y$$
and you get
$$\hat{y}=Hy,\quad H=X(X'X)^{-1}X'$$
where $H$ is a symmetric idempotent matrix, and
$$\hat\epsilon=y-Hy=(I-H)y,\quad E[\hat\epsilon]=... | Are residuals random variables? | Let's say that your model is
$$y=X\beta+\epsilon,\quad E[y]=X\beta,\quad \epsilon\sim N(0,\sigma^2 I).$$
You estimate the $\beta$ coefficients by
$$\hat\beta=(X'X)^{-1}X'y$$
and you get
$$\hat{y}=Hy,\ | Are residuals random variables?
Let's say that your model is
$$y=X\beta+\epsilon,\quad E[y]=X\beta,\quad \epsilon\sim N(0,\sigma^2 I).$$
You estimate the $\beta$ coefficients by
$$\hat\beta=(X'X)^{-1}X'y$$
and you get
$$\hat{y}=Hy,\quad H=X(X'X)^{-1}X'$$
where $H$ is a symmetric idempotent matrix, and
$$\hat\epsilon=y-... | Are residuals random variables?
Let's say that your model is
$$y=X\beta+\epsilon,\quad E[y]=X\beta,\quad \epsilon\sim N(0,\sigma^2 I).$$
You estimate the $\beta$ coefficients by
$$\hat\beta=(X'X)^{-1}X'y$$
and you get
$$\hat{y}=Hy,\ |
55,617 | What is better: Cross validation or a validation set for hyperparameter optimization? | Cross validation is more robust. So, in general, it is better. But, the marginal benefit you get decreases as dataset size increases. In small datasets, it's definitely suggested. On the other hand, it may not be the best choice due to computational complexity. For example, training might be very expensive, like in dee... | What is better: Cross validation or a validation set for hyperparameter optimization? | Cross validation is more robust. So, in general, it is better. But, the marginal benefit you get decreases as dataset size increases. In small datasets, it's definitely suggested. On the other hand, i | What is better: Cross validation or a validation set for hyperparameter optimization?
Cross validation is more robust. So, in general, it is better. But, the marginal benefit you get decreases as dataset size increases. In small datasets, it's definitely suggested. On the other hand, it may not be the best choice due t... | What is better: Cross validation or a validation set for hyperparameter optimization?
Cross validation is more robust. So, in general, it is better. But, the marginal benefit you get decreases as dataset size increases. In small datasets, it's definitely suggested. On the other hand, i |
55,618 | multiple regression with continuous and binary regressors | Yes that is exactly what you would do. The software will then estimate an intercept along with a coefficient estimate for each variable. | multiple regression with continuous and binary regressors | Yes that is exactly what you would do. The software will then estimate an intercept along with a coefficient estimate for each variable. | multiple regression with continuous and binary regressors
Yes that is exactly what you would do. The software will then estimate an intercept along with a coefficient estimate for each variable. | multiple regression with continuous and binary regressors
Yes that is exactly what you would do. The software will then estimate an intercept along with a coefficient estimate for each variable. |
55,619 | Predicting if some variable is $\geq C$? | Interesting question. First of all, classic linear regression was developed for applications where the scatter is normally distributed. If you plot the residual distribution it should have the classic bell shape. When your data adhere to the these model prerequisites, your can just as well use linear regression. The co... | Predicting if some variable is $\geq C$? | Interesting question. First of all, classic linear regression was developed for applications where the scatter is normally distributed. If you plot the residual distribution it should have the classic | Predicting if some variable is $\geq C$?
Interesting question. First of all, classic linear regression was developed for applications where the scatter is normally distributed. If you plot the residual distribution it should have the classic bell shape. When your data adhere to the these model prerequisites, your can j... | Predicting if some variable is $\geq C$?
Interesting question. First of all, classic linear regression was developed for applications where the scatter is normally distributed. If you plot the residual distribution it should have the classic |
55,620 | Predicting if some variable is $\geq C$? | As you write, either approach is feasible. I don't think you can give a general recommendation. In some situations, there may be more existing knowledge pertaining to one than to the other approach - for instance, if you are forecasting a time series, there is much more work on forecasting a continuous target variable ... | Predicting if some variable is $\geq C$? | As you write, either approach is feasible. I don't think you can give a general recommendation. In some situations, there may be more existing knowledge pertaining to one than to the other approach - | Predicting if some variable is $\geq C$?
As you write, either approach is feasible. I don't think you can give a general recommendation. In some situations, there may be more existing knowledge pertaining to one than to the other approach - for instance, if you are forecasting a time series, there is much more work on ... | Predicting if some variable is $\geq C$?
As you write, either approach is feasible. I don't think you can give a general recommendation. In some situations, there may be more existing knowledge pertaining to one than to the other approach - |
55,621 | How are eigenvalues/singular values related to variance (SVD/PCA)? | The variance of any $p$-vector $x$ is given by
$$\operatorname{Var}(x) = x^\prime C x.\tag{1}$$
We may write $x^\prime$ as a linear combination of the rows of $V,$ $v_1,$ $v_2,\ldots,$ $v_p,$ because
$$x^\prime = x^\prime\mathbb{I} = x^\prime V V^\prime = (x^\prime V)_1v_1 + (x^\prime V)_2v_2 + \cdots + (x^\prime V)_pv... | How are eigenvalues/singular values related to variance (SVD/PCA)? | The variance of any $p$-vector $x$ is given by
$$\operatorname{Var}(x) = x^\prime C x.\tag{1}$$
We may write $x^\prime$ as a linear combination of the rows of $V,$ $v_1,$ $v_2,\ldots,$ $v_p,$ because
| How are eigenvalues/singular values related to variance (SVD/PCA)?
The variance of any $p$-vector $x$ is given by
$$\operatorname{Var}(x) = x^\prime C x.\tag{1}$$
We may write $x^\prime$ as a linear combination of the rows of $V,$ $v_1,$ $v_2,\ldots,$ $v_p,$ because
$$x^\prime = x^\prime\mathbb{I} = x^\prime V V^\prime... | How are eigenvalues/singular values related to variance (SVD/PCA)?
The variance of any $p$-vector $x$ is given by
$$\operatorname{Var}(x) = x^\prime C x.\tag{1}$$
We may write $x^\prime$ as a linear combination of the rows of $V,$ $v_1,$ $v_2,\ldots,$ $v_p,$ because
|
55,622 | Why would you want to fit/use a Poisson regression instead of Negative Binomial? [duplicate] | For many practical applications the negative binomial distribution is more appropriate and is often a reasonable default choice. This is the case whenever we assume that risk varies across observational units (such as patients, hospitals, ...). The Poisson distribution may be appropriate e.g. when it is very clear that... | Why would you want to fit/use a Poisson regression instead of Negative Binomial? [duplicate] | For many practical applications the negative binomial distribution is more appropriate and is often a reasonable default choice. This is the case whenever we assume that risk varies across observation | Why would you want to fit/use a Poisson regression instead of Negative Binomial? [duplicate]
For many practical applications the negative binomial distribution is more appropriate and is often a reasonable default choice. This is the case whenever we assume that risk varies across observational units (such as patients,... | Why would you want to fit/use a Poisson regression instead of Negative Binomial? [duplicate]
For many practical applications the negative binomial distribution is more appropriate and is often a reasonable default choice. This is the case whenever we assume that risk varies across observation |
55,623 | Why would you want to fit/use a Poisson regression instead of Negative Binomial? [duplicate] | The Poisson distribution has a very simple heuristic for its single parameter: the rate of occurrence of a rare event, with events happening independently.
Contrast that to the Wikipedia formulation of the negative binomial distribution:
In probability theory and statistics, the negative binomial distribution is a dis... | Why would you want to fit/use a Poisson regression instead of Negative Binomial? [duplicate] | The Poisson distribution has a very simple heuristic for its single parameter: the rate of occurrence of a rare event, with events happening independently.
Contrast that to the Wikipedia formulation o | Why would you want to fit/use a Poisson regression instead of Negative Binomial? [duplicate]
The Poisson distribution has a very simple heuristic for its single parameter: the rate of occurrence of a rare event, with events happening independently.
Contrast that to the Wikipedia formulation of the negative binomial dis... | Why would you want to fit/use a Poisson regression instead of Negative Binomial? [duplicate]
The Poisson distribution has a very simple heuristic for its single parameter: the rate of occurrence of a rare event, with events happening independently.
Contrast that to the Wikipedia formulation o |
55,624 | Should I use highly skewed features in my model? | Appropriate question.
The added value of preprocessing depends on the type of classifier you will train. If you use nonparametric classifiers like C4.5 (ID3), CART, the multinomial classifier, the webservice insight classifiers, random forests or the like - transformation of your skewed feature values is unnecessary. T... | Should I use highly skewed features in my model? | Appropriate question.
The added value of preprocessing depends on the type of classifier you will train. If you use nonparametric classifiers like C4.5 (ID3), CART, the multinomial classifier, the web | Should I use highly skewed features in my model?
Appropriate question.
The added value of preprocessing depends on the type of classifier you will train. If you use nonparametric classifiers like C4.5 (ID3), CART, the multinomial classifier, the webservice insight classifiers, random forests or the like - transformatio... | Should I use highly skewed features in my model?
Appropriate question.
The added value of preprocessing depends on the type of classifier you will train. If you use nonparametric classifiers like C4.5 (ID3), CART, the multinomial classifier, the web |
55,625 | How to find the 95% confidence interval when there is outliers? | Bootstrap might be one way to do this. In python...
from sklearn.utils import resample
import numpy as np
x = np.array([8.5, 8.0, 16.0, 12.0, 2.5, 515.0, 5.0, 15.0, 13.0, 2.0, 950.0, 15.0, 9.0, 6.0, 12.0, 5.5, 19.5, 7.5, 37.5, 12.5])
xb = np.array([ resample(x).mean() for j in range(10000)])
low, high = np.quantil... | How to find the 95% confidence interval when there is outliers? | Bootstrap might be one way to do this. In python...
from sklearn.utils import resample
import numpy as np
x = np.array([8.5, 8.0, 16.0, 12.0, 2.5, 515.0, 5.0, 15.0, 13.0, 2.0, 950.0, 15.0, 9.0, 6.0 | How to find the 95% confidence interval when there is outliers?
Bootstrap might be one way to do this. In python...
from sklearn.utils import resample
import numpy as np
x = np.array([8.5, 8.0, 16.0, 12.0, 2.5, 515.0, 5.0, 15.0, 13.0, 2.0, 950.0, 15.0, 9.0, 6.0, 12.0, 5.5, 19.5, 7.5, 37.5, 12.5])
xb = np.array([ re... | How to find the 95% confidence interval when there is outliers?
Bootstrap might be one way to do this. In python...
from sklearn.utils import resample
import numpy as np
x = np.array([8.5, 8.0, 16.0, 12.0, 2.5, 515.0, 5.0, 15.0, 13.0, 2.0, 950.0, 15.0, 9.0, 6.0 |
55,626 | How to find the 95% confidence interval when there is outliers? | Quick preliminary results from R:
x=c(8.5, 8.0, 16.0, 12.0, 2.5, 515.0, 5.0, 15.0, 13.0, 2.0,
950.0, 15.0, 9.0, 6.0, 12.0, 5.5, 19.5, 7.5, 37.5, 12.5)
summary(x)
Min. 1st Qu. Median Mean 3rd Qu. Max.
2.000 7.125 12.000 83.575 15.250 950.000
(1) t interval for mean. Assumes normal data, which s... | How to find the 95% confidence interval when there is outliers? | Quick preliminary results from R:
x=c(8.5, 8.0, 16.0, 12.0, 2.5, 515.0, 5.0, 15.0, 13.0, 2.0,
950.0, 15.0, 9.0, 6.0, 12.0, 5.5, 19.5, 7.5, 37.5, 12.5)
summary(x)
Min. 1st Qu. Median Mean | How to find the 95% confidence interval when there is outliers?
Quick preliminary results from R:
x=c(8.5, 8.0, 16.0, 12.0, 2.5, 515.0, 5.0, 15.0, 13.0, 2.0,
950.0, 15.0, 9.0, 6.0, 12.0, 5.5, 19.5, 7.5, 37.5, 12.5)
summary(x)
Min. 1st Qu. Median Mean 3rd Qu. Max.
2.000 7.125 12.000 83.575 15.250... | How to find the 95% confidence interval when there is outliers?
Quick preliminary results from R:
x=c(8.5, 8.0, 16.0, 12.0, 2.5, 515.0, 5.0, 15.0, 13.0, 2.0,
950.0, 15.0, 9.0, 6.0, 12.0, 5.5, 19.5, 7.5, 37.5, 12.5)
summary(x)
Min. 1st Qu. Median Mean |
55,627 | covariance ,correlation, within subject and between subjects | The toy dataset provided isn't very useful for explaining these concepts so I will try my best to explain in an easy-to-understand way.
The covariance of two variables is a measure of how much one variable goes up (or down) when the other goes up (or down). More technically, it is the average of the product of the diff... | covariance ,correlation, within subject and between subjects | The toy dataset provided isn't very useful for explaining these concepts so I will try my best to explain in an easy-to-understand way.
The covariance of two variables is a measure of how much one var | covariance ,correlation, within subject and between subjects
The toy dataset provided isn't very useful for explaining these concepts so I will try my best to explain in an easy-to-understand way.
The covariance of two variables is a measure of how much one variable goes up (or down) when the other goes up (or down). M... | covariance ,correlation, within subject and between subjects
The toy dataset provided isn't very useful for explaining these concepts so I will try my best to explain in an easy-to-understand way.
The covariance of two variables is a measure of how much one var |
55,628 | Easy vs difficult distributions for sampling | Computers can only do pseudo random sampling directly from a Uniform Distribution. Sampling from any other distribution requires some numerical transformations, such as Inverse Transform Sampling.
This method, however, only allows to sample from distribution that have a defined Cumulative Distribution Function that ca... | Easy vs difficult distributions for sampling | Computers can only do pseudo random sampling directly from a Uniform Distribution. Sampling from any other distribution requires some numerical transformations, such as Inverse Transform Sampling.
Th | Easy vs difficult distributions for sampling
Computers can only do pseudo random sampling directly from a Uniform Distribution. Sampling from any other distribution requires some numerical transformations, such as Inverse Transform Sampling.
This method, however, only allows to sample from distribution that have a def... | Easy vs difficult distributions for sampling
Computers can only do pseudo random sampling directly from a Uniform Distribution. Sampling from any other distribution requires some numerical transformations, such as Inverse Transform Sampling.
Th |
55,629 | Rubin's rule from scratch for multiple imputations | After multiple imputation of data sets (MI) and analyzing each of the imputed sets separately, Rubin's rules do have you take the mean over those imputations as the point estimate. For inference, confidence intervals and so forth, you then determine the overall variance of the point estimate as a combination of within-... | Rubin's rule from scratch for multiple imputations | After multiple imputation of data sets (MI) and analyzing each of the imputed sets separately, Rubin's rules do have you take the mean over those imputations as the point estimate. For inference, conf | Rubin's rule from scratch for multiple imputations
After multiple imputation of data sets (MI) and analyzing each of the imputed sets separately, Rubin's rules do have you take the mean over those imputations as the point estimate. For inference, confidence intervals and so forth, you then determine the overall varianc... | Rubin's rule from scratch for multiple imputations
After multiple imputation of data sets (MI) and analyzing each of the imputed sets separately, Rubin's rules do have you take the mean over those imputations as the point estimate. For inference, conf |
55,630 | Most powerful test of size zero for $\theta$ given random sample from $U(0, \theta)$ | Yes, it is correct. You can derive this test from the likelihood ratio. The likelihood $L_\theta$ is $\theta^n$ if all $Y_i\leq\theta$ and 0 otherwise, so the likelihood ratio is $(1/4)^n$ if all $y_i\leq 1$ and $0$ otherwise.
The most powerful test must choose $\theta=1$ if $Y_{(n)}\leq 1$ and $\theta=4$ otherwise, s... | Most powerful test of size zero for $\theta$ given random sample from $U(0, \theta)$ | Yes, it is correct. You can derive this test from the likelihood ratio. The likelihood $L_\theta$ is $\theta^n$ if all $Y_i\leq\theta$ and 0 otherwise, so the likelihood ratio is $(1/4)^n$ if all $y_ | Most powerful test of size zero for $\theta$ given random sample from $U(0, \theta)$
Yes, it is correct. You can derive this test from the likelihood ratio. The likelihood $L_\theta$ is $\theta^n$ if all $Y_i\leq\theta$ and 0 otherwise, so the likelihood ratio is $(1/4)^n$ if all $y_i\leq 1$ and $0$ otherwise.
The mos... | Most powerful test of size zero for $\theta$ given random sample from $U(0, \theta)$
Yes, it is correct. You can derive this test from the likelihood ratio. The likelihood $L_\theta$ is $\theta^n$ if all $Y_i\leq\theta$ and 0 otherwise, so the likelihood ratio is $(1/4)^n$ if all $y_ |
55,631 | At what point in analysis do you perform imputation for missing variables? | You should do all the imputations first, otherwise you may get biased results.
I don't know what hotdeck in Stata does exactly, but if it is a single imputation method (ie you get one completed/imputed dataset) then I would advise against it. At the very least I would advise creating several completeted datasets, if th... | At what point in analysis do you perform imputation for missing variables? | You should do all the imputations first, otherwise you may get biased results.
I don't know what hotdeck in Stata does exactly, but if it is a single imputation method (ie you get one completed/impute | At what point in analysis do you perform imputation for missing variables?
You should do all the imputations first, otherwise you may get biased results.
I don't know what hotdeck in Stata does exactly, but if it is a single imputation method (ie you get one completed/imputed dataset) then I would advise against it. At... | At what point in analysis do you perform imputation for missing variables?
You should do all the imputations first, otherwise you may get biased results.
I don't know what hotdeck in Stata does exactly, but if it is a single imputation method (ie you get one completed/impute |
55,632 | At what point in analysis do you perform imputation for missing variables? | Since you’ve decided on an imputation method relying on MCAR (missing completely at random) data, I infer that your data are indeed MCAR. In this case, you should impute the missing values after the exclusion criteria are applied, for two reasons:
Speed (because there are fewer data points to process, downstream of ex... | At what point in analysis do you perform imputation for missing variables? | Since you’ve decided on an imputation method relying on MCAR (missing completely at random) data, I infer that your data are indeed MCAR. In this case, you should impute the missing values after the e | At what point in analysis do you perform imputation for missing variables?
Since you’ve decided on an imputation method relying on MCAR (missing completely at random) data, I infer that your data are indeed MCAR. In this case, you should impute the missing values after the exclusion criteria are applied, for two reason... | At what point in analysis do you perform imputation for missing variables?
Since you’ve decided on an imputation method relying on MCAR (missing completely at random) data, I infer that your data are indeed MCAR. In this case, you should impute the missing values after the e |
55,633 | Is Anomaly Detection Supervised or Un-supervised? | Typically, it is unsupervised. But actually it can be either. Let's start with supervised anomaly detection.
Supervised anomaly/outlier detection
For supervised anomaly detection, you need labelled training data where for each row you know if it is an outlier/anomaly or not. Any modeling technique for binary responses ... | Is Anomaly Detection Supervised or Un-supervised? | Typically, it is unsupervised. But actually it can be either. Let's start with supervised anomaly detection.
Supervised anomaly/outlier detection
For supervised anomaly detection, you need labelled tr | Is Anomaly Detection Supervised or Un-supervised?
Typically, it is unsupervised. But actually it can be either. Let's start with supervised anomaly detection.
Supervised anomaly/outlier detection
For supervised anomaly detection, you need labelled training data where for each row you know if it is an outlier/anomaly or... | Is Anomaly Detection Supervised or Un-supervised?
Typically, it is unsupervised. But actually it can be either. Let's start with supervised anomaly detection.
Supervised anomaly/outlier detection
For supervised anomaly detection, you need labelled tr |
55,634 | Point estimator for product of independent RVs | I'm assuming what you want to estimate is $E[XY]$ (you don't say, but the use of the sample mean suggests it)
Intuitively, $\overline{XY}$ would work even if $X$ and $Y$ weren't independent, so it should be less efficient under the additional assumption that they are independent. Let's see how that goes
Let's look at... | Point estimator for product of independent RVs | I'm assuming what you want to estimate is $E[XY]$ (you don't say, but the use of the sample mean suggests it)
Intuitively, $\overline{XY}$ would work even if $X$ and $Y$ weren't independent, so it sh | Point estimator for product of independent RVs
I'm assuming what you want to estimate is $E[XY]$ (you don't say, but the use of the sample mean suggests it)
Intuitively, $\overline{XY}$ would work even if $X$ and $Y$ weren't independent, so it should be less efficient under the additional assumption that they are inde... | Point estimator for product of independent RVs
I'm assuming what you want to estimate is $E[XY]$ (you don't say, but the use of the sample mean suggests it)
Intuitively, $\overline{XY}$ would work even if $X$ and $Y$ weren't independent, so it sh |
55,635 | Can I use the Kolmogorov-Smirnov test with estimated parameters? | This is an invalid procedure.
https://en.m.wikipedia.org/wiki/Kolmogorov–Smirnov_test
Scroll down to “Test with estimated parameters”. Disappointingly, they do not give much of a reference, but the book referenced in that paragraph might explain. (Cross Validated has many posts on this topic, too, though it would be ni... | Can I use the Kolmogorov-Smirnov test with estimated parameters? | This is an invalid procedure.
https://en.m.wikipedia.org/wiki/Kolmogorov–Smirnov_test
Scroll down to “Test with estimated parameters”. Disappointingly, they do not give much of a reference, but the bo | Can I use the Kolmogorov-Smirnov test with estimated parameters?
This is an invalid procedure.
https://en.m.wikipedia.org/wiki/Kolmogorov–Smirnov_test
Scroll down to “Test with estimated parameters”. Disappointingly, they do not give much of a reference, but the book referenced in that paragraph might explain. (Cross V... | Can I use the Kolmogorov-Smirnov test with estimated parameters?
This is an invalid procedure.
https://en.m.wikipedia.org/wiki/Kolmogorov–Smirnov_test
Scroll down to “Test with estimated parameters”. Disappointingly, they do not give much of a reference, but the bo |
55,636 | Can I use the Kolmogorov-Smirnov test with estimated parameters? | The standard critical values will be too aggressive as the K-S test doesn’t take into account the sample error in the MLE estimates. You therefore need to bootstrap the critical values to form a valid inference. | Can I use the Kolmogorov-Smirnov test with estimated parameters? | The standard critical values will be too aggressive as the K-S test doesn’t take into account the sample error in the MLE estimates. You therefore need to bootstrap the critical values to form a vali | Can I use the Kolmogorov-Smirnov test with estimated parameters?
The standard critical values will be too aggressive as the K-S test doesn’t take into account the sample error in the MLE estimates. You therefore need to bootstrap the critical values to form a valid inference. | Can I use the Kolmogorov-Smirnov test with estimated parameters?
The standard critical values will be too aggressive as the K-S test doesn’t take into account the sample error in the MLE estimates. You therefore need to bootstrap the critical values to form a vali |
55,637 | What is the relationship between Boltzmann / Gibbs sampling and the softmax function? | Different feedback signals and loss functions
The difference lies in the interpretation of the values / logits. More precisely, how the values / logits are tied to different feedback signals.
First, their similarity
First, let's paraphrase the question. Let $\mathbf{z}\in\mathbb{R}^n$ be proper logits and let $\mathbb{... | What is the relationship between Boltzmann / Gibbs sampling and the softmax function? | Different feedback signals and loss functions
The difference lies in the interpretation of the values / logits. More precisely, how the values / logits are tied to different feedback signals.
First, t | What is the relationship between Boltzmann / Gibbs sampling and the softmax function?
Different feedback signals and loss functions
The difference lies in the interpretation of the values / logits. More precisely, how the values / logits are tied to different feedback signals.
First, their similarity
First, let's parap... | What is the relationship between Boltzmann / Gibbs sampling and the softmax function?
Different feedback signals and loss functions
The difference lies in the interpretation of the values / logits. More precisely, how the values / logits are tied to different feedback signals.
First, t |
55,638 | What is the relationship between Boltzmann / Gibbs sampling and the softmax function? | What is the relationship between this and Gibbs sampling / Blotzmann sampling?
Mathematically, the two functions are very similar. Gibbs sampling adds a scaling "temperature" factor which is applied to scores before using them in the softmax.
The scenarios in which they are used are different:
Softmax probabilities ... | What is the relationship between Boltzmann / Gibbs sampling and the softmax function? | What is the relationship between this and Gibbs sampling / Blotzmann sampling?
Mathematically, the two functions are very similar. Gibbs sampling adds a scaling "temperature" factor which is applied | What is the relationship between Boltzmann / Gibbs sampling and the softmax function?
What is the relationship between this and Gibbs sampling / Blotzmann sampling?
Mathematically, the two functions are very similar. Gibbs sampling adds a scaling "temperature" factor which is applied to scores before using them in th... | What is the relationship between Boltzmann / Gibbs sampling and the softmax function?
What is the relationship between this and Gibbs sampling / Blotzmann sampling?
Mathematically, the two functions are very similar. Gibbs sampling adds a scaling "temperature" factor which is applied |
55,639 | Average of the outside of a truncated normal distribution | A simple way is using the total expectation formula:
$$\mu=E[X]=E[X|a<X<b]P(a<X<b)+E[X|X<a\cup X>b](1-P(a<X<b))$$
The expected value, $E[X|a<X<b]$, is given in your post. And, the probability $P(a<X<b)$ can be written in terms of the standard normal CDF quite easily (which is $Z$). | Average of the outside of a truncated normal distribution | A simple way is using the total expectation formula:
$$\mu=E[X]=E[X|a<X<b]P(a<X<b)+E[X|X<a\cup X>b](1-P(a<X<b))$$
The expected value, $E[X|a<X<b]$, is given in your post. And, the probability $P(a<X<b | Average of the outside of a truncated normal distribution
A simple way is using the total expectation formula:
$$\mu=E[X]=E[X|a<X<b]P(a<X<b)+E[X|X<a\cup X>b](1-P(a<X<b))$$
The expected value, $E[X|a<X<b]$, is given in your post. And, the probability $P(a<X<b)$ can be written in terms of the standard normal CDF quite ea... | Average of the outside of a truncated normal distribution
A simple way is using the total expectation formula:
$$\mu=E[X]=E[X|a<X<b]P(a<X<b)+E[X|X<a\cup X>b](1-P(a<X<b))$$
The expected value, $E[X|a<X<b]$, is given in your post. And, the probability $P(a<X<b |
55,640 | Does this seems like a reasonable definition of a uniform distribution? | Let me answer the implicit question: what is a uniform distribution?
Because $X$ is a random variable, $S$ really is the underlying set in a probability space $(S,\mathfrak F, \mathbb P).$
We say $X$ has a continuous uniform distribution when there exists a subset $A\subset \mathbb R$ such that, for every interval $(a... | Does this seems like a reasonable definition of a uniform distribution? | Let me answer the implicit question: what is a uniform distribution?
Because $X$ is a random variable, $S$ really is the underlying set in a probability space $(S,\mathfrak F, \mathbb P).$
We say $X$ | Does this seems like a reasonable definition of a uniform distribution?
Let me answer the implicit question: what is a uniform distribution?
Because $X$ is a random variable, $S$ really is the underlying set in a probability space $(S,\mathfrak F, \mathbb P).$
We say $X$ has a continuous uniform distribution when ther... | Does this seems like a reasonable definition of a uniform distribution?
Let me answer the implicit question: what is a uniform distribution?
Because $X$ is a random variable, $S$ really is the underlying set in a probability space $(S,\mathfrak F, \mathbb P).$
We say $X$ |
55,641 | Interpretation of Weibull Accelerated Failure Time Model Output | Many (including me) get confused by the different ways to define the parameters of a Weibull distribution, particularly since the standard R Weibull-related functions in the stats package and the survreg() parametric fitting function in the survival package use different parameterizations.
The manual page for the R Wei... | Interpretation of Weibull Accelerated Failure Time Model Output | Many (including me) get confused by the different ways to define the parameters of a Weibull distribution, particularly since the standard R Weibull-related functions in the stats package and the surv | Interpretation of Weibull Accelerated Failure Time Model Output
Many (including me) get confused by the different ways to define the parameters of a Weibull distribution, particularly since the standard R Weibull-related functions in the stats package and the survreg() parametric fitting function in the survival packag... | Interpretation of Weibull Accelerated Failure Time Model Output
Many (including me) get confused by the different ways to define the parameters of a Weibull distribution, particularly since the standard R Weibull-related functions in the stats package and the surv |
55,642 | When is multiple imputation useful for multilevel models? | In general, mixed-effects models will provide you with valid inferences under MAR, provided that the random-effects structure is appropriately specified. Therefore, no (multiple) imputation is required. Namely, the model specifies the distribution of the complete data outcome data $Y_i$ for all time points. Under MAR, ... | When is multiple imputation useful for multilevel models? | In general, mixed-effects models will provide you with valid inferences under MAR, provided that the random-effects structure is appropriately specified. Therefore, no (multiple) imputation is require | When is multiple imputation useful for multilevel models?
In general, mixed-effects models will provide you with valid inferences under MAR, provided that the random-effects structure is appropriately specified. Therefore, no (multiple) imputation is required. Namely, the model specifies the distribution of the complet... | When is multiple imputation useful for multilevel models?
In general, mixed-effects models will provide you with valid inferences under MAR, provided that the random-effects structure is appropriately specified. Therefore, no (multiple) imputation is require |
55,643 | Multiple Linear Regression Coefficient Estimators and Hypothesis Testing | You have already given the formula for the variance matrix for the coefficient estimator. The Gramian matrix of the design matrix for the regression ---which appears in that formula--- is:
$$\begin{aligned}
\mathbf{x}^\text{T} \mathbf{x}
&= \begin{bmatrix}
\mathbf{x}_1 \cdot \mathbf{x}_1 & \mathbf{x}_1 \cdot \mathbf{... | Multiple Linear Regression Coefficient Estimators and Hypothesis Testing | You have already given the formula for the variance matrix for the coefficient estimator. The Gramian matrix of the design matrix for the regression ---which appears in that formula--- is:
$$\begin{a | Multiple Linear Regression Coefficient Estimators and Hypothesis Testing
You have already given the formula for the variance matrix for the coefficient estimator. The Gramian matrix of the design matrix for the regression ---which appears in that formula--- is:
$$\begin{aligned}
\mathbf{x}^\text{T} \mathbf{x}
&= \beg... | Multiple Linear Regression Coefficient Estimators and Hypothesis Testing
You have already given the formula for the variance matrix for the coefficient estimator. The Gramian matrix of the design matrix for the regression ---which appears in that formula--- is:
$$\begin{a |
55,644 | Multiple Linear Regression Coefficient Estimators and Hypothesis Testing | As You know that the OLS estimator is a linear function of $y$. $\hat{\beta} \sim N(\beta, \sigma^2(X’X)^{-1})$ since $\epsilon \sim N(0,\sigma^2)$.
1) All you need to show is that the matrix $(X’X)^{-1}$ is a scalar matrix. Just compute the inverse using appropriate entries for $x_1,x_2,x_3$
2) All you need to do is t... | Multiple Linear Regression Coefficient Estimators and Hypothesis Testing | As You know that the OLS estimator is a linear function of $y$. $\hat{\beta} \sim N(\beta, \sigma^2(X’X)^{-1})$ since $\epsilon \sim N(0,\sigma^2)$.
1) All you need to show is that the matrix $(X’X)^{ | Multiple Linear Regression Coefficient Estimators and Hypothesis Testing
As You know that the OLS estimator is a linear function of $y$. $\hat{\beta} \sim N(\beta, \sigma^2(X’X)^{-1})$ since $\epsilon \sim N(0,\sigma^2)$.
1) All you need to show is that the matrix $(X’X)^{-1}$ is a scalar matrix. Just compute the inver... | Multiple Linear Regression Coefficient Estimators and Hypothesis Testing
As You know that the OLS estimator is a linear function of $y$. $\hat{\beta} \sim N(\beta, \sigma^2(X’X)^{-1})$ since $\epsilon \sim N(0,\sigma^2)$.
1) All you need to show is that the matrix $(X’X)^{ |
55,645 | Calculating Diagonal Elements of $(X^TX)^{-1}$ From R Output | Hint: Find the formula for the standard errors of the coefficient estimators. Notice also that these standard errors are given to you in the output. | Calculating Diagonal Elements of $(X^TX)^{-1}$ From R Output | Hint: Find the formula for the standard errors of the coefficient estimators. Notice also that these standard errors are given to you in the output. | Calculating Diagonal Elements of $(X^TX)^{-1}$ From R Output
Hint: Find the formula for the standard errors of the coefficient estimators. Notice also that these standard errors are given to you in the output. | Calculating Diagonal Elements of $(X^TX)^{-1}$ From R Output
Hint: Find the formula for the standard errors of the coefficient estimators. Notice also that these standard errors are given to you in the output. |
55,646 | Formula for difference in order statistics [closed] | Let $W_{i,j:n} = X_{j:n}-X_{i:n},\; 1\leq i<j\leq n$ be the difference between the $i$th and $j$th order statistics (aka the spacings). The pdf of $W_{i,j:n}$ is then given by:
$$
f_{W_{i,j:n}}(w) = \frac{n!}{(i-1)!(j-i-1)!(n-j)!}\times \int_{-\infty}^{\infty}\left\{F(x_{i})\right\}^{i-1}\left\{F(x_{i} + w) - F(x_{i})\... | Formula for difference in order statistics [closed] | Let $W_{i,j:n} = X_{j:n}-X_{i:n},\; 1\leq i<j\leq n$ be the difference between the $i$th and $j$th order statistics (aka the spacings). The pdf of $W_{i,j:n}$ is then given by:
$$
f_{W_{i,j:n}}(w) = \ | Formula for difference in order statistics [closed]
Let $W_{i,j:n} = X_{j:n}-X_{i:n},\; 1\leq i<j\leq n$ be the difference between the $i$th and $j$th order statistics (aka the spacings). The pdf of $W_{i,j:n}$ is then given by:
$$
f_{W_{i,j:n}}(w) = \frac{n!}{(i-1)!(j-i-1)!(n-j)!}\times \int_{-\infty}^{\infty}\left\{F... | Formula for difference in order statistics [closed]
Let $W_{i,j:n} = X_{j:n}-X_{i:n},\; 1\leq i<j\leq n$ be the difference between the $i$th and $j$th order statistics (aka the spacings). The pdf of $W_{i,j:n}$ is then given by:
$$
f_{W_{i,j:n}}(w) = \ |
55,647 | Can a ratio of random variables be normal? [duplicate] | A trivial case: Let $Y$ be a normal RV, and $Z$ be a constant RV, then $X$ is going to be normally distributed.
Another one: let $A,B$ normal RVs, and $C=A/B,D=1/B$ are two other RVs that belonging to Cauchy and Reciprocal Normal Distributions. Their ratio will be $C/D=A$ normally distributed. | Can a ratio of random variables be normal? [duplicate] | A trivial case: Let $Y$ be a normal RV, and $Z$ be a constant RV, then $X$ is going to be normally distributed.
Another one: let $A,B$ normal RVs, and $C=A/B,D=1/B$ are two other RVs that belonging to | Can a ratio of random variables be normal? [duplicate]
A trivial case: Let $Y$ be a normal RV, and $Z$ be a constant RV, then $X$ is going to be normally distributed.
Another one: let $A,B$ normal RVs, and $C=A/B,D=1/B$ are two other RVs that belonging to Cauchy and Reciprocal Normal Distributions. Their ratio will be ... | Can a ratio of random variables be normal? [duplicate]
A trivial case: Let $Y$ be a normal RV, and $Z$ be a constant RV, then $X$ is going to be normally distributed.
Another one: let $A,B$ normal RVs, and $C=A/B,D=1/B$ are two other RVs that belonging to |
55,648 | What does dotted line mean in ResNet? | It's best to understand the model in terms of individual "Residual" blocks that stack up and result in the entire architecture. As you would have probably noticed, the dotted connections only come up at a few places where there is an increase in the depth (number of channels and not the spatial dimensions). In this cas... | What does dotted line mean in ResNet? | It's best to understand the model in terms of individual "Residual" blocks that stack up and result in the entire architecture. As you would have probably noticed, the dotted connections only come up | What does dotted line mean in ResNet?
It's best to understand the model in terms of individual "Residual" blocks that stack up and result in the entire architecture. As you would have probably noticed, the dotted connections only come up at a few places where there is an increase in the depth (number of channels and no... | What does dotted line mean in ResNet?
It's best to understand the model in terms of individual "Residual" blocks that stack up and result in the entire architecture. As you would have probably noticed, the dotted connections only come up |
55,649 | What does dotted line mean in ResNet? | For a better understanding of the architecture, I'd suggest taking a look at an implementation. There are two types of blocks in the ResNet architecture, keras refers to them as the conv_block and the identity_block.
The identity_block is the one with the straight line. It consists of three convolution layers (with B... | What does dotted line mean in ResNet? | For a better understanding of the architecture, I'd suggest taking a look at an implementation. There are two types of blocks in the ResNet architecture, keras refers to them as the conv_block and the | What does dotted line mean in ResNet?
For a better understanding of the architecture, I'd suggest taking a look at an implementation. There are two types of blocks in the ResNet architecture, keras refers to them as the conv_block and the identity_block.
The identity_block is the one with the straight line. It consis... | What does dotted line mean in ResNet?
For a better understanding of the architecture, I'd suggest taking a look at an implementation. There are two types of blocks in the ResNet architecture, keras refers to them as the conv_block and the |
55,650 | What test exactly does lm.anova perform in R? | R has comprehensive documentation. For this specific case help(anova.lm) says:
Details:
Specifying a single object gives a sequential analysis of variance
table for that fit. That is, the reductions in the residual sum
of squares as each term of the formula is added in turn are given
in as the ro... | What test exactly does lm.anova perform in R? | R has comprehensive documentation. For this specific case help(anova.lm) says:
Details:
Specifying a single object gives a sequential analysis of variance
table for that fit. That is, the red | What test exactly does lm.anova perform in R?
R has comprehensive documentation. For this specific case help(anova.lm) says:
Details:
Specifying a single object gives a sequential analysis of variance
table for that fit. That is, the reductions in the residual sum
of squares as each term of the formula ... | What test exactly does lm.anova perform in R?
R has comprehensive documentation. For this specific case help(anova.lm) says:
Details:
Specifying a single object gives a sequential analysis of variance
table for that fit. That is, the red |
55,651 | Should I use GridSearchCV on all of my data? Or just the training set? | I think it's important to step back and consider the purpose of breaking your data into a training and test set in the first place.
Ultimately, your goal is to build a model that will perform the best on a new set of data, given that it is trained on the data you have. One way to evaluate how well your model will perf... | Should I use GridSearchCV on all of my data? Or just the training set? | I think it's important to step back and consider the purpose of breaking your data into a training and test set in the first place.
Ultimately, your goal is to build a model that will perform the best | Should I use GridSearchCV on all of my data? Or just the training set?
I think it's important to step back and consider the purpose of breaking your data into a training and test set in the first place.
Ultimately, your goal is to build a model that will perform the best on a new set of data, given that it is trained o... | Should I use GridSearchCV on all of my data? Or just the training set?
I think it's important to step back and consider the purpose of breaking your data into a training and test set in the first place.
Ultimately, your goal is to build a model that will perform the best |
55,652 | Should I use GridSearchCV on all of my data? Or just the training set? | GridSearch Cv will calculate the average of out of fold recall for each combination of parameters, the set of parameters with best score, will be chosen by Grid search CV. It is fine to use the entire dataset, as you are using Cv method, which will check the score on out of fold set, hence you are not evaluating perfor... | Should I use GridSearchCV on all of my data? Or just the training set? | GridSearch Cv will calculate the average of out of fold recall for each combination of parameters, the set of parameters with best score, will be chosen by Grid search CV. It is fine to use the entire | Should I use GridSearchCV on all of my data? Or just the training set?
GridSearch Cv will calculate the average of out of fold recall for each combination of parameters, the set of parameters with best score, will be chosen by Grid search CV. It is fine to use the entire dataset, as you are using Cv method, which will ... | Should I use GridSearchCV on all of my data? Or just the training set?
GridSearch Cv will calculate the average of out of fold recall for each combination of parameters, the set of parameters with best score, will be chosen by Grid search CV. It is fine to use the entire |
55,653 | What is the mean and standard deviation of $5x^3 + 8$ when $X$ is the sum of numbers of two fair dice | Make a table and apply the definitions.
The expectation is found by multiplying each possible value by its chance and adding up those results. The residuals are the differences between each possible value and the expectation. The variance is the expectation of the squared residuals. The standard deviation is the squa... | What is the mean and standard deviation of $5x^3 + 8$ when $X$ is the sum of numbers of two fair dic | Make a table and apply the definitions.
The expectation is found by multiplying each possible value by its chance and adding up those results. The residuals are the differences between each possible | What is the mean and standard deviation of $5x^3 + 8$ when $X$ is the sum of numbers of two fair dice
Make a table and apply the definitions.
The expectation is found by multiplying each possible value by its chance and adding up those results. The residuals are the differences between each possible value and the expe... | What is the mean and standard deviation of $5x^3 + 8$ when $X$ is the sum of numbers of two fair dic
Make a table and apply the definitions.
The expectation is found by multiplying each possible value by its chance and adding up those results. The residuals are the differences between each possible |
55,654 | What is the mean and standard deviation of $5x^3 + 8$ when $X$ is the sum of numbers of two fair dice | $X^3=[(X-\mu)+\mu]^3=(X-\mu)^3+3(X-\mu)^2.\mu+3(X-\mu).\mu^2+\mu^3$
Hence $E(X^3) = E(X-\mu)^3+3\mu E(X-\mu)^2+3\mu^2 E(X-\mu)+\mu^3=3\mu \sigma^2+\mu^3$.
(The 1st term of the four is $0$ because of symmetry + finite support, the 3rd because $E(X)=\mu$)
Now $\mu=7$ and $\sigma^2=\frac{35}{6}$, as you have already found... | What is the mean and standard deviation of $5x^3 + 8$ when $X$ is the sum of numbers of two fair dic | $X^3=[(X-\mu)+\mu]^3=(X-\mu)^3+3(X-\mu)^2.\mu+3(X-\mu).\mu^2+\mu^3$
Hence $E(X^3) = E(X-\mu)^3+3\mu E(X-\mu)^2+3\mu^2 E(X-\mu)+\mu^3=3\mu \sigma^2+\mu^3$.
(The 1st term of the four is $0$ because of s | What is the mean and standard deviation of $5x^3 + 8$ when $X$ is the sum of numbers of two fair dice
$X^3=[(X-\mu)+\mu]^3=(X-\mu)^3+3(X-\mu)^2.\mu+3(X-\mu).\mu^2+\mu^3$
Hence $E(X^3) = E(X-\mu)^3+3\mu E(X-\mu)^2+3\mu^2 E(X-\mu)+\mu^3=3\mu \sigma^2+\mu^3$.
(The 1st term of the four is $0$ because of symmetry + finite s... | What is the mean and standard deviation of $5x^3 + 8$ when $X$ is the sum of numbers of two fair dic
$X^3=[(X-\mu)+\mu]^3=(X-\mu)^3+3(X-\mu)^2.\mu+3(X-\mu).\mu^2+\mu^3$
Hence $E(X^3) = E(X-\mu)^3+3\mu E(X-\mu)^2+3\mu^2 E(X-\mu)+\mu^3=3\mu \sigma^2+\mu^3$.
(The 1st term of the four is $0$ because of s |
55,655 | In Bayesian inference, why is p(D) sometimes called "the evidence"? [duplicate] | It is called the marginal likelihood because: this constant value $p(D)$ is what you obtain when you integrate over all possible values of $H$, leaving you with the probability of observing $D$ under your model.
It is called the normalizing constant because: this constant value $p(D)$ normalizes $p(D|H)p(H)$, making it... | In Bayesian inference, why is p(D) sometimes called "the evidence"? [duplicate] | It is called the marginal likelihood because: this constant value $p(D)$ is what you obtain when you integrate over all possible values of $H$, leaving you with the probability of observing $D$ under | In Bayesian inference, why is p(D) sometimes called "the evidence"? [duplicate]
It is called the marginal likelihood because: this constant value $p(D)$ is what you obtain when you integrate over all possible values of $H$, leaving you with the probability of observing $D$ under your model.
It is called the normalizing... | In Bayesian inference, why is p(D) sometimes called "the evidence"? [duplicate]
It is called the marginal likelihood because: this constant value $p(D)$ is what you obtain when you integrate over all possible values of $H$, leaving you with the probability of observing $D$ under |
55,656 | In Bayesian inference, why is p(D) sometimes called "the evidence"? [duplicate] | Notice that you can multiply both sides by $p(D)$:
$$p(H|D)p(D) = p(D|H)p(H)$$
This directly corresponds to the graphical proof of Bayes' Theorem - if all your variables are independent, you get the same slice of the pie (total probability) no matter in which order you make the cuts (conditioning on one variable).
In ... | In Bayesian inference, why is p(D) sometimes called "the evidence"? [duplicate] | Notice that you can multiply both sides by $p(D)$:
$$p(H|D)p(D) = p(D|H)p(H)$$
This directly corresponds to the graphical proof of Bayes' Theorem - if all your variables are independent, you get the | In Bayesian inference, why is p(D) sometimes called "the evidence"? [duplicate]
Notice that you can multiply both sides by $p(D)$:
$$p(H|D)p(D) = p(D|H)p(H)$$
This directly corresponds to the graphical proof of Bayes' Theorem - if all your variables are independent, you get the same slice of the pie (total probability... | In Bayesian inference, why is p(D) sometimes called "the evidence"? [duplicate]
Notice that you can multiply both sides by $p(D)$:
$$p(H|D)p(D) = p(D|H)p(H)$$
This directly corresponds to the graphical proof of Bayes' Theorem - if all your variables are independent, you get the |
55,657 | In Bayesian inference, why is p(D) sometimes called "the evidence"? [duplicate] | I probably wouldn't call it "evidence", however I think it means "all the information in the data", which in Bayesian statistics is codified as $P(D)$ marginalised over all hypotheses/distributions deemed possible. | In Bayesian inference, why is p(D) sometimes called "the evidence"? [duplicate] | I probably wouldn't call it "evidence", however I think it means "all the information in the data", which in Bayesian statistics is codified as $P(D)$ marginalised over all hypotheses/distributions de | In Bayesian inference, why is p(D) sometimes called "the evidence"? [duplicate]
I probably wouldn't call it "evidence", however I think it means "all the information in the data", which in Bayesian statistics is codified as $P(D)$ marginalised over all hypotheses/distributions deemed possible. | In Bayesian inference, why is p(D) sometimes called "the evidence"? [duplicate]
I probably wouldn't call it "evidence", however I think it means "all the information in the data", which in Bayesian statistics is codified as $P(D)$ marginalised over all hypotheses/distributions de |
55,658 | For simple linear regression, is $\beta_1$ linear in $y_i$? | The second term is zero because:
$$\sum_i (x_i - \bar x) = \sum_i x_i - n \bar x = n \bar x - n \bar x = 0$$
This is a trick that comes up pretty often, so it's nice to have an eye for spotting it. | For simple linear regression, is $\beta_1$ linear in $y_i$? | The second term is zero because:
$$\sum_i (x_i - \bar x) = \sum_i x_i - n \bar x = n \bar x - n \bar x = 0$$
This is a trick that comes up pretty often, so it's nice to have an eye for spotting it. | For simple linear regression, is $\beta_1$ linear in $y_i$?
The second term is zero because:
$$\sum_i (x_i - \bar x) = \sum_i x_i - n \bar x = n \bar x - n \bar x = 0$$
This is a trick that comes up pretty often, so it's nice to have an eye for spotting it. | For simple linear regression, is $\beta_1$ linear in $y_i$?
The second term is zero because:
$$\sum_i (x_i - \bar x) = \sum_i x_i - n \bar x = n \bar x - n \bar x = 0$$
This is a trick that comes up pretty often, so it's nice to have an eye for spotting it. |
55,659 | Conditional expectation of random variables defined off of each other | Your first question is key, so let's focus on it. You are concerned about a bivariate random variable $(X_{n-1},X_n)$ with a probability distribution somehow defined by giving $X_{n-1}$ a distribution and then defining the distribution function of $X_n$ in terms of the random variable $X_{n-1}.$
There are many subtle... | Conditional expectation of random variables defined off of each other | Your first question is key, so let's focus on it. You are concerned about a bivariate random variable $(X_{n-1},X_n)$ with a probability distribution somehow defined by giving $X_{n-1}$ a distributio | Conditional expectation of random variables defined off of each other
Your first question is key, so let's focus on it. You are concerned about a bivariate random variable $(X_{n-1},X_n)$ with a probability distribution somehow defined by giving $X_{n-1}$ a distribution and then defining the distribution function of $... | Conditional expectation of random variables defined off of each other
Your first question is key, so let's focus on it. You are concerned about a bivariate random variable $(X_{n-1},X_n)$ with a probability distribution somehow defined by giving $X_{n-1}$ a distributio |
55,660 | Conditional expectation of random variables defined off of each other | Definitions
Definition 1: If $\mathcal F \subseteq \mathcal G$ are two $\sigma$-fields, and $X$ a $\mathcal G$-measurable integrable random variable, then $\mathbb E[X | \mathcal F]$ is defined as any $\mathcal F$-measurable random variable $Y$, such that $\mathbb E[Y;A]=\mathbb E[X;A]$ for every $A \in \mathcal F$. H... | Conditional expectation of random variables defined off of each other | Definitions
Definition 1: If $\mathcal F \subseteq \mathcal G$ are two $\sigma$-fields, and $X$ a $\mathcal G$-measurable integrable random variable, then $\mathbb E[X | \mathcal F]$ is defined as an | Conditional expectation of random variables defined off of each other
Definitions
Definition 1: If $\mathcal F \subseteq \mathcal G$ are two $\sigma$-fields, and $X$ a $\mathcal G$-measurable integrable random variable, then $\mathbb E[X | \mathcal F]$ is defined as any $\mathcal F$-measurable random variable $Y$, suc... | Conditional expectation of random variables defined off of each other
Definitions
Definition 1: If $\mathcal F \subseteq \mathcal G$ are two $\sigma$-fields, and $X$ a $\mathcal G$-measurable integrable random variable, then $\mathbb E[X | \mathcal F]$ is defined as an |
55,661 | Conditional expectation of random variables defined off of each other | So first: When you define a random variable $X_{n+1}$ to depend on the value of a different random variable $X_n$ you are effectively defining the conditional probability $P(X_{n+1}|X_n)$ as long as $P(X_n)$ was well defined this defines a probability distribution $P(X_{n+1}, X_n)$ over the two variables with the corre... | Conditional expectation of random variables defined off of each other | So first: When you define a random variable $X_{n+1}$ to depend on the value of a different random variable $X_n$ you are effectively defining the conditional probability $P(X_{n+1}|X_n)$ as long as $ | Conditional expectation of random variables defined off of each other
So first: When you define a random variable $X_{n+1}$ to depend on the value of a different random variable $X_n$ you are effectively defining the conditional probability $P(X_{n+1}|X_n)$ as long as $P(X_n)$ was well defined this defines a probabilit... | Conditional expectation of random variables defined off of each other
So first: When you define a random variable $X_{n+1}$ to depend on the value of a different random variable $X_n$ you are effectively defining the conditional probability $P(X_{n+1}|X_n)$ as long as $ |
55,662 | ELBO maximization with SGD | I think you confuse the purpose of the two methods.
Maximizing the ELBO leads to a parameterized class of densities that approximates closely the true distribution, in terms of Kullback-Leibler divergence. If you instead just do SGD on the target, what you will achieve is just a (local) maximum of parameters, but no ap... | ELBO maximization with SGD | I think you confuse the purpose of the two methods.
Maximizing the ELBO leads to a parameterized class of densities that approximates closely the true distribution, in terms of Kullback-Leibler diverg | ELBO maximization with SGD
I think you confuse the purpose of the two methods.
Maximizing the ELBO leads to a parameterized class of densities that approximates closely the true distribution, in terms of Kullback-Leibler divergence. If you instead just do SGD on the target, what you will achieve is just a (local) maxim... | ELBO maximization with SGD
I think you confuse the purpose of the two methods.
Maximizing the ELBO leads to a parameterized class of densities that approximates closely the true distribution, in terms of Kullback-Leibler diverg |
55,663 | Power Analysis for glmer using simr | Indeed, the best way to estimate the power in mixed models is using simulation. The following generic code shows how this can be done in R using the GLMMadaptive package. You can suitably adapt it to fit your needs:
simulate_binary <- function (n) {
K <- 8 # number of measurements per subject
t_max <- 15 # maxi... | Power Analysis for glmer using simr | Indeed, the best way to estimate the power in mixed models is using simulation. The following generic code shows how this can be done in R using the GLMMadaptive package. You can suitably adapt it to | Power Analysis for glmer using simr
Indeed, the best way to estimate the power in mixed models is using simulation. The following generic code shows how this can be done in R using the GLMMadaptive package. You can suitably adapt it to fit your needs:
simulate_binary <- function (n) {
K <- 8 # number of measurement... | Power Analysis for glmer using simr
Indeed, the best way to estimate the power in mixed models is using simulation. The following generic code shows how this can be done in R using the GLMMadaptive package. You can suitably adapt it to |
55,664 | statistical significance for non linear data | Often with data that look like this, the goal is to determine the x value beyond which there is no further (statistical) increase in the y variable. And also to determine the plateau y value. This might be done with linear-plateau or quadratic-plateau models. But eyeballing your data, a Cate-Nelson approach might be mo... | statistical significance for non linear data | Often with data that look like this, the goal is to determine the x value beyond which there is no further (statistical) increase in the y variable. And also to determine the plateau y value. This mig | statistical significance for non linear data
Often with data that look like this, the goal is to determine the x value beyond which there is no further (statistical) increase in the y variable. And also to determine the plateau y value. This might be done with linear-plateau or quadratic-plateau models. But eyeballing ... | statistical significance for non linear data
Often with data that look like this, the goal is to determine the x value beyond which there is no further (statistical) increase in the y variable. And also to determine the plateau y value. This mig |
55,665 | statistical significance for non linear data | If you do as was suggested in a comment by Michael Lew and use log(nutrient) in the plot, you see a reasonably linear trend for each temperature:
lattice::xyplot(length ~ log(nutrient) | temperature, data = mydata)
Accordingly, I tried the following model, which fits quite well:
mylm = lm(length ~ factor(temperature)... | statistical significance for non linear data | If you do as was suggested in a comment by Michael Lew and use log(nutrient) in the plot, you see a reasonably linear trend for each temperature:
lattice::xyplot(length ~ log(nutrient) | temperature, | statistical significance for non linear data
If you do as was suggested in a comment by Michael Lew and use log(nutrient) in the plot, you see a reasonably linear trend for each temperature:
lattice::xyplot(length ~ log(nutrient) | temperature, data = mydata)
Accordingly, I tried the following model, which fits quite... | statistical significance for non linear data
If you do as was suggested in a comment by Michael Lew and use log(nutrient) in the plot, you see a reasonably linear trend for each temperature:
lattice::xyplot(length ~ log(nutrient) | temperature, |
55,666 | statistical significance for non linear data | The first step usually taken for non-linear relationships like this is by adding a polynomial term. A linear relationship is y ~ x, but you can use a quadratic approximation by doing y ~ x + x ^ 2. This is like x interacting with itself: the relationship between x and y depends on the value of x. It is still a linear m... | statistical significance for non linear data | The first step usually taken for non-linear relationships like this is by adding a polynomial term. A linear relationship is y ~ x, but you can use a quadratic approximation by doing y ~ x + x ^ 2. Th | statistical significance for non linear data
The first step usually taken for non-linear relationships like this is by adding a polynomial term. A linear relationship is y ~ x, but you can use a quadratic approximation by doing y ~ x + x ^ 2. This is like x interacting with itself: the relationship between x and y depe... | statistical significance for non linear data
The first step usually taken for non-linear relationships like this is by adding a polynomial term. A linear relationship is y ~ x, but you can use a quadratic approximation by doing y ~ x + x ^ 2. Th |
55,667 | Using R^2 in nonlinear regression | It depends on what is meant by $R^2$. In simple settings, multiple definitions give equal values.
Squared correlation between the feature and outcome, $(\text{corr}(x,y))^2$, at least for simple linear regression with just one feature
Squared correlation between the true and predicted outcomes, $(\text{corr}(y,\hat y... | Using R^2 in nonlinear regression | It depends on what is meant by $R^2$. In simple settings, multiple definitions give equal values.
Squared correlation between the feature and outcome, $(\text{corr}(x,y))^2$, at least for simple line | Using R^2 in nonlinear regression
It depends on what is meant by $R^2$. In simple settings, multiple definitions give equal values.
Squared correlation between the feature and outcome, $(\text{corr}(x,y))^2$, at least for simple linear regression with just one feature
Squared correlation between the true and predicte... | Using R^2 in nonlinear regression
It depends on what is meant by $R^2$. In simple settings, multiple definitions give equal values.
Squared correlation between the feature and outcome, $(\text{corr}(x,y))^2$, at least for simple line |
55,668 | Using R^2 in nonlinear regression | Taking the other side: The $R^2$ in OLS has a number of definitions and interpretations that are endemic to OLS. For instance, a "perfect fit" has $R^2 = 1$ and, conversely, a "worthless" fit has $R^2 = 0$. In OLS the $R^2$ is interpreted as a "proportion of 'explained' variance" in the response. It also has the formul... | Using R^2 in nonlinear regression | Taking the other side: The $R^2$ in OLS has a number of definitions and interpretations that are endemic to OLS. For instance, a "perfect fit" has $R^2 = 1$ and, conversely, a "worthless" fit has $R^2 | Using R^2 in nonlinear regression
Taking the other side: The $R^2$ in OLS has a number of definitions and interpretations that are endemic to OLS. For instance, a "perfect fit" has $R^2 = 1$ and, conversely, a "worthless" fit has $R^2 = 0$. In OLS the $R^2$ is interpreted as a "proportion of 'explained' variance" in th... | Using R^2 in nonlinear regression
Taking the other side: The $R^2$ in OLS has a number of definitions and interpretations that are endemic to OLS. For instance, a "perfect fit" has $R^2 = 1$ and, conversely, a "worthless" fit has $R^2 |
55,669 | What does it mean to save optimizer states in deep learning libraries? | The optimizer state is the optimizer's momentum vector or similar history-tracking properties.
For example, the Adam optimizer tracks moving averages of the gradient and squared gradient. If you start training a model without restoring these data, the optimizer will operate differently. The updates will be different, ... | What does it mean to save optimizer states in deep learning libraries? | The optimizer state is the optimizer's momentum vector or similar history-tracking properties.
For example, the Adam optimizer tracks moving averages of the gradient and squared gradient. If you star | What does it mean to save optimizer states in deep learning libraries?
The optimizer state is the optimizer's momentum vector or similar history-tracking properties.
For example, the Adam optimizer tracks moving averages of the gradient and squared gradient. If you start training a model without restoring these data, ... | What does it mean to save optimizer states in deep learning libraries?
The optimizer state is the optimizer's momentum vector or similar history-tracking properties.
For example, the Adam optimizer tracks moving averages of the gradient and squared gradient. If you star |
55,670 | Hellinger Distance between 2 vectors of data points using cumsum in R | There are many issues here: some statistical, some numerical.
Statistical issues
The chief statistical issue is that the Hellinger distance between two samples of random distributions is not defined. We have to decide whether the purpose is (a) to estimate the Hellinger distance of the underlying distributions or (b) ... | Hellinger Distance between 2 vectors of data points using cumsum in R | There are many issues here: some statistical, some numerical.
Statistical issues
The chief statistical issue is that the Hellinger distance between two samples of random distributions is not defined. | Hellinger Distance between 2 vectors of data points using cumsum in R
There are many issues here: some statistical, some numerical.
Statistical issues
The chief statistical issue is that the Hellinger distance between two samples of random distributions is not defined. We have to decide whether the purpose is (a) to e... | Hellinger Distance between 2 vectors of data points using cumsum in R
There are many issues here: some statistical, some numerical.
Statistical issues
The chief statistical issue is that the Hellinger distance between two samples of random distributions is not defined. |
55,671 | What does "the denominator does not contain any theta dependence" mean in Bayes' Rule? [duplicate] | In the Bayesian formula:
$$\text{posterior} = \,\frac{\text{likelihood} \cdot \text{prior}}{\text{normalizing constant}}$$
If we call the observations $y$ and the parameters $\theta$, then this equates:
$$p(\theta | y) = \, \frac{p(y | \theta) \cdot p(\theta)}{p(y)}$$
Here, the normalizing constant $p(y)$ is calculated... | What does "the denominator does not contain any theta dependence" mean in Bayes' Rule? [duplicate] | In the Bayesian formula:
$$\text{posterior} = \,\frac{\text{likelihood} \cdot \text{prior}}{\text{normalizing constant}}$$
If we call the observations $y$ and the parameters $\theta$, then this equate | What does "the denominator does not contain any theta dependence" mean in Bayes' Rule? [duplicate]
In the Bayesian formula:
$$\text{posterior} = \,\frac{\text{likelihood} \cdot \text{prior}}{\text{normalizing constant}}$$
If we call the observations $y$ and the parameters $\theta$, then this equates:
$$p(\theta | y) = ... | What does "the denominator does not contain any theta dependence" mean in Bayes' Rule? [duplicate]
In the Bayesian formula:
$$\text{posterior} = \,\frac{\text{likelihood} \cdot \text{prior}}{\text{normalizing constant}}$$
If we call the observations $y$ and the parameters $\theta$, then this equate |
55,672 | Likelihood of linear mixed effects model | It's a little bit semantics. Namely, to do empirical Bayes you need to write down the posterior distribution of the random effects $b_i$ given the data $y_i$ and (the maximum likelihood) estimates of the parameters $\hat \theta$, i.e.,
$$p(b_i \mid y_i, \hat \theta) \propto p(y_i \mid b_i, \hat \theta) p(b_i \mid \hat ... | Likelihood of linear mixed effects model | It's a little bit semantics. Namely, to do empirical Bayes you need to write down the posterior distribution of the random effects $b_i$ given the data $y_i$ and (the maximum likelihood) estimates of | Likelihood of linear mixed effects model
It's a little bit semantics. Namely, to do empirical Bayes you need to write down the posterior distribution of the random effects $b_i$ given the data $y_i$ and (the maximum likelihood) estimates of the parameters $\hat \theta$, i.e.,
$$p(b_i \mid y_i, \hat \theta) \propto p(y_... | Likelihood of linear mixed effects model
It's a little bit semantics. Namely, to do empirical Bayes you need to write down the posterior distribution of the random effects $b_i$ given the data $y_i$ and (the maximum likelihood) estimates of |
55,673 | How can I show that $X_n=e^n I_{\{Y>n\}} \to 0$ in probability? | Consider the following inequality for $\varepsilon \leq 1$
$$P( |X_n| > \varepsilon ) = P(e^n I_{\{Y>n\}}>\varepsilon) \leq P( I_{\{Y>n\}} > \varepsilon) = P(Y > n) = e^{-n} \to 0.$$
Actually we do not need to know the distribution of $Y$. We can use the cumulative function properties
$$ P( Y > n) = 1 - F_Y(n) \unders... | How can I show that $X_n=e^n I_{\{Y>n\}} \to 0$ in probability? | Consider the following inequality for $\varepsilon \leq 1$
$$P( |X_n| > \varepsilon ) = P(e^n I_{\{Y>n\}}>\varepsilon) \leq P( I_{\{Y>n\}} > \varepsilon) = P(Y > n) = e^{-n} \to 0.$$
Actually we do no | How can I show that $X_n=e^n I_{\{Y>n\}} \to 0$ in probability?
Consider the following inequality for $\varepsilon \leq 1$
$$P( |X_n| > \varepsilon ) = P(e^n I_{\{Y>n\}}>\varepsilon) \leq P( I_{\{Y>n\}} > \varepsilon) = P(Y > n) = e^{-n} \to 0.$$
Actually we do not need to know the distribution of $Y$. We can use the c... | How can I show that $X_n=e^n I_{\{Y>n\}} \to 0$ in probability?
Consider the following inequality for $\varepsilon \leq 1$
$$P( |X_n| > \varepsilon ) = P(e^n I_{\{Y>n\}}>\varepsilon) \leq P( I_{\{Y>n\}} > \varepsilon) = P(Y > n) = e^{-n} \to 0.$$
Actually we do no |
55,674 | How can I show that $X_n=e^n I_{\{Y>n\}} \to 0$ in probability? | First, $\text{Prob}[Y>n]=e^{-n}$ since $Y$ has an exponential distribution. Therefore, $X_n$ can have only two values, namely $e^n$ with probability $e^{-n}$ and $0$ with probability $1-e^{-n}$. Let's fix some positive value $\epsilon$ and call $n'$ the smallest nonnegative integer bigger than $\ln \epsilon$. Then, for... | How can I show that $X_n=e^n I_{\{Y>n\}} \to 0$ in probability? | First, $\text{Prob}[Y>n]=e^{-n}$ since $Y$ has an exponential distribution. Therefore, $X_n$ can have only two values, namely $e^n$ with probability $e^{-n}$ and $0$ with probability $1-e^{-n}$. Let's | How can I show that $X_n=e^n I_{\{Y>n\}} \to 0$ in probability?
First, $\text{Prob}[Y>n]=e^{-n}$ since $Y$ has an exponential distribution. Therefore, $X_n$ can have only two values, namely $e^n$ with probability $e^{-n}$ and $0$ with probability $1-e^{-n}$. Let's fix some positive value $\epsilon$ and call $n'$ the sm... | How can I show that $X_n=e^n I_{\{Y>n\}} \to 0$ in probability?
First, $\text{Prob}[Y>n]=e^{-n}$ since $Y$ has an exponential distribution. Therefore, $X_n$ can have only two values, namely $e^n$ with probability $e^{-n}$ and $0$ with probability $1-e^{-n}$. Let's |
55,675 | How can I show that $X_n=e^n I_{\{Y>n\}} \to 0$ in probability? | $X_n$ can have two values (i.e. either $0$ or $e^n$) with $p=P(X=e^n)=e^{-n}$. For $\epsilon\geq e^{n}$, $P(X_n>\epsilon)$ is always $0$. For $\epsilon<e^n$, $P(X_n>\epsilon)=p=e^{-n}$, and this goes to $0$ as $n$ goes to infinity. | How can I show that $X_n=e^n I_{\{Y>n\}} \to 0$ in probability? | $X_n$ can have two values (i.e. either $0$ or $e^n$) with $p=P(X=e^n)=e^{-n}$. For $\epsilon\geq e^{n}$, $P(X_n>\epsilon)$ is always $0$. For $\epsilon<e^n$, $P(X_n>\epsilon)=p=e^{-n}$, and this goes | How can I show that $X_n=e^n I_{\{Y>n\}} \to 0$ in probability?
$X_n$ can have two values (i.e. either $0$ or $e^n$) with $p=P(X=e^n)=e^{-n}$. For $\epsilon\geq e^{n}$, $P(X_n>\epsilon)$ is always $0$. For $\epsilon<e^n$, $P(X_n>\epsilon)=p=e^{-n}$, and this goes to $0$ as $n$ goes to infinity. | How can I show that $X_n=e^n I_{\{Y>n\}} \to 0$ in probability?
$X_n$ can have two values (i.e. either $0$ or $e^n$) with $p=P(X=e^n)=e^{-n}$. For $\epsilon\geq e^{n}$, $P(X_n>\epsilon)$ is always $0$. For $\epsilon<e^n$, $P(X_n>\epsilon)=p=e^{-n}$, and this goes |
55,676 | Variance of $Z = X_1 + X_1 X_2 + X_1 X_2 X_3 +\cdots$ | Final update on 11/29/2019: I have worked on this a bit more, and wrote an article summarizing all the main findings. You can read it here.
Surprisingly, there is a simple and general answer to this problem, despite the fact that all the terms in the infinite sum defining $Z$, are correlated. First, let us assume that ... | Variance of $Z = X_1 + X_1 X_2 + X_1 X_2 X_3 +\cdots$ | Final update on 11/29/2019: I have worked on this a bit more, and wrote an article summarizing all the main findings. You can read it here.
Surprisingly, there is a simple and general answer to this p | Variance of $Z = X_1 + X_1 X_2 + X_1 X_2 X_3 +\cdots$
Final update on 11/29/2019: I have worked on this a bit more, and wrote an article summarizing all the main findings. You can read it here.
Surprisingly, there is a simple and general answer to this problem, despite the fact that all the terms in the infinite sum de... | Variance of $Z = X_1 + X_1 X_2 + X_1 X_2 X_3 +\cdots$
Final update on 11/29/2019: I have worked on this a bit more, and wrote an article summarizing all the main findings. You can read it here.
Surprisingly, there is a simple and general answer to this p |
55,677 | Maximum likelihood as minimizing the dissimilarity between the empirical distriution and the model distribution | This is a late response but I hope it may help:
Proof (this proof is basically a summary of the explanations from the author):
To go for the proof, first we can follow the procedure given by the author which allows us to have a more convenient expression:
$$\begin{aligned}
\theta_{ML} &=\arg \max_\theta p_{model}(\math... | Maximum likelihood as minimizing the dissimilarity between the empirical distriution and the model d | This is a late response but I hope it may help:
Proof (this proof is basically a summary of the explanations from the author):
To go for the proof, first we can follow the procedure given by the autho | Maximum likelihood as minimizing the dissimilarity between the empirical distriution and the model distribution
This is a late response but I hope it may help:
Proof (this proof is basically a summary of the explanations from the author):
To go for the proof, first we can follow the procedure given by the author which ... | Maximum likelihood as minimizing the dissimilarity between the empirical distriution and the model d
This is a late response but I hope it may help:
Proof (this proof is basically a summary of the explanations from the author):
To go for the proof, first we can follow the procedure given by the autho |
55,678 | Given a pmf, how is it possible to calculate the cdf? | Given that you're talking about a discrete random variable over the integers, you should certainly know how the pmf behaves between those values - the probability of it taking any value in any interval strictly between (say) $1$ and $2$ is $0$.
Consequently, you do also know how the cdf $F(x)$ behaves, since it's just ... | Given a pmf, how is it possible to calculate the cdf? | Given that you're talking about a discrete random variable over the integers, you should certainly know how the pmf behaves between those values - the probability of it taking any value in any interva | Given a pmf, how is it possible to calculate the cdf?
Given that you're talking about a discrete random variable over the integers, you should certainly know how the pmf behaves between those values - the probability of it taking any value in any interval strictly between (say) $1$ and $2$ is $0$.
Consequently, you do ... | Given a pmf, how is it possible to calculate the cdf?
Given that you're talking about a discrete random variable over the integers, you should certainly know how the pmf behaves between those values - the probability of it taking any value in any interva |
55,679 | Given a pmf, how is it possible to calculate the cdf? | You can compute the CDF using delta-functions. Express the PMF as follows,
$$ p(x) = (0.4) \delta(x-1) + (0.3) \delta(x-2) + (0.2) \delta(x-3) + (0.1) \delta(x-4) $$
The CDF is then given by integration, by definition, if $P(x)$ is the CDF then,
$$ P(x) = \int_{-\infty}^x p(y) ~ dy $$
Observe that if $x<1$ then each... | Given a pmf, how is it possible to calculate the cdf? | You can compute the CDF using delta-functions. Express the PMF as follows,
$$ p(x) = (0.4) \delta(x-1) + (0.3) \delta(x-2) + (0.2) \delta(x-3) + (0.1) \delta(x-4) $$
The CDF is then given by integrat | Given a pmf, how is it possible to calculate the cdf?
You can compute the CDF using delta-functions. Express the PMF as follows,
$$ p(x) = (0.4) \delta(x-1) + (0.3) \delta(x-2) + (0.2) \delta(x-3) + (0.1) \delta(x-4) $$
The CDF is then given by integration, by definition, if $P(x)$ is the CDF then,
$$ P(x) = \int_{-\... | Given a pmf, how is it possible to calculate the cdf?
You can compute the CDF using delta-functions. Express the PMF as follows,
$$ p(x) = (0.4) \delta(x-1) + (0.3) \delta(x-2) + (0.2) \delta(x-3) + (0.1) \delta(x-4) $$
The CDF is then given by integrat |
55,680 | Matching vs simple regression for causal inference? | Your question rightly acknowledges that throwing away cases can lose useful information and power. It doesn't, however, acknowledge the danger in using regression as the alternative: what if your regression model is incorrect?
Are you sure that the log-odds of outcome are linearly related to treatment and to the covari... | Matching vs simple regression for causal inference? | Your question rightly acknowledges that throwing away cases can lose useful information and power. It doesn't, however, acknowledge the danger in using regression as the alternative: what if your regr | Matching vs simple regression for causal inference?
Your question rightly acknowledges that throwing away cases can lose useful information and power. It doesn't, however, acknowledge the danger in using regression as the alternative: what if your regression model is incorrect?
Are you sure that the log-odds of outcome... | Matching vs simple regression for causal inference?
Your question rightly acknowledges that throwing away cases can lose useful information and power. It doesn't, however, acknowledge the danger in using regression as the alternative: what if your regr |
55,681 | Is appropriate to use empirical Bayes (EB) in this way? | Whether or not your approach is legitimate depends in large part about how you describe your approach when publishing or presenting your results. If you are completely open about your approach and your process then the reader is able to judge your approach for themselves. I state this because statistics so often involv... | Is appropriate to use empirical Bayes (EB) in this way? | Whether or not your approach is legitimate depends in large part about how you describe your approach when publishing or presenting your results. If you are completely open about your approach and you | Is appropriate to use empirical Bayes (EB) in this way?
Whether or not your approach is legitimate depends in large part about how you describe your approach when publishing or presenting your results. If you are completely open about your approach and your process then the reader is able to judge your approach for the... | Is appropriate to use empirical Bayes (EB) in this way?
Whether or not your approach is legitimate depends in large part about how you describe your approach when publishing or presenting your results. If you are completely open about your approach and you |
55,682 | Is appropriate to use empirical Bayes (EB) in this way? | Let me slightly diverge from your exact question. You are describing your intended model, where the probability of giving the answer $y=1$ is modeled as
$$
p(y_i=1) = \lambda\,0.5 + (1 - \lambda) \, p^*_i
$$
Notice that the proposed model can be described in different form
$$
\lambda\;0.5 + (1 - \lambda) \, p^*_i = \al... | Is appropriate to use empirical Bayes (EB) in this way? | Let me slightly diverge from your exact question. You are describing your intended model, where the probability of giving the answer $y=1$ is modeled as
$$
p(y_i=1) = \lambda\,0.5 + (1 - \lambda) \, p | Is appropriate to use empirical Bayes (EB) in this way?
Let me slightly diverge from your exact question. You are describing your intended model, where the probability of giving the answer $y=1$ is modeled as
$$
p(y_i=1) = \lambda\,0.5 + (1 - \lambda) \, p^*_i
$$
Notice that the proposed model can be described in diffe... | Is appropriate to use empirical Bayes (EB) in this way?
Let me slightly diverge from your exact question. You are describing your intended model, where the probability of giving the answer $y=1$ is modeled as
$$
p(y_i=1) = \lambda\,0.5 + (1 - \lambda) \, p |
55,683 | Showing t-distribution from multivariate standard normals | Continuing from my comment above:
Let $$T=\frac{(\sqrt{n-1})W}{\sqrt{1 - W^2}}$$
Now, $$1-W^2 = 1-\frac{X'aa'X}{X'X}$$
$$\implies (1-W^2)X'X=X'X-X'AX=X'(I-A)X\,,\qquad A\equiv aa'$$
Therefore,
\begin{align}
T&=\frac{(\sqrt{n-1})a'X}{\sqrt{X'X}}\frac{\sqrt{X'X}}{\sqrt{X'(I-A)X}}
\\&=\frac{(\sqrt{n-1})a'X}{\sqrt{X'(I-A)... | Showing t-distribution from multivariate standard normals | Continuing from my comment above:
Let $$T=\frac{(\sqrt{n-1})W}{\sqrt{1 - W^2}}$$
Now, $$1-W^2 = 1-\frac{X'aa'X}{X'X}$$
$$\implies (1-W^2)X'X=X'X-X'AX=X'(I-A)X\,,\qquad A\equiv aa'$$
Therefore,
\begin | Showing t-distribution from multivariate standard normals
Continuing from my comment above:
Let $$T=\frac{(\sqrt{n-1})W}{\sqrt{1 - W^2}}$$
Now, $$1-W^2 = 1-\frac{X'aa'X}{X'X}$$
$$\implies (1-W^2)X'X=X'X-X'AX=X'(I-A)X\,,\qquad A\equiv aa'$$
Therefore,
\begin{align}
T&=\frac{(\sqrt{n-1})a'X}{\sqrt{X'X}}\frac{\sqrt{X'X}}... | Showing t-distribution from multivariate standard normals
Continuing from my comment above:
Let $$T=\frac{(\sqrt{n-1})W}{\sqrt{1 - W^2}}$$
Now, $$1-W^2 = 1-\frac{X'aa'X}{X'X}$$
$$\implies (1-W^2)X'X=X'X-X'AX=X'(I-A)X\,,\qquad A\equiv aa'$$
Therefore,
\begin |
55,684 | Probability of One Random Variable Less than Another -- Why is this approach Wrong? | Your expression is correct: Since $X_1 \ \bot \ X_2$ we can use a Riemann-Stieltjes integral to write the probability of interest as:
$$\begin{equation} \begin{aligned}
\mathbb{P}(X_1 \geqslant X_2)
&= \mathbb{P}(X_2 \leqslant X_1) \\[6pt]
&= \int \mathbb{P}(X_2 \leqslant X_1 | X_1 = t) \ d F_{X_1}(t) \\[6pt]
&= \int ... | Probability of One Random Variable Less than Another -- Why is this approach Wrong? | Your expression is correct: Since $X_1 \ \bot \ X_2$ we can use a Riemann-Stieltjes integral to write the probability of interest as:
$$\begin{equation} \begin{aligned}
\mathbb{P}(X_1 \geqslant X_2)
| Probability of One Random Variable Less than Another -- Why is this approach Wrong?
Your expression is correct: Since $X_1 \ \bot \ X_2$ we can use a Riemann-Stieltjes integral to write the probability of interest as:
$$\begin{equation} \begin{aligned}
\mathbb{P}(X_1 \geqslant X_2)
&= \mathbb{P}(X_2 \leqslant X_1) \\[... | Probability of One Random Variable Less than Another -- Why is this approach Wrong?
Your expression is correct: Since $X_1 \ \bot \ X_2$ we can use a Riemann-Stieltjes integral to write the probability of interest as:
$$\begin{equation} \begin{aligned}
\mathbb{P}(X_1 \geqslant X_2)
|
55,685 | Probability of One Random Variable Less than Another -- Why is this approach Wrong? | It seems correct to me, because what you write is actually $\int F_{X_2}(t)f_{X_1}(t)dt$ and can be interpreted as swiping $t$ values such that when $X_1$ is equal to $t$, we consider all $X_2$ smaller than $t$; applying the total probability law gives us $P(X_2\leq X_1)\approx\sum_t P(X_2\leq t)P(X_1=t)$, which makes ... | Probability of One Random Variable Less than Another -- Why is this approach Wrong? | It seems correct to me, because what you write is actually $\int F_{X_2}(t)f_{X_1}(t)dt$ and can be interpreted as swiping $t$ values such that when $X_1$ is equal to $t$, we consider all $X_2$ smalle | Probability of One Random Variable Less than Another -- Why is this approach Wrong?
It seems correct to me, because what you write is actually $\int F_{X_2}(t)f_{X_1}(t)dt$ and can be interpreted as swiping $t$ values such that when $X_1$ is equal to $t$, we consider all $X_2$ smaller than $t$; applying the total proba... | Probability of One Random Variable Less than Another -- Why is this approach Wrong?
It seems correct to me, because what you write is actually $\int F_{X_2}(t)f_{X_1}(t)dt$ and can be interpreted as swiping $t$ values such that when $X_1$ is equal to $t$, we consider all $X_2$ smalle |
55,686 | Dividing the MAE by the average of the values | Shameless piece of self-promotion: Kolassa & Schütz (2007, Foresight) call this quantity the "MAD/Mean" or "weighted MAPE" (because it is) and discuss it.
As to drawbacks, the wMAPE, as a scaled MAD, will reward biased forecasts if your future distribution is asymmetrical, just like the "plain" MAD (Kolassa, 2020, IJF)... | Dividing the MAE by the average of the values | Shameless piece of self-promotion: Kolassa & Schütz (2007, Foresight) call this quantity the "MAD/Mean" or "weighted MAPE" (because it is) and discuss it.
As to drawbacks, the wMAPE, as a scaled MAD, | Dividing the MAE by the average of the values
Shameless piece of self-promotion: Kolassa & Schütz (2007, Foresight) call this quantity the "MAD/Mean" or "weighted MAPE" (because it is) and discuss it.
As to drawbacks, the wMAPE, as a scaled MAD, will reward biased forecasts if your future distribution is asymmetrical, ... | Dividing the MAE by the average of the values
Shameless piece of self-promotion: Kolassa & Schütz (2007, Foresight) call this quantity the "MAD/Mean" or "weighted MAPE" (because it is) and discuss it.
As to drawbacks, the wMAPE, as a scaled MAD, |
55,687 | ROC-style curves for calculating sample size, power, alpha, and effect size | A classic way to proceed is to determine the difference that you wish to be able to detect at a given combination of Type I error and Type II error, and then design a study with a large enough sample size to meet your requirements, given the variability you expect in your measurements.
All of the "playing" you are doin... | ROC-style curves for calculating sample size, power, alpha, and effect size | A classic way to proceed is to determine the difference that you wish to be able to detect at a given combination of Type I error and Type II error, and then design a study with a large enough sample | ROC-style curves for calculating sample size, power, alpha, and effect size
A classic way to proceed is to determine the difference that you wish to be able to detect at a given combination of Type I error and Type II error, and then design a study with a large enough sample size to meet your requirements, given the va... | ROC-style curves for calculating sample size, power, alpha, and effect size
A classic way to proceed is to determine the difference that you wish to be able to detect at a given combination of Type I error and Type II error, and then design a study with a large enough sample |
55,688 | Do ordinal variables require one hot encoding? | The proper treatment of ordinal independent data in regression is tricky.
The two most common approaches are:
Treat it as continuous (but this ignores the fact that the differences in levels may not be similar).
Treat it as categorical (but this ignores the ordered nature of the variable).
The first method would not ... | Do ordinal variables require one hot encoding? | The proper treatment of ordinal independent data in regression is tricky.
The two most common approaches are:
Treat it as continuous (but this ignores the fact that the differences in levels may not | Do ordinal variables require one hot encoding?
The proper treatment of ordinal independent data in regression is tricky.
The two most common approaches are:
Treat it as continuous (but this ignores the fact that the differences in levels may not be similar).
Treat it as categorical (but this ignores the ordered nature... | Do ordinal variables require one hot encoding?
The proper treatment of ordinal independent data in regression is tricky.
The two most common approaches are:
Treat it as continuous (but this ignores the fact that the differences in levels may not |
55,689 | Calculate the intercept from lm | All the coefficient estimators in the model (included the intercept estimator) are computed using the standard ordinary least squares (OLS) estimator used in linear regression. Before replicating the calculation manually, we can produce the coefficients from the lm function.
#Input the data and model
DATA <- data.fra... | Calculate the intercept from lm | All the coefficient estimators in the model (included the intercept estimator) are computed using the standard ordinary least squares (OLS) estimator used in linear regression. Before replicating the | Calculate the intercept from lm
All the coefficient estimators in the model (included the intercept estimator) are computed using the standard ordinary least squares (OLS) estimator used in linear regression. Before replicating the calculation manually, we can produce the coefficients from the lm function.
#Input the ... | Calculate the intercept from lm
All the coefficient estimators in the model (included the intercept estimator) are computed using the standard ordinary least squares (OLS) estimator used in linear regression. Before replicating the |
55,690 | Calculate the intercept from lm | The intercept is the baseline value excluding explanatory variables. Because your explanatory variables are all categorical, in practice your regression will simply calculate means per group. In fact, your data supposes 3 times 3 = 27 unique groups. R will generally choose one group as the baseline and then give the ad... | Calculate the intercept from lm | The intercept is the baseline value excluding explanatory variables. Because your explanatory variables are all categorical, in practice your regression will simply calculate means per group. In fact, | Calculate the intercept from lm
The intercept is the baseline value excluding explanatory variables. Because your explanatory variables are all categorical, in practice your regression will simply calculate means per group. In fact, your data supposes 3 times 3 = 27 unique groups. R will generally choose one group as t... | Calculate the intercept from lm
The intercept is the baseline value excluding explanatory variables. Because your explanatory variables are all categorical, in practice your regression will simply calculate means per group. In fact, |
55,691 | Is there a Continuous Conditional Variational Autoencoder? | Yes. CVAEs, as introduced in Sohn, et al (2015), make no assumptions on the conditioning variable.
Letting $\mathbf{x}$ denote the conditioning/input variable, $\mathbf{y}$ the output variable, and $\mathbf{z}$ the latent variable, a CVAE consists of three components:
the prior $p_\theta(\mathbf{z} \mid \mathbf{x})$, ... | Is there a Continuous Conditional Variational Autoencoder? | Yes. CVAEs, as introduced in Sohn, et al (2015), make no assumptions on the conditioning variable.
Letting $\mathbf{x}$ denote the conditioning/input variable, $\mathbf{y}$ the output variable, and $\ | Is there a Continuous Conditional Variational Autoencoder?
Yes. CVAEs, as introduced in Sohn, et al (2015), make no assumptions on the conditioning variable.
Letting $\mathbf{x}$ denote the conditioning/input variable, $\mathbf{y}$ the output variable, and $\mathbf{z}$ the latent variable, a CVAE consists of three comp... | Is there a Continuous Conditional Variational Autoencoder?
Yes. CVAEs, as introduced in Sohn, et al (2015), make no assumptions on the conditioning variable.
Letting $\mathbf{x}$ denote the conditioning/input variable, $\mathbf{y}$ the output variable, and $\ |
55,692 | Check if data (N datapoints) originate from known distribution | Maybe Kolmogorov-Smirnov test with correction for small samples provided by Jan Vrbik in: Vrbik, Jan (2018). "Small-Sample Corrections to Kolmogorov–Smirnov Test Statistic". Pioneer Journal of Theoretical and Applied Statistics. 15 (1–2): 15–23.
Correction itself is also described on Wikipedia site for Kolmogorov-Smirn... | Check if data (N datapoints) originate from known distribution | Maybe Kolmogorov-Smirnov test with correction for small samples provided by Jan Vrbik in: Vrbik, Jan (2018). "Small-Sample Corrections to Kolmogorov–Smirnov Test Statistic". Pioneer Journal of Theoret | Check if data (N datapoints) originate from known distribution
Maybe Kolmogorov-Smirnov test with correction for small samples provided by Jan Vrbik in: Vrbik, Jan (2018). "Small-Sample Corrections to Kolmogorov–Smirnov Test Statistic". Pioneer Journal of Theoretical and Applied Statistics. 15 (1–2): 15–23.
Correction ... | Check if data (N datapoints) originate from known distribution
Maybe Kolmogorov-Smirnov test with correction for small samples provided by Jan Vrbik in: Vrbik, Jan (2018). "Small-Sample Corrections to Kolmogorov–Smirnov Test Statistic". Pioneer Journal of Theoret |
55,693 | Check if data (N datapoints) originate from known distribution | Use R to generate 10 observations from a standard uniform
distribution:
set seed(722) # for reproducibility
x = runif(10)
summary(x); sd(x)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.1270 0.4940 0.7454 0.6627 0.9070 0.9477
[1] 0.293335 # SD
Use the Kolmogorov-Smirnov test to see if the sample is cons... | Check if data (N datapoints) originate from known distribution | Use R to generate 10 observations from a standard uniform
distribution:
set seed(722) # for reproducibility
x = runif(10)
summary(x); sd(x)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.1270 0 | Check if data (N datapoints) originate from known distribution
Use R to generate 10 observations from a standard uniform
distribution:
set seed(722) # for reproducibility
x = runif(10)
summary(x); sd(x)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.1270 0.4940 0.7454 0.6627 0.9070 0.9477
[1] 0.293335 # S... | Check if data (N datapoints) originate from known distribution
Use R to generate 10 observations from a standard uniform
distribution:
set seed(722) # for reproducibility
x = runif(10)
summary(x); sd(x)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.1270 0 |
55,694 | How to interpret bayesian posterior distributions | What can we say about the two versions?
You are directly modelling the probability distributions for the two conversion rates. You can use the posterior to answer questions about the two conversion rates. Such questions might be...
What is the probability the new version has a larger conversion rate?
What is the p... | How to interpret bayesian posterior distributions | What can we say about the two versions?
You are directly modelling the probability distributions for the two conversion rates. You can use the posterior to answer questions about the two conversion | How to interpret bayesian posterior distributions
What can we say about the two versions?
You are directly modelling the probability distributions for the two conversion rates. You can use the posterior to answer questions about the two conversion rates. Such questions might be...
What is the probability the new ver... | How to interpret bayesian posterior distributions
What can we say about the two versions?
You are directly modelling the probability distributions for the two conversion rates. You can use the posterior to answer questions about the two conversion |
55,695 | Are there examples of covariance functions used in Gaussian processes with negative non-diagonal elements? | Actually your linked source gives already an example where the kernel matrix can have negative entries, the linear kernel: $$ k(x,y) = a + (x - c)(y - c).$$
Other examples are given by dot product kernels such as $$ k(x,y)= <x,y>^n.$$
Your impression was probably formed because many kernels used in practice are radial... | Are there examples of covariance functions used in Gaussian processes with negative non-diagonal ele | Actually your linked source gives already an example where the kernel matrix can have negative entries, the linear kernel: $$ k(x,y) = a + (x - c)(y - c).$$
Other examples are given by dot product ker | Are there examples of covariance functions used in Gaussian processes with negative non-diagonal elements?
Actually your linked source gives already an example where the kernel matrix can have negative entries, the linear kernel: $$ k(x,y) = a + (x - c)(y - c).$$
Other examples are given by dot product kernels such as ... | Are there examples of covariance functions used in Gaussian processes with negative non-diagonal ele
Actually your linked source gives already an example where the kernel matrix can have negative entries, the linear kernel: $$ k(x,y) = a + (x - c)(y - c).$$
Other examples are given by dot product ker |
55,696 | Why is a Gelman-Rubin diagnostic of < 1.1 considered acceptable? | Are you wondering how GR works, or why 1.1 seems to be the accepted cut-off. If the latter, you're not alone: arXiv paper questioning 1.1 cutoff argues that 1.1 is too high. They also propose a revised version of GR that is improved and can even evaluate a single chain.
The Stan folks are also working on a revised vers... | Why is a Gelman-Rubin diagnostic of < 1.1 considered acceptable? | Are you wondering how GR works, or why 1.1 seems to be the accepted cut-off. If the latter, you're not alone: arXiv paper questioning 1.1 cutoff argues that 1.1 is too high. They also propose a revise | Why is a Gelman-Rubin diagnostic of < 1.1 considered acceptable?
Are you wondering how GR works, or why 1.1 seems to be the accepted cut-off. If the latter, you're not alone: arXiv paper questioning 1.1 cutoff argues that 1.1 is too high. They also propose a revised version of GR that is improved and can even evaluate ... | Why is a Gelman-Rubin diagnostic of < 1.1 considered acceptable?
Are you wondering how GR works, or why 1.1 seems to be the accepted cut-off. If the latter, you're not alone: arXiv paper questioning 1.1 cutoff argues that 1.1 is too high. They also propose a revise |
55,697 | Why is $\frac{\sum^n_{i=1}(X_i-\bar{X})^2}{\sigma^2}$chi-square distributed with $n-1$ degrees of freedom? [duplicate] | Consider samples of size $n= 5$ from a standard normal distribution. then $Q =(n-1)S^2 \sim \mathsf{Chisq}(\nu=4),$ not $\mathsf{Chisq}(\nu=5).$
set.seed(706); m = 10^6; n = 5
q = replicate( m, (n-1)*var(rnorm(n)) )
mean(q)
[1] 4.002257 # aprx E(Q) = 4
hdr = "Simulated Dist'n of Q fits CHISQ(4)[blue], not CHISQ(5) [... | Why is $\frac{\sum^n_{i=1}(X_i-\bar{X})^2}{\sigma^2}$chi-square distributed with $n-1$ degrees of fr | Consider samples of size $n= 5$ from a standard normal distribution. then $Q =(n-1)S^2 \sim \mathsf{Chisq}(\nu=4),$ not $\mathsf{Chisq}(\nu=5).$
set.seed(706); m = 10^6; n = 5
q = replicate( m, (n-1 | Why is $\frac{\sum^n_{i=1}(X_i-\bar{X})^2}{\sigma^2}$chi-square distributed with $n-1$ degrees of freedom? [duplicate]
Consider samples of size $n= 5$ from a standard normal distribution. then $Q =(n-1)S^2 \sim \mathsf{Chisq}(\nu=4),$ not $\mathsf{Chisq}(\nu=5).$
set.seed(706); m = 10^6; n = 5
q = replicate( m, (n-1)... | Why is $\frac{\sum^n_{i=1}(X_i-\bar{X})^2}{\sigma^2}$chi-square distributed with $n-1$ degrees of fr
Consider samples of size $n= 5$ from a standard normal distribution. then $Q =(n-1)S^2 \sim \mathsf{Chisq}(\nu=4),$ not $\mathsf{Chisq}(\nu=5).$
set.seed(706); m = 10^6; n = 5
q = replicate( m, (n-1 |
55,698 | Clear explanation of dummy variable trap [duplicate] | Let's say you have a binary variable, like sex. You create two dummy variables to reflect that in your model. Let's say you have six individuals $(M,F,F,M,M,F)$. Your dummy variables look like:
$X_1=(0,1,1,0,0,1)$
$X_2=(1,0,0,1,1,0)$
But now $X_{i1}+X_{i2} = 1$ for every possible $i$ so you have a case of perfect mul... | Clear explanation of dummy variable trap [duplicate] | Let's say you have a binary variable, like sex. You create two dummy variables to reflect that in your model. Let's say you have six individuals $(M,F,F,M,M,F)$. Your dummy variables look like:
$X_1= | Clear explanation of dummy variable trap [duplicate]
Let's say you have a binary variable, like sex. You create two dummy variables to reflect that in your model. Let's say you have six individuals $(M,F,F,M,M,F)$. Your dummy variables look like:
$X_1=(0,1,1,0,0,1)$
$X_2=(1,0,0,1,1,0)$
But now $X_{i1}+X_{i2} = 1$ for... | Clear explanation of dummy variable trap [duplicate]
Let's say you have a binary variable, like sex. You create two dummy variables to reflect that in your model. Let's say you have six individuals $(M,F,F,M,M,F)$. Your dummy variables look like:
$X_1= |
55,699 | When to prefer PCA over regularization methods in regression? | PCA considers only the variance of the features ($X$) but not the relationship between features and labels while doing this compression. Regularization, on the other hand, acts directly on the relationship between features and labels and hence develops models which are better at explaining the labels given the features... | When to prefer PCA over regularization methods in regression? | PCA considers only the variance of the features ($X$) but not the relationship between features and labels while doing this compression. Regularization, on the other hand, acts directly on the relatio | When to prefer PCA over regularization methods in regression?
PCA considers only the variance of the features ($X$) but not the relationship between features and labels while doing this compression. Regularization, on the other hand, acts directly on the relationship between features and labels and hence develops model... | When to prefer PCA over regularization methods in regression?
PCA considers only the variance of the features ($X$) but not the relationship between features and labels while doing this compression. Regularization, on the other hand, acts directly on the relatio |
55,700 | Random effects in repeated-measures design using lme | It appears that you have a case of a partially crossed, partially nested design, because if I understand correctly, day and cond are crossed (ie neither are nested in the other), while both appear to be nested within subject. measurement is an id variable that indexes the measurement occasion on each day and within eac... | Random effects in repeated-measures design using lme | It appears that you have a case of a partially crossed, partially nested design, because if I understand correctly, day and cond are crossed (ie neither are nested in the other), while both appear to | Random effects in repeated-measures design using lme
It appears that you have a case of a partially crossed, partially nested design, because if I understand correctly, day and cond are crossed (ie neither are nested in the other), while both appear to be nested within subject. measurement is an id variable that indexe... | Random effects in repeated-measures design using lme
It appears that you have a case of a partially crossed, partially nested design, because if I understand correctly, day and cond are crossed (ie neither are nested in the other), while both appear to |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.