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
43,901
Is Convolutional Neural Network (CNN) faster than Recurrent Neural Network (RNN)?
I have done some projects on text classification and relation extraction using CNN and RNN (specifically, LSTM and GRU): CNNs tend to be much faster (~5 times faster) than RNN. It's hard to draw fair comparisons: CNN and RNN have different hyperparameters (filter dimension, number of filters, hidden state dimension, etc.) there exist many sort of RNNs the running time depends on the implementation, especially RNNs. CNNs run faster with CuDNN + CNMeM. RNNs benefit less from them. etc. Nvidia has historically focused much more on CNN than RNN, as computer vision mostly employs CNN. One benchmark: https://github.com/baidu-research/DeepBench FYI: Benchmarks based on neural networks libraries to compare the performance between different GPUs Why doesn't training RNNs use 100% of the GPU?
Is Convolutional Neural Network (CNN) faster than Recurrent Neural Network (RNN)?
I have done some projects on text classification and relation extraction using CNN and RNN (specifically, LSTM and GRU): CNNs tend to be much faster (~5 times faster) than RNN. It's hard to draw fair
Is Convolutional Neural Network (CNN) faster than Recurrent Neural Network (RNN)? I have done some projects on text classification and relation extraction using CNN and RNN (specifically, LSTM and GRU): CNNs tend to be much faster (~5 times faster) than RNN. It's hard to draw fair comparisons: CNN and RNN have different hyperparameters (filter dimension, number of filters, hidden state dimension, etc.) there exist many sort of RNNs the running time depends on the implementation, especially RNNs. CNNs run faster with CuDNN + CNMeM. RNNs benefit less from them. etc. Nvidia has historically focused much more on CNN than RNN, as computer vision mostly employs CNN. One benchmark: https://github.com/baidu-research/DeepBench FYI: Benchmarks based on neural networks libraries to compare the performance between different GPUs Why doesn't training RNNs use 100% of the GPU?
Is Convolutional Neural Network (CNN) faster than Recurrent Neural Network (RNN)? I have done some projects on text classification and relation extraction using CNN and RNN (specifically, LSTM and GRU): CNNs tend to be much faster (~5 times faster) than RNN. It's hard to draw fair
43,902
Is Convolutional Neural Network (CNN) faster than Recurrent Neural Network (RNN)?
As already said by Franck Dernoncourt, the answer depends on your model. CNN and RNN are different architectures, used differently, usually for different purposes. You can't really replace one by another without changing other elements of the model to compare the performance. However, CNN's are faster by design, since the computations in CNN's can happen in parallel (same filter applied to multiple locations of the image at the same time), while RNN's need to be processed sequentially, since the subsequent steps depend on previous ones. This was the reason why Bradbury et al (2016) introduced the Quasi-Recurrent Neural Networks that use some of the CNN components to imitate RNN's while speeding them up.
Is Convolutional Neural Network (CNN) faster than Recurrent Neural Network (RNN)?
As already said by Franck Dernoncourt, the answer depends on your model. CNN and RNN are different architectures, used differently, usually for different purposes. You can't really replace one by anot
Is Convolutional Neural Network (CNN) faster than Recurrent Neural Network (RNN)? As already said by Franck Dernoncourt, the answer depends on your model. CNN and RNN are different architectures, used differently, usually for different purposes. You can't really replace one by another without changing other elements of the model to compare the performance. However, CNN's are faster by design, since the computations in CNN's can happen in parallel (same filter applied to multiple locations of the image at the same time), while RNN's need to be processed sequentially, since the subsequent steps depend on previous ones. This was the reason why Bradbury et al (2016) introduced the Quasi-Recurrent Neural Networks that use some of the CNN components to imitate RNN's while speeding them up.
Is Convolutional Neural Network (CNN) faster than Recurrent Neural Network (RNN)? As already said by Franck Dernoncourt, the answer depends on your model. CNN and RNN are different architectures, used differently, usually for different purposes. You can't really replace one by anot
43,903
Disagreement between the p-value and the confidence interval in a binomial test
The problem with tests of binomial proportion is that the tests used are generally approximate (since the exact "Clopper-Pearson" test is ridiculously conservative). Therefore, it's not clear that the procedure used to get the CI is the same as that used to test the hypothesis. Theoretically, either approach should lead to the same conclusion if you are using just one CI and one test. You have a border case. Either statistic is telling you that your observation is not all that common under the null hypothesis. Remember: there is nothing special about 5% significance...its a cultural artifact from Ronald Fisher in the 1930's. Its a guideline. For what it's worth, I'd conclude that its unlikely that the true success probability is as high as 0.75. Per @John In a strict hypothesis testing situation, you're stuck with your 0.05, so you would reject the null hypothesis under that criteria. However, I wouldn't run to the press quite yet ;-)...hypothesis tests can really destroy any nuance in inference.
Disagreement between the p-value and the confidence interval in a binomial test
The problem with tests of binomial proportion is that the tests used are generally approximate (since the exact "Clopper-Pearson" test is ridiculously conservative). Therefore, it's not clear that the
Disagreement between the p-value and the confidence interval in a binomial test The problem with tests of binomial proportion is that the tests used are generally approximate (since the exact "Clopper-Pearson" test is ridiculously conservative). Therefore, it's not clear that the procedure used to get the CI is the same as that used to test the hypothesis. Theoretically, either approach should lead to the same conclusion if you are using just one CI and one test. You have a border case. Either statistic is telling you that your observation is not all that common under the null hypothesis. Remember: there is nothing special about 5% significance...its a cultural artifact from Ronald Fisher in the 1930's. Its a guideline. For what it's worth, I'd conclude that its unlikely that the true success probability is as high as 0.75. Per @John In a strict hypothesis testing situation, you're stuck with your 0.05, so you would reject the null hypothesis under that criteria. However, I wouldn't run to the press quite yet ;-)...hypothesis tests can really destroy any nuance in inference.
Disagreement between the p-value and the confidence interval in a binomial test The problem with tests of binomial proportion is that the tests used are generally approximate (since the exact "Clopper-Pearson" test is ridiculously conservative). Therefore, it's not clear that the
43,904
Disagreement between the p-value and the confidence interval in a binomial test
While the test and confidence interval provided by binom.test() are both exact, the confidence interval is unfortunately not based on inverting the test, so they may lead to inconsistent results. See the paper Fay, M.P. (2010). Two-sided Exact Tests and Matching Confidence Intervals for Discrete Data. R Journal, volume 2, no. 1, pages 53–58. for more information. Luckily, there is an R package by the author of the above paper that does provide (three different pairs of) consistent tests and confidence intervals. Applied to your data, the results are [output lightly edited to only show the relevant information]: > library(exactci) > binom.exact(31, 50, p=0.75, tsmethod="central") Exact two-sided binomial test (central method) p-value = 0.05747 95 percent confidence interval: 0.4717492 0.7534989 > binom.exact(31, 50, p=0.75, tsmethod="minlike") Exact two-sided binomial test (sum of minimum likelihood method) p-value = 0.04812 95 percent confidence interval: 0.4799 0.7463 > binom.exact(31, 50, p=0.75, tsmethod="blaker") Exact two-sided binomial test (Blaker's method) p-value = 0.04812 95 percent confidence interval: 0.4797 0.7463 Consult the above paper for information on the pros and cons of the three different sets of tests and confidence intervals.
Disagreement between the p-value and the confidence interval in a binomial test
While the test and confidence interval provided by binom.test() are both exact, the confidence interval is unfortunately not based on inverting the test, so they may lead to inconsistent results. See
Disagreement between the p-value and the confidence interval in a binomial test While the test and confidence interval provided by binom.test() are both exact, the confidence interval is unfortunately not based on inverting the test, so they may lead to inconsistent results. See the paper Fay, M.P. (2010). Two-sided Exact Tests and Matching Confidence Intervals for Discrete Data. R Journal, volume 2, no. 1, pages 53–58. for more information. Luckily, there is an R package by the author of the above paper that does provide (three different pairs of) consistent tests and confidence intervals. Applied to your data, the results are [output lightly edited to only show the relevant information]: > library(exactci) > binom.exact(31, 50, p=0.75, tsmethod="central") Exact two-sided binomial test (central method) p-value = 0.05747 95 percent confidence interval: 0.4717492 0.7534989 > binom.exact(31, 50, p=0.75, tsmethod="minlike") Exact two-sided binomial test (sum of minimum likelihood method) p-value = 0.04812 95 percent confidence interval: 0.4799 0.7463 > binom.exact(31, 50, p=0.75, tsmethod="blaker") Exact two-sided binomial test (Blaker's method) p-value = 0.04812 95 percent confidence interval: 0.4797 0.7463 Consult the above paper for information on the pros and cons of the three different sets of tests and confidence intervals.
Disagreement between the p-value and the confidence interval in a binomial test While the test and confidence interval provided by binom.test() are both exact, the confidence interval is unfortunately not based on inverting the test, so they may lead to inconsistent results. See
43,905
Disagreement between the p-value and the confidence interval in a binomial test
This is obviously a border case and the CI and test results are not derived in exactly the same manner (the CI is not an inversion of the test). You might want to look up binomial CIs and note that there are many ways they can be calculated all with pluses and minuses. But none of that gets at your central question of whether you should reject the 0.75 hypothesis here. Furthermore, you're treating your p value and CI's both as tests and, because you did that, you can't reject 0.75 because now you have two tests and you should have done alpha correction on them. The CI should be treated as something else but you've clearly conveyed in your question that you're thinking of it as a test. Given that you can now select whichever test you like alpha is not 0.05. Step back from testing for a moment. You need to think about your numbers. For some reason you've selected exactly 0.75 as the amount to reject. What if you had an enormous N and got 0.74 and could reject it on both the CI and test? Would you reach the same conclusion you would reach with the 0.62 you have right now? Is there some range close to 0.75 that's just about equivalent to 0.75 in your work or is exactly 0.75 very critical? If there is a range how much of it is captured by your CI? How believable is your test rejection then? And what about the range of the CI you do have? It's about 0.25 and that's quite a lot of the possible range of proportions. Do you think you think you can say much about what the true proportion really is? It could be some value really close to 0.75 or it could be close to 0.50. How strong a statement do you want to make with the data you have? Also, do values above 0.75 matter the same as values below? Was 0.75 a lower limit you were testing? In this case the conclusion might be different. So that's a lot of questions but I put them out there to make a point. Simply rejecting the null is going to be a rather pointless endeavour with these data. Assuming you can make a case to reject it, what else can you say? Is it really useful to tell people the true value is not 0.75 but it could be 0.74? Collect more data.
Disagreement between the p-value and the confidence interval in a binomial test
This is obviously a border case and the CI and test results are not derived in exactly the same manner (the CI is not an inversion of the test). You might want to look up binomial CIs and note that th
Disagreement between the p-value and the confidence interval in a binomial test This is obviously a border case and the CI and test results are not derived in exactly the same manner (the CI is not an inversion of the test). You might want to look up binomial CIs and note that there are many ways they can be calculated all with pluses and minuses. But none of that gets at your central question of whether you should reject the 0.75 hypothesis here. Furthermore, you're treating your p value and CI's both as tests and, because you did that, you can't reject 0.75 because now you have two tests and you should have done alpha correction on them. The CI should be treated as something else but you've clearly conveyed in your question that you're thinking of it as a test. Given that you can now select whichever test you like alpha is not 0.05. Step back from testing for a moment. You need to think about your numbers. For some reason you've selected exactly 0.75 as the amount to reject. What if you had an enormous N and got 0.74 and could reject it on both the CI and test? Would you reach the same conclusion you would reach with the 0.62 you have right now? Is there some range close to 0.75 that's just about equivalent to 0.75 in your work or is exactly 0.75 very critical? If there is a range how much of it is captured by your CI? How believable is your test rejection then? And what about the range of the CI you do have? It's about 0.25 and that's quite a lot of the possible range of proportions. Do you think you think you can say much about what the true proportion really is? It could be some value really close to 0.75 or it could be close to 0.50. How strong a statement do you want to make with the data you have? Also, do values above 0.75 matter the same as values below? Was 0.75 a lower limit you were testing? In this case the conclusion might be different. So that's a lot of questions but I put them out there to make a point. Simply rejecting the null is going to be a rather pointless endeavour with these data. Assuming you can make a case to reject it, what else can you say? Is it really useful to tell people the true value is not 0.75 but it could be 0.74? Collect more data.
Disagreement between the p-value and the confidence interval in a binomial test This is obviously a border case and the CI and test results are not derived in exactly the same manner (the CI is not an inversion of the test). You might want to look up binomial CIs and note that th
43,906
Disagreement between the p-value and the confidence interval in a binomial test
This is my first time answering a question, so I'm hoping that I am actually providing a useful answer. When you run this in R: x <- 31 n <- 50 p <- 0.75 binom.test(x, n, p = p) ... it returns the following results: Exact binomial test data: x and n number of successes = 31, number of trials = 50, p-value = 0.04812 alternative hypothesis: true probability of success is not equal to 0.75 95 percent confidence interval: 0.4717492 0.7534989 sample estimates: probability of success 0.62 What the p-value of 0.4812 is telling you is that testing for a probability of success of 0.75 (75%) of having 31 "successful" outcomes out of 50 attempts of a binary event (0, 1) -- i.e.: flipping a coin and getting heads up 31 times out of 50 -- is just inside the 95% confidence interval, which are a range of probabilities of success. Therefore, you could cautiously accept the null hypothesis that the probability of success is equal to 75%. (The alternative hypothesis being that the probability of success is not equal to 75%.) The calculated probability of success is included at the bottom of the output: 0.62, or 62% chance of success. This is nothing more than 31 / 50.
Disagreement between the p-value and the confidence interval in a binomial test
This is my first time answering a question, so I'm hoping that I am actually providing a useful answer. When you run this in R: x <- 31 n <- 50 p <- 0.75 binom.test(x, n, p = p) ... it returns the fo
Disagreement between the p-value and the confidence interval in a binomial test This is my first time answering a question, so I'm hoping that I am actually providing a useful answer. When you run this in R: x <- 31 n <- 50 p <- 0.75 binom.test(x, n, p = p) ... it returns the following results: Exact binomial test data: x and n number of successes = 31, number of trials = 50, p-value = 0.04812 alternative hypothesis: true probability of success is not equal to 0.75 95 percent confidence interval: 0.4717492 0.7534989 sample estimates: probability of success 0.62 What the p-value of 0.4812 is telling you is that testing for a probability of success of 0.75 (75%) of having 31 "successful" outcomes out of 50 attempts of a binary event (0, 1) -- i.e.: flipping a coin and getting heads up 31 times out of 50 -- is just inside the 95% confidence interval, which are a range of probabilities of success. Therefore, you could cautiously accept the null hypothesis that the probability of success is equal to 75%. (The alternative hypothesis being that the probability of success is not equal to 75%.) The calculated probability of success is included at the bottom of the output: 0.62, or 62% chance of success. This is nothing more than 31 / 50.
Disagreement between the p-value and the confidence interval in a binomial test This is my first time answering a question, so I'm hoping that I am actually providing a useful answer. When you run this in R: x <- 31 n <- 50 p <- 0.75 binom.test(x, n, p = p) ... it returns the fo
43,907
How to judge if 5 point Likert scale data are normally distributed?
How to judge if 5 point likert scale data are normal distributed? Values on 5-point ordinal scales are never normally distributed. But that's probably not the question you really need answered. I have read that the t-test is used when the population is normally distributed. It's an assumption of the test, but it's often reasonably robust to mild deviations from the normality assumption, especially if the distribution is nearly symmetric. How can I determine if my data are normal given that I am using 5-point likert scale with a sample size of 100? You data are not normal. But real data are likely never actually normal. The useful question is not "are my data normal" (no, they're not), but something more like "is the extent to which my data deviate from normality enough to affect my inference in ways I need to worry about?". To answer that is something that changes from context to context, and person to person. It's not something about which absolute prescriptive statements can be made -- but the size and kind of impact on inference (effect on significance level and power under various alternatives) can be assessed. What does standard deviation describe? Basically, how far a typical* observation is from the mean. * (in a particular sense of the word 'typical', and a particular way of measuring 'how far')
How to judge if 5 point Likert scale data are normally distributed?
How to judge if 5 point likert scale data are normal distributed? Values on 5-point ordinal scales are never normally distributed. But that's probably not the question you really need answered. I ha
How to judge if 5 point Likert scale data are normally distributed? How to judge if 5 point likert scale data are normal distributed? Values on 5-point ordinal scales are never normally distributed. But that's probably not the question you really need answered. I have read that the t-test is used when the population is normally distributed. It's an assumption of the test, but it's often reasonably robust to mild deviations from the normality assumption, especially if the distribution is nearly symmetric. How can I determine if my data are normal given that I am using 5-point likert scale with a sample size of 100? You data are not normal. But real data are likely never actually normal. The useful question is not "are my data normal" (no, they're not), but something more like "is the extent to which my data deviate from normality enough to affect my inference in ways I need to worry about?". To answer that is something that changes from context to context, and person to person. It's not something about which absolute prescriptive statements can be made -- but the size and kind of impact on inference (effect on significance level and power under various alternatives) can be assessed. What does standard deviation describe? Basically, how far a typical* observation is from the mean. * (in a particular sense of the word 'typical', and a particular way of measuring 'how far')
How to judge if 5 point Likert scale data are normally distributed? How to judge if 5 point likert scale data are normal distributed? Values on 5-point ordinal scales are never normally distributed. But that's probably not the question you really need answered. I ha
43,908
How to judge if 5 point Likert scale data are normally distributed?
Normal distribution is a continuous distribution while 5-point Likert-type scale is an ordinal variable, so by definition it is not normally distributed.
How to judge if 5 point Likert scale data are normally distributed?
Normal distribution is a continuous distribution while 5-point Likert-type scale is an ordinal variable, so by definition it is not normally distributed.
How to judge if 5 point Likert scale data are normally distributed? Normal distribution is a continuous distribution while 5-point Likert-type scale is an ordinal variable, so by definition it is not normally distributed.
How to judge if 5 point Likert scale data are normally distributed? Normal distribution is a continuous distribution while 5-point Likert-type scale is an ordinal variable, so by definition it is not normally distributed.
43,909
How to judge if 5 point Likert scale data are normally distributed?
If you are considering t-tests on Likert items, I would primarily be worried about how many 1's and 5's there are, since those values might represent censoring of responses that could exceed 1 or 5 if it permitted. This censoring is much problematic than the fact that you would be treating a discrete distribution as if it were continuous. See How to model this odd-shaped distribution (almost a reverse-J) for a good overview for what can go wrong if you use typical approaches on censored data. In any case, Group differences on a five point Likert item has some excellent answers for approaches to testing for group differences on likert items and the drawbacks to treating bounded, ordinal data as if it were continuous.
How to judge if 5 point Likert scale data are normally distributed?
If you are considering t-tests on Likert items, I would primarily be worried about how many 1's and 5's there are, since those values might represent censoring of responses that could exceed 1 or 5 if
How to judge if 5 point Likert scale data are normally distributed? If you are considering t-tests on Likert items, I would primarily be worried about how many 1's and 5's there are, since those values might represent censoring of responses that could exceed 1 or 5 if it permitted. This censoring is much problematic than the fact that you would be treating a discrete distribution as if it were continuous. See How to model this odd-shaped distribution (almost a reverse-J) for a good overview for what can go wrong if you use typical approaches on censored data. In any case, Group differences on a five point Likert item has some excellent answers for approaches to testing for group differences on likert items and the drawbacks to treating bounded, ordinal data as if it were continuous.
How to judge if 5 point Likert scale data are normally distributed? If you are considering t-tests on Likert items, I would primarily be worried about how many 1's and 5's there are, since those values might represent censoring of responses that could exceed 1 or 5 if
43,910
How to judge if 5 point Likert scale data are normally distributed?
I think you have two questions here: how do you describe the distribution of a set of Likert scores? (by your question is such a set normally distributed) how do you tell if two sets of Likert score are 'different' (or one Likert score different from the one that is most 'normal'? For the first one, only continuous data can be normally distributed, and a Likert score is discrete, 1 out of 5 values. (you can fake it sort of by treating 1-5 a real values but that's not the point here. So the appropriate analogous distribution is a binomial distribution on 5 items (for answers 1,2,3,4,5 having probabilities of 1/16, 4/16, 6/16, 4/16, and 1/16 respectively). and the analogous title question should be: How to judge if 5 point Likert scale data are distributed like B(4)? (4 = 5-1 which is just how it works out). To the second question, you want to see if a given set of Likert data is 'like' B(4) or like another set. Here I would use Chi-squared on the difference of 1's, 2's, 3's, 4's and 5's.
How to judge if 5 point Likert scale data are normally distributed?
I think you have two questions here: how do you describe the distribution of a set of Likert scores? (by your question is such a set normally distributed) how do you tell if two sets of Likert score
How to judge if 5 point Likert scale data are normally distributed? I think you have two questions here: how do you describe the distribution of a set of Likert scores? (by your question is such a set normally distributed) how do you tell if two sets of Likert score are 'different' (or one Likert score different from the one that is most 'normal'? For the first one, only continuous data can be normally distributed, and a Likert score is discrete, 1 out of 5 values. (you can fake it sort of by treating 1-5 a real values but that's not the point here. So the appropriate analogous distribution is a binomial distribution on 5 items (for answers 1,2,3,4,5 having probabilities of 1/16, 4/16, 6/16, 4/16, and 1/16 respectively). and the analogous title question should be: How to judge if 5 point Likert scale data are distributed like B(4)? (4 = 5-1 which is just how it works out). To the second question, you want to see if a given set of Likert data is 'like' B(4) or like another set. Here I would use Chi-squared on the difference of 1's, 2's, 3's, 4's and 5's.
How to judge if 5 point Likert scale data are normally distributed? I think you have two questions here: how do you describe the distribution of a set of Likert scores? (by your question is such a set normally distributed) how do you tell if two sets of Likert score
43,911
How to judge if 5 point Likert scale data are normally distributed?
@Tim is correct, likert data cannot be normally distributed. Likert data are discrete and bounded, normal data go to infinity in both directions and can take any value in between. The answer to your other question is that the standard deviation means pretty much the same thing whether your data are likert-type, normal or something else. The standard deviation is, essentially, how far away from the mean your data are. When data are normally distributed, it is also true that, e.g., 68% of your data will be within +/- 1SD, but that won't necessarily be true for non-normal data. When you have likert data and you want to think about how much your data vary, you may prefer a non-parametric measure like the interquartile range.
How to judge if 5 point Likert scale data are normally distributed?
@Tim is correct, likert data cannot be normally distributed. Likert data are discrete and bounded, normal data go to infinity in both directions and can take any value in between. The answer to you
How to judge if 5 point Likert scale data are normally distributed? @Tim is correct, likert data cannot be normally distributed. Likert data are discrete and bounded, normal data go to infinity in both directions and can take any value in between. The answer to your other question is that the standard deviation means pretty much the same thing whether your data are likert-type, normal or something else. The standard deviation is, essentially, how far away from the mean your data are. When data are normally distributed, it is also true that, e.g., 68% of your data will be within +/- 1SD, but that won't necessarily be true for non-normal data. When you have likert data and you want to think about how much your data vary, you may prefer a non-parametric measure like the interquartile range.
How to judge if 5 point Likert scale data are normally distributed? @Tim is correct, likert data cannot be normally distributed. Likert data are discrete and bounded, normal data go to infinity in both directions and can take any value in between. The answer to you
43,912
How to judge if 5 point Likert scale data are normally distributed?
I would suggest to give the data a hard look via a diagram. That sounds unscientific, but eyeballing is a really powerful tool for lots of problems. Assessing normality of a Likert scale is one of them. Look at the distribution and imagine you draw a normal distribution: would the data fit into the curve, or would there be gross violations, e. g. are the values shifted to the left or right? Alternatively, there are things like a Kolmogorov-Smirnov test for normality, but with a lot of cases that detects non-normality 10 times out of ten. And yes: it's not normally distributed because it's not a continuous variable. But it's a very standard method of measurement in a lot of fields and it's often treated like a metric variable because all other choices are even worse. Sorry, I'm a little bit miffed about this problem because it comes up in my work every week.
How to judge if 5 point Likert scale data are normally distributed?
I would suggest to give the data a hard look via a diagram. That sounds unscientific, but eyeballing is a really powerful tool for lots of problems. Assessing normality of a Likert scale is one of the
How to judge if 5 point Likert scale data are normally distributed? I would suggest to give the data a hard look via a diagram. That sounds unscientific, but eyeballing is a really powerful tool for lots of problems. Assessing normality of a Likert scale is one of them. Look at the distribution and imagine you draw a normal distribution: would the data fit into the curve, or would there be gross violations, e. g. are the values shifted to the left or right? Alternatively, there are things like a Kolmogorov-Smirnov test for normality, but with a lot of cases that detects non-normality 10 times out of ten. And yes: it's not normally distributed because it's not a continuous variable. But it's a very standard method of measurement in a lot of fields and it's often treated like a metric variable because all other choices are even worse. Sorry, I'm a little bit miffed about this problem because it comes up in my work every week.
How to judge if 5 point Likert scale data are normally distributed? I would suggest to give the data a hard look via a diagram. That sounds unscientific, but eyeballing is a really powerful tool for lots of problems. Assessing normality of a Likert scale is one of the
43,913
How to judge if 5 point Likert scale data are normally distributed?
If you have ordinal data why would you be concerned about a normal distribution? The only reason I can think of is if you are thinking of a latent trait that is manifested categorically; in that case, one can make the assumption that the latent trait is normally distributed. If you consider it a latent trait, and are truly concerned about the normality of that latent trait, you may be able to use an ordinal probit regression (which assumes a latent normal variable) and assess the fit (though a smarter person than I may have a better way of doing that). Otherwise, if you are not thinking of the latent trait interpretation, don't do a t-test or z-test. Use non-parametric tests, Chi2 test, or an ordinal logit/probit. If you do an ordinal logit (so you can include multiple predictors), test the parallel lines assumption (see this implementation in Stata using Brant's test, Problem 2 on Page 7). Interpreting ordinal scales as continuous is done all the time in certain fields - and in my experience often statistical significance tests treating it as continuous vs tests treating it as categorical don't come out much different. That said, I'm of the mindset that if appropriate tests are available for your data, and their implementation is feasible, you should use them.
How to judge if 5 point Likert scale data are normally distributed?
If you have ordinal data why would you be concerned about a normal distribution? The only reason I can think of is if you are thinking of a latent trait that is manifested categorically; in that case,
How to judge if 5 point Likert scale data are normally distributed? If you have ordinal data why would you be concerned about a normal distribution? The only reason I can think of is if you are thinking of a latent trait that is manifested categorically; in that case, one can make the assumption that the latent trait is normally distributed. If you consider it a latent trait, and are truly concerned about the normality of that latent trait, you may be able to use an ordinal probit regression (which assumes a latent normal variable) and assess the fit (though a smarter person than I may have a better way of doing that). Otherwise, if you are not thinking of the latent trait interpretation, don't do a t-test or z-test. Use non-parametric tests, Chi2 test, or an ordinal logit/probit. If you do an ordinal logit (so you can include multiple predictors), test the parallel lines assumption (see this implementation in Stata using Brant's test, Problem 2 on Page 7). Interpreting ordinal scales as continuous is done all the time in certain fields - and in my experience often statistical significance tests treating it as continuous vs tests treating it as categorical don't come out much different. That said, I'm of the mindset that if appropriate tests are available for your data, and their implementation is feasible, you should use them.
How to judge if 5 point Likert scale data are normally distributed? If you have ordinal data why would you be concerned about a normal distribution? The only reason I can think of is if you are thinking of a latent trait that is manifested categorically; in that case,
43,914
What does it mean to integrate over the posterior?
Matthew's answer provides correct technical explanation. For intuitive understanding, you may think that to integrate over a distribution is just a fancy term for averaging over the distribution (or, taking the expectation over the distribution). In this answer, I consider the same model with discrete distributions (finite number of alternative $\theta$s), which may be easier to understand if one is not very familiar with integrating over continuous probability distributions. In this answer, for clarity I use $Pr$ to denote discrete probabilities and $p$ to denote probability densities - often $p$ is used to denote both like in the book excerpt ($k^{\mathrm{rep}}$ is a discrete random variable). Discrete example A discrete case may be easier to grasp, so let us consider a situation with only two types of answerers: those who guess at random (assume these are yes/no -questions), i.e., $\theta=0.5$ and those who are pretty good (say, $\theta=0.9$). Let our prior distribution for your rate-of-correct-answers be $Pr(\theta=0.5)=0.5$, $Pr(\theta=0.9)=0.5$. Let us now work out what is our posterior predictive probability that you get all five questions in the next test right. This is $k^{\mathrm{rep}} = 5\mid n^{\mathrm{rep}} = 5$. If you are a total-guesser, this probability would be \begin{equation} Pr(k^{\mathrm{rep}} = 5 \mid n^{\mathrm{rep}} = 5,\theta=0.5) = 0.5^5 \approx 0.03, \end{equation} while if you are pretty good at answering, the probability is \begin{equation} Pr(k^{\mathrm{rep}} = 5 \mid n^{\mathrm{rep}} = 5,\theta=0.9) = 0.9^5 \approx 0.59, \end{equation} but we don't know which of these classes of answerers you belong to! Therefore, our total probability for you getting 5/5 in the next test is obtained by weighting the previous probabilities by the probabilities of you belonging to either class. If we want to take into account our information about your success in the previous test ($n=10$ questions, $k=9$ correct answers), the correct probabilities to use for this weighting are the posterior probabilities given the previous data. I leave computing the posterior as an exercise, but the result is \begin{array}{l} Pr(\theta=0.5 \mid k=9,n=10) = \frac{0.5^9\,0.5}{0.5^9\,0.5 + 0.9^9\,0.1} \approx 0.025, \\ Pr(\theta = 0.9 \mid k=9,n=10) = \frac{0.9^9\,0.1}{0.5^9\,0.5 + 0.9^9\,0.1} \approx 0.975. \end{array} Our posterior predictive probability for getting all questions correctly is then \begin{array}{l} & Pr(k^{\mathrm{rep}}=5 \mid n^{\mathrm{rep}}=5,n=10,k=9) \\ = & Pr(\theta=0.5 \mid k=9,n=10)\times Pr(k^{\mathrm{rep}} = 5 \mid n^{\mathrm{rep}} = 5,\theta=0.5) \\+ &Pr(\theta=0.9 \mid k=9,n=10)\times Pr(k^{\mathrm{rep}} = 5 \mid n^{\mathrm{rep}} = 5,\theta=0.9) \\ \approx & 0.577, \end{array} which is pretty close to the predictive probability for the pretty-good class, but slightly adjusted downwards to take into account the small probability that your good score in the previous test was just luck and you actually are answering by guessing. Moving to continuous case The previous discrete case is a rather crude model - why on Earth would we find it likely that you have a correct-answer-rate of $\theta=0.9$, but impossible that you have $\theta=0.85$?? So, a better analysis will use a continuous prior distribution for $\theta$. In this case, all particular values have zero probability, and instead the prior and posterior distributions are described by densities $p(\theta)$, $p(\theta \mid n=10,k=9)$. The goal of obtaining the posterior predictive distribution is still the same, but now the weighted average prediction is obtained by integrating over the posterior distribution, as explained in Matthew's answer. If this concept is unfamiliar to you, you should read up on probability density functions. Note also that in measure theory, averaging over both discrete and continuous distributions is formalized as integration, so the term 'integrate over posterior' may be used in the discrete case, too.
What does it mean to integrate over the posterior?
Matthew's answer provides correct technical explanation. For intuitive understanding, you may think that to integrate over a distribution is just a fancy term for averaging over the distribution (or,
What does it mean to integrate over the posterior? Matthew's answer provides correct technical explanation. For intuitive understanding, you may think that to integrate over a distribution is just a fancy term for averaging over the distribution (or, taking the expectation over the distribution). In this answer, I consider the same model with discrete distributions (finite number of alternative $\theta$s), which may be easier to understand if one is not very familiar with integrating over continuous probability distributions. In this answer, for clarity I use $Pr$ to denote discrete probabilities and $p$ to denote probability densities - often $p$ is used to denote both like in the book excerpt ($k^{\mathrm{rep}}$ is a discrete random variable). Discrete example A discrete case may be easier to grasp, so let us consider a situation with only two types of answerers: those who guess at random (assume these are yes/no -questions), i.e., $\theta=0.5$ and those who are pretty good (say, $\theta=0.9$). Let our prior distribution for your rate-of-correct-answers be $Pr(\theta=0.5)=0.5$, $Pr(\theta=0.9)=0.5$. Let us now work out what is our posterior predictive probability that you get all five questions in the next test right. This is $k^{\mathrm{rep}} = 5\mid n^{\mathrm{rep}} = 5$. If you are a total-guesser, this probability would be \begin{equation} Pr(k^{\mathrm{rep}} = 5 \mid n^{\mathrm{rep}} = 5,\theta=0.5) = 0.5^5 \approx 0.03, \end{equation} while if you are pretty good at answering, the probability is \begin{equation} Pr(k^{\mathrm{rep}} = 5 \mid n^{\mathrm{rep}} = 5,\theta=0.9) = 0.9^5 \approx 0.59, \end{equation} but we don't know which of these classes of answerers you belong to! Therefore, our total probability for you getting 5/5 in the next test is obtained by weighting the previous probabilities by the probabilities of you belonging to either class. If we want to take into account our information about your success in the previous test ($n=10$ questions, $k=9$ correct answers), the correct probabilities to use for this weighting are the posterior probabilities given the previous data. I leave computing the posterior as an exercise, but the result is \begin{array}{l} Pr(\theta=0.5 \mid k=9,n=10) = \frac{0.5^9\,0.5}{0.5^9\,0.5 + 0.9^9\,0.1} \approx 0.025, \\ Pr(\theta = 0.9 \mid k=9,n=10) = \frac{0.9^9\,0.1}{0.5^9\,0.5 + 0.9^9\,0.1} \approx 0.975. \end{array} Our posterior predictive probability for getting all questions correctly is then \begin{array}{l} & Pr(k^{\mathrm{rep}}=5 \mid n^{\mathrm{rep}}=5,n=10,k=9) \\ = & Pr(\theta=0.5 \mid k=9,n=10)\times Pr(k^{\mathrm{rep}} = 5 \mid n^{\mathrm{rep}} = 5,\theta=0.5) \\+ &Pr(\theta=0.9 \mid k=9,n=10)\times Pr(k^{\mathrm{rep}} = 5 \mid n^{\mathrm{rep}} = 5,\theta=0.9) \\ \approx & 0.577, \end{array} which is pretty close to the predictive probability for the pretty-good class, but slightly adjusted downwards to take into account the small probability that your good score in the previous test was just luck and you actually are answering by guessing. Moving to continuous case The previous discrete case is a rather crude model - why on Earth would we find it likely that you have a correct-answer-rate of $\theta=0.9$, but impossible that you have $\theta=0.85$?? So, a better analysis will use a continuous prior distribution for $\theta$. In this case, all particular values have zero probability, and instead the prior and posterior distributions are described by densities $p(\theta)$, $p(\theta \mid n=10,k=9)$. The goal of obtaining the posterior predictive distribution is still the same, but now the weighted average prediction is obtained by integrating over the posterior distribution, as explained in Matthew's answer. If this concept is unfamiliar to you, you should read up on probability density functions. Note also that in measure theory, averaging over both discrete and continuous distributions is formalized as integration, so the term 'integrate over posterior' may be used in the discrete case, too.
What does it mean to integrate over the posterior? Matthew's answer provides correct technical explanation. For intuitive understanding, you may think that to integrate over a distribution is just a fancy term for averaging over the distribution (or,
43,915
What does it mean to integrate over the posterior?
The goal here to get the posterior predictive distribution. Suppose we are given previous data $y$ for learning parameters $\theta$ by which we attain the posterior $\pi(\theta \mid y)$. But now we want to understand the distribution of $y^*$, a new (set of) observation(s), given the data we already have. That would be the distribution $\pi(y^* \mid y)$. How do we get this? We use the Law of Total Probability, which requires an integral: $$ \pi(y^* \mid y) = \int \pi(y^*, \theta \mid y) d\theta = \int \pi(y^* \mid \theta) \pi(\theta \mid y) d\theta. $$ $\pi(\theta \mid y)$ is the posterior distribution, so we are integrating over the posterior to get $\pi(y^* \mid y)$. We couldn't just use $\pi(y^* \mid \theta)$ for some point estimate of $\theta$ because that would not be accounting for the uncertainty we have about $\theta$ (and we could have a lot of uncertainty). Fortunately that uncertainty is entirely contained within the posterior $\pi(\theta \mid y)$. For example, the Beta-Binomial distribution is the posterior predictive distribution for a binomial likelihood and beta prior obtained by the integral $$ \int \text{Binomial}(y^* \mid \theta) \text{Beta}(\theta \mid \alpha_{\text{updated}},\beta_{\text{updated}}) d\theta. $$
What does it mean to integrate over the posterior?
The goal here to get the posterior predictive distribution. Suppose we are given previous data $y$ for learning parameters $\theta$ by which we attain the posterior $\pi(\theta \mid y)$. But now we wa
What does it mean to integrate over the posterior? The goal here to get the posterior predictive distribution. Suppose we are given previous data $y$ for learning parameters $\theta$ by which we attain the posterior $\pi(\theta \mid y)$. But now we want to understand the distribution of $y^*$, a new (set of) observation(s), given the data we already have. That would be the distribution $\pi(y^* \mid y)$. How do we get this? We use the Law of Total Probability, which requires an integral: $$ \pi(y^* \mid y) = \int \pi(y^*, \theta \mid y) d\theta = \int \pi(y^* \mid \theta) \pi(\theta \mid y) d\theta. $$ $\pi(\theta \mid y)$ is the posterior distribution, so we are integrating over the posterior to get $\pi(y^* \mid y)$. We couldn't just use $\pi(y^* \mid \theta)$ for some point estimate of $\theta$ because that would not be accounting for the uncertainty we have about $\theta$ (and we could have a lot of uncertainty). Fortunately that uncertainty is entirely contained within the posterior $\pi(\theta \mid y)$. For example, the Beta-Binomial distribution is the posterior predictive distribution for a binomial likelihood and beta prior obtained by the integral $$ \int \text{Binomial}(y^* \mid \theta) \text{Beta}(\theta \mid \alpha_{\text{updated}},\beta_{\text{updated}}) d\theta. $$
What does it mean to integrate over the posterior? The goal here to get the posterior predictive distribution. Suppose we are given previous data $y$ for learning parameters $\theta$ by which we attain the posterior $\pi(\theta \mid y)$. But now we wa
43,916
Is visual inspection the only way to compare large datasets?
I suggest summarizing the difference with a general robust measure that does not depend on normality: the concordance probability that comes from the Wilcoxon-Mann-Whitney two-sample test. The concordance proportion estimates the probability that a randomly chosen value from group A exceeds a randomly chosen value from group B. This can be generalized to your "pairing of pairs" setting in which you can estimate the probability that method 1 provides measurements that are "more concordant" between A and B than method 2 does. This is implemented in the R Hmisc package rcorrp.cens function.
Is visual inspection the only way to compare large datasets?
I suggest summarizing the difference with a general robust measure that does not depend on normality: the concordance probability that comes from the Wilcoxon-Mann-Whitney two-sample test. The concor
Is visual inspection the only way to compare large datasets? I suggest summarizing the difference with a general robust measure that does not depend on normality: the concordance probability that comes from the Wilcoxon-Mann-Whitney two-sample test. The concordance proportion estimates the probability that a randomly chosen value from group A exceeds a randomly chosen value from group B. This can be generalized to your "pairing of pairs" setting in which you can estimate the probability that method 1 provides measurements that are "more concordant" between A and B than method 2 does. This is implemented in the R Hmisc package rcorrp.cens function.
Is visual inspection the only way to compare large datasets? I suggest summarizing the difference with a general robust measure that does not depend on normality: the concordance probability that comes from the Wilcoxon-Mann-Whitney two-sample test. The concor
43,917
Is visual inspection the only way to compare large datasets?
Yes. This is one key problem with standard goodness-of-fit tests on large datasets. I would prefer visual inspection, as well as measures of effect size. Even if there is a large overlap in distributions, a 15% improvement in some KPI may be very useful. I wouldn't care too much about specific distributions, depending on your specific application. In addition, boxplots are rather crude ways of displaying data. Here are a few alternatives. Hard to say, since we don't know your data... My suggestion about effect sizes may already be helpful.
Is visual inspection the only way to compare large datasets?
Yes. This is one key problem with standard goodness-of-fit tests on large datasets. I would prefer visual inspection, as well as measures of effect size. Even if there is a large overlap in distributi
Is visual inspection the only way to compare large datasets? Yes. This is one key problem with standard goodness-of-fit tests on large datasets. I would prefer visual inspection, as well as measures of effect size. Even if there is a large overlap in distributions, a 15% improvement in some KPI may be very useful. I wouldn't care too much about specific distributions, depending on your specific application. In addition, boxplots are rather crude ways of displaying data. Here are a few alternatives. Hard to say, since we don't know your data... My suggestion about effect sizes may already be helpful.
Is visual inspection the only way to compare large datasets? Yes. This is one key problem with standard goodness-of-fit tests on large datasets. I would prefer visual inspection, as well as measures of effect size. Even if there is a large overlap in distributi
43,918
Is visual inspection the only way to compare large datasets?
There is nothing wrong with statistical summaries of large data sets. If a method would be appropriate with N = 100 then it is appropriate with N = 100,000 or 100,000,000. There is, however, something wrong with how most people interpret p-values. The answer to your first question is "yes", but that answer is just another indication that you should look at effect size, not p value. Regarding your second question: Visual inspection is critical with large or small data sets. But numeric comparison is very useful with both, as well. Their utility is not a function of data set size. Regarding your third question: Use both visual and numeric comparisons. Choose both the visual and numeric method that 1) are suited to your data and 2) are suited to the questions you want to ask about your data.
Is visual inspection the only way to compare large datasets?
There is nothing wrong with statistical summaries of large data sets. If a method would be appropriate with N = 100 then it is appropriate with N = 100,000 or 100,000,000. There is, however, something
Is visual inspection the only way to compare large datasets? There is nothing wrong with statistical summaries of large data sets. If a method would be appropriate with N = 100 then it is appropriate with N = 100,000 or 100,000,000. There is, however, something wrong with how most people interpret p-values. The answer to your first question is "yes", but that answer is just another indication that you should look at effect size, not p value. Regarding your second question: Visual inspection is critical with large or small data sets. But numeric comparison is very useful with both, as well. Their utility is not a function of data set size. Regarding your third question: Use both visual and numeric comparisons. Choose both the visual and numeric method that 1) are suited to your data and 2) are suited to the questions you want to ask about your data.
Is visual inspection the only way to compare large datasets? There is nothing wrong with statistical summaries of large data sets. If a method would be appropriate with N = 100 then it is appropriate with N = 100,000 or 100,000,000. There is, however, something
43,919
Why is homogeneity of variance so important?
It is about a year since you have asked this question, @variant, and I assume you hopefully passed whatever exam you where studying for or passed your stats course. Homogeneity of variance is a standard assumption of ANOVA and most statistical tests. It is usually touched on quickly in most stats class. Most people have no understanding of what their prof is talking about and, frankly, most profs do not have the best handle on it as well. Homogeneity of variance (HOV) has a history and it is often helpful to understand that history if you want to understand statistics. Variance, as a term, was first coined by Fisher in 1918. (hopefully you already have a good understanding of variance) What Fisher was interested in was decomposing differences among organisms into their genetic and environmental influences. You know, the idea that people are a combination of nature and nurture. Fisher also felt that most natural phenomenon was normally distributed -- or had a bell curve shape. Before Fisher was Pearson and Galton, and they had a strong influence on Fisher. The normal distribution has an interesting history in statistics and Galton found it almost magical. Galton explored the normal distribution using a device called the Quincunx. There is a great demonstration of Galton's device on the MathisFun website. Basically it was a board with nails pounded in it. The nails were arranged in a triangular shape. Galton dropped a series of beans or marbles at the top of the triangle and watched them plink, plink, plink down through the nails until they reached the bottom. What he observed was that the objects would arrange themselves at the bottom in a normal(ish) distribution pattern. Now imagine you are using Galton's game and you repeat the above experiment with a 1000 marbles. Then you measure the mean and variance of those 1000 marbles. You write that down. Then you repeat your experiment with the same marbles but first you only use 750 marbles (write down the resulting mean and variance of the 750 marbles) and then empty the game and then use the remaining 250 marbles (again write down the mean and variance of the 250 marbles). If you add the variance of the 750 marbles with the variance of the 250 marbles you will get the exact variance (more or less) of the original 1000 marble distribution. Now, repeat the above experiment but, this time, imagine that on the last 250 marble trial you slightly tilt the game so that one side is higher than the other. This will cause the marbles to slightly skew off-center and collect more to one side of the game then the other side. If you calculate the mean and variance of this skewed sample, and add it to the non-skewed 750 marble sample, you will find that it no longer adds up correctly to the original 1000 marble population variance. This because your 250 sample is skewed and has a different distribution than the 750 marble sample. Also when a sample is skewed the mean may no longer be the best measure of central tendency and variance relies on the mean. ANOVA is a special case of the general linear model of statistics. It is linear in that you are adding things up. It assumes that the distributions of those things you are adding up are the same. If they are not then your conclusion or estimate might be off or biased. And this why HOV is important. Hope this helps.
Why is homogeneity of variance so important?
It is about a year since you have asked this question, @variant, and I assume you hopefully passed whatever exam you where studying for or passed your stats course. Homogeneity of variance is a stand
Why is homogeneity of variance so important? It is about a year since you have asked this question, @variant, and I assume you hopefully passed whatever exam you where studying for or passed your stats course. Homogeneity of variance is a standard assumption of ANOVA and most statistical tests. It is usually touched on quickly in most stats class. Most people have no understanding of what their prof is talking about and, frankly, most profs do not have the best handle on it as well. Homogeneity of variance (HOV) has a history and it is often helpful to understand that history if you want to understand statistics. Variance, as a term, was first coined by Fisher in 1918. (hopefully you already have a good understanding of variance) What Fisher was interested in was decomposing differences among organisms into their genetic and environmental influences. You know, the idea that people are a combination of nature and nurture. Fisher also felt that most natural phenomenon was normally distributed -- or had a bell curve shape. Before Fisher was Pearson and Galton, and they had a strong influence on Fisher. The normal distribution has an interesting history in statistics and Galton found it almost magical. Galton explored the normal distribution using a device called the Quincunx. There is a great demonstration of Galton's device on the MathisFun website. Basically it was a board with nails pounded in it. The nails were arranged in a triangular shape. Galton dropped a series of beans or marbles at the top of the triangle and watched them plink, plink, plink down through the nails until they reached the bottom. What he observed was that the objects would arrange themselves at the bottom in a normal(ish) distribution pattern. Now imagine you are using Galton's game and you repeat the above experiment with a 1000 marbles. Then you measure the mean and variance of those 1000 marbles. You write that down. Then you repeat your experiment with the same marbles but first you only use 750 marbles (write down the resulting mean and variance of the 750 marbles) and then empty the game and then use the remaining 250 marbles (again write down the mean and variance of the 250 marbles). If you add the variance of the 750 marbles with the variance of the 250 marbles you will get the exact variance (more or less) of the original 1000 marble distribution. Now, repeat the above experiment but, this time, imagine that on the last 250 marble trial you slightly tilt the game so that one side is higher than the other. This will cause the marbles to slightly skew off-center and collect more to one side of the game then the other side. If you calculate the mean and variance of this skewed sample, and add it to the non-skewed 750 marble sample, you will find that it no longer adds up correctly to the original 1000 marble population variance. This because your 250 sample is skewed and has a different distribution than the 750 marble sample. Also when a sample is skewed the mean may no longer be the best measure of central tendency and variance relies on the mean. ANOVA is a special case of the general linear model of statistics. It is linear in that you are adding things up. It assumes that the distributions of those things you are adding up are the same. If they are not then your conclusion or estimate might be off or biased. And this why HOV is important. Hope this helps.
Why is homogeneity of variance so important? It is about a year since you have asked this question, @variant, and I assume you hopefully passed whatever exam you where studying for or passed your stats course. Homogeneity of variance is a stand
43,920
Why is homogeneity of variance so important?
When we conduct an ANOVA test, we examine the plausibility of a null hypothesis, a straw-man hypothesis that we may end up rejecting. Under this hypothesis we assume not only that all group means are equal, but that we have a certain data-generating process. This is a process in which 1) our observations come to us randomly sampled from the population and 2) there really aren't multiple groups: all observations come from what is the same underlying group, with the same degree of variability. The usefulness of temporarily adopting, and evaluating, such an hypothesis breaks down if, by their shape, our data clearly don't look as if they came from such a data-generating process. If the variability between groups is radically different, p-values computed based on the probability of certain results occurring under the null hypothesis are no longer accurate. If the data-generating process is clearly different for the different groups, what point is there, and what validity is there, in assessing the probability occurring under the null of the obtained mean differences? The situation we face bears no resemblance to the situation described by such a null. The good news is twofold. First, you'll see authors routinely referring to the robustness of ANOVA in the face of violations to assumptions--not to the random sampling assumption, mind you, but to assumptions of homogeneity of variance and of normal distributions within groups. Second, resourceful researchers such as Harwell have gleaned from many Monte Carlo simulations some helpful guidance in making adjustments in the face of such violations. Harwell, M. (2003). Summarizing Monte Carlo results in methodological research: The single factor, fixed-effects ANCOVA case. Journal of Educational and Behavioral Statistics, 28:1, 45-70.
Why is homogeneity of variance so important?
When we conduct an ANOVA test, we examine the plausibility of a null hypothesis, a straw-man hypothesis that we may end up rejecting. Under this hypothesis we assume not only that all group means are
Why is homogeneity of variance so important? When we conduct an ANOVA test, we examine the plausibility of a null hypothesis, a straw-man hypothesis that we may end up rejecting. Under this hypothesis we assume not only that all group means are equal, but that we have a certain data-generating process. This is a process in which 1) our observations come to us randomly sampled from the population and 2) there really aren't multiple groups: all observations come from what is the same underlying group, with the same degree of variability. The usefulness of temporarily adopting, and evaluating, such an hypothesis breaks down if, by their shape, our data clearly don't look as if they came from such a data-generating process. If the variability between groups is radically different, p-values computed based on the probability of certain results occurring under the null hypothesis are no longer accurate. If the data-generating process is clearly different for the different groups, what point is there, and what validity is there, in assessing the probability occurring under the null of the obtained mean differences? The situation we face bears no resemblance to the situation described by such a null. The good news is twofold. First, you'll see authors routinely referring to the robustness of ANOVA in the face of violations to assumptions--not to the random sampling assumption, mind you, but to assumptions of homogeneity of variance and of normal distributions within groups. Second, resourceful researchers such as Harwell have gleaned from many Monte Carlo simulations some helpful guidance in making adjustments in the face of such violations. Harwell, M. (2003). Summarizing Monte Carlo results in methodological research: The single factor, fixed-effects ANCOVA case. Journal of Educational and Behavioral Statistics, 28:1, 45-70.
Why is homogeneity of variance so important? When we conduct an ANOVA test, we examine the plausibility of a null hypothesis, a straw-man hypothesis that we may end up rejecting. Under this hypothesis we assume not only that all group means are
43,921
Why is homogeneity of variance so important?
Within regression models homogeneity of variance of the residuals relative to the estimates, referred to as homoskedasticity, is a key underlying assumption of linear regression. If such residuals are not deemed homoskedastic but heteroskedastic (variance changes over observations instead of remaining roughly constant), the calculated statistical significance of your independent variables are invalid (t stat and P value are inaccurate). So, your whole selection of independent variables is questionable. So, you have to test whether such residuals are homoskedastic or heteroskedastic using the Breusch-Pagan test or the White test. If they are heteroskedastic, you have to calculate White standard errors (robust standard errors of regression coefficients adjusted for heteroskedasticity). Now, using those robust standard errors you can recalculate the statistical significance (p value) of those regression coefficients. Another alternative is to rerun your multiple regression model using a weighted least square regression (WLS) that will resolve the heteroskedasticity issue. From what I gather, calculating robust standard errors (White) is somewhat preferred to WLS regression because with the former you maintain the original coefficient and the causal meaning of your model. With the latter you don't. The meaning of your model can be somewhat altered and much more complicated to interpret. In short, homogeneity of variance is key because otherwise you just don't know if the independent variables you have selected within your multiple regression model are statistically significant.
Why is homogeneity of variance so important?
Within regression models homogeneity of variance of the residuals relative to the estimates, referred to as homoskedasticity, is a key underlying assumption of linear regression. If such residuals ar
Why is homogeneity of variance so important? Within regression models homogeneity of variance of the residuals relative to the estimates, referred to as homoskedasticity, is a key underlying assumption of linear regression. If such residuals are not deemed homoskedastic but heteroskedastic (variance changes over observations instead of remaining roughly constant), the calculated statistical significance of your independent variables are invalid (t stat and P value are inaccurate). So, your whole selection of independent variables is questionable. So, you have to test whether such residuals are homoskedastic or heteroskedastic using the Breusch-Pagan test or the White test. If they are heteroskedastic, you have to calculate White standard errors (robust standard errors of regression coefficients adjusted for heteroskedasticity). Now, using those robust standard errors you can recalculate the statistical significance (p value) of those regression coefficients. Another alternative is to rerun your multiple regression model using a weighted least square regression (WLS) that will resolve the heteroskedasticity issue. From what I gather, calculating robust standard errors (White) is somewhat preferred to WLS regression because with the former you maintain the original coefficient and the causal meaning of your model. With the latter you don't. The meaning of your model can be somewhat altered and much more complicated to interpret. In short, homogeneity of variance is key because otherwise you just don't know if the independent variables you have selected within your multiple regression model are statistically significant.
Why is homogeneity of variance so important? Within regression models homogeneity of variance of the residuals relative to the estimates, referred to as homoskedasticity, is a key underlying assumption of linear regression. If such residuals ar
43,922
Is cross-validation the most important measure of a predictive model's effectiveness?
A good reason not to do this is that the cross-validation estimator has a finite variance, so if you evaluate it on many choices of input variables you will end up with a set that explains the data you have well, but will generalise poorly as it has effectively learned the noise that is particular to that dataset. The more choices you investigate, the worse the problem gets. Often you end up with a worse predictor than a regularised model, with all the features, such as ridge regression. So if you are interested in predictive performance, don't perform feature selection at all, instead use regularisation. This is the advice given in Millar's monograph on subset selection in regression, and in my experience, he is right.
Is cross-validation the most important measure of a predictive model's effectiveness?
A good reason not to do this is that the cross-validation estimator has a finite variance, so if you evaluate it on many choices of input variables you will end up with a set that explains the data yo
Is cross-validation the most important measure of a predictive model's effectiveness? A good reason not to do this is that the cross-validation estimator has a finite variance, so if you evaluate it on many choices of input variables you will end up with a set that explains the data you have well, but will generalise poorly as it has effectively learned the noise that is particular to that dataset. The more choices you investigate, the worse the problem gets. Often you end up with a worse predictor than a regularised model, with all the features, such as ridge regression. So if you are interested in predictive performance, don't perform feature selection at all, instead use regularisation. This is the advice given in Millar's monograph on subset selection in regression, and in my experience, he is right.
Is cross-validation the most important measure of a predictive model's effectiveness? A good reason not to do this is that the cross-validation estimator has a finite variance, so if you evaluate it on many choices of input variables you will end up with a set that explains the data yo
43,923
Is cross-validation the most important measure of a predictive model's effectiveness?
I would personally favor cross-validated score evaluation because: it is easily interpretable by the analyst provided that the underlying score function (accuracy, f1-score, RMSE...) is interpretable too, it gives an idea of the uncertainty by looking at the stdev of the score values across CV folds, it gives a way to decompose the error into bias (error measured on train folds) and variance (difference of errors measured on train and test folds). Model size is not a factor with the computing power This is not always true: deep learning machine learning models for instance have a model size that is often limited by the hardware (typically the amount of RAM on the GPU card).
Is cross-validation the most important measure of a predictive model's effectiveness?
I would personally favor cross-validated score evaluation because: it is easily interpretable by the analyst provided that the underlying score function (accuracy, f1-score, RMSE...) is interpretable
Is cross-validation the most important measure of a predictive model's effectiveness? I would personally favor cross-validated score evaluation because: it is easily interpretable by the analyst provided that the underlying score function (accuracy, f1-score, RMSE...) is interpretable too, it gives an idea of the uncertainty by looking at the stdev of the score values across CV folds, it gives a way to decompose the error into bias (error measured on train folds) and variance (difference of errors measured on train and test folds). Model size is not a factor with the computing power This is not always true: deep learning machine learning models for instance have a model size that is often limited by the hardware (typically the amount of RAM on the GPU card).
Is cross-validation the most important measure of a predictive model's effectiveness? I would personally favor cross-validated score evaluation because: it is easily interpretable by the analyst provided that the underlying score function (accuracy, f1-score, RMSE...) is interpretable
43,924
Is cross-validation the most important measure of a predictive model's effectiveness?
Two scenarios spring to mind where you wouldn't want to just run iterations of all possible models: Your model is in a clinical setting. For example, a nurse takes some measurements and uses it to predict something. If you include every possible covariate, then you are more likely to get missing values. Especially if some of the covariates require sensitive information. In your model, $p>> n$, however, your covariates can be "grouped". For example, one set of covariates could be "lifestyle", another could be socio-economic class. It might be better to try and select a few variables from each group.
Is cross-validation the most important measure of a predictive model's effectiveness?
Two scenarios spring to mind where you wouldn't want to just run iterations of all possible models: Your model is in a clinical setting. For example, a nurse takes some measurements and uses it to pr
Is cross-validation the most important measure of a predictive model's effectiveness? Two scenarios spring to mind where you wouldn't want to just run iterations of all possible models: Your model is in a clinical setting. For example, a nurse takes some measurements and uses it to predict something. If you include every possible covariate, then you are more likely to get missing values. Especially if some of the covariates require sensitive information. In your model, $p>> n$, however, your covariates can be "grouped". For example, one set of covariates could be "lifestyle", another could be socio-economic class. It might be better to try and select a few variables from each group.
Is cross-validation the most important measure of a predictive model's effectiveness? Two scenarios spring to mind where you wouldn't want to just run iterations of all possible models: Your model is in a clinical setting. For example, a nurse takes some measurements and uses it to pr
43,925
Should the alternative hypothesis always be the research hypothesis?
I would say that the "alternative hypothesis" is usually NOT a "proposed hypothesis". You do not define "proposed hypothesis" and it is not a common phrase. Presumably you mean that it is either a statistical hypothesis or it is a scientific hypothesis. They are usually quite different things. A scientific hypothesis usually concerns a something to do with the true state of the real world, whereas a statistical hypothesis concerns only conditions within a statistical model. It is very common for the real world to be more complicated and less well-defined than a statistical model and so inferences regarding a statistical hypothesis will need to be thoughtfully extrapolated to become relevant to a scientific hypothesis. For your example a scientific hypothesis concerning the two drugs in question might be something like 'drug x can be substituted for drug y without any noticeable change in results experienced by the patients'. A relevant statistical hypothesis would be much more restricted along the lines of 'drug x and drug y have similar potencies' or that 'drug x and drug y have similar durations of action' or maybe 'doses of drug x and drug y can be found where they have similar effects'. Of course, the required degree of similarity and the assays used for evaluation of the statistical hypothesis will have to be defined. Apart from the enormous differences in scope of the scientific and potential statistical hypotheses, the first may require several or all of the others to be true. If you want to know if a hypothesis is a statistical hypothesis then if it concerns the value of a parameter within a statistical model or can be restated as being about a parameter value, then it is. Now, the "alternative hypothesis". For the hypothesis testing framework there are two things that are commonly called 'alternative hypotheses'. The first is an arbitrary effect size that is used in the pre-data calculation of test power (usually for sample size determination). That alternative hypothesis is ONLY relevant before the data are in hand. Once you have the data the arbitrarily specified effect size loses its relevance because the observed effect size is known. When you perform the hypothesis test the effective alternative becomes nothing more than 'not the null'. It is a bad mistake to assume that a rejection of the null hypothesis in a hypothesis test leads to the acceptance of the pre-data alternative hypothesis, and it is just about as bad to assume that it leads to the acceptance of the observed effect size as a true hypothesis. Of course, the hypothesis test framework is not the only statistical approach, and I would argue, it is not even the most relevant to the majority of scientific endeavours. If you use a likelihood ratio test then you can compare the data support for two specified parameter values within the statistical model and that means that you can do the same within a Bayesian framework.
Should the alternative hypothesis always be the research hypothesis?
I would say that the "alternative hypothesis" is usually NOT a "proposed hypothesis". You do not define "proposed hypothesis" and it is not a common phrase. Presumably you mean that it is either a sta
Should the alternative hypothesis always be the research hypothesis? I would say that the "alternative hypothesis" is usually NOT a "proposed hypothesis". You do not define "proposed hypothesis" and it is not a common phrase. Presumably you mean that it is either a statistical hypothesis or it is a scientific hypothesis. They are usually quite different things. A scientific hypothesis usually concerns a something to do with the true state of the real world, whereas a statistical hypothesis concerns only conditions within a statistical model. It is very common for the real world to be more complicated and less well-defined than a statistical model and so inferences regarding a statistical hypothesis will need to be thoughtfully extrapolated to become relevant to a scientific hypothesis. For your example a scientific hypothesis concerning the two drugs in question might be something like 'drug x can be substituted for drug y without any noticeable change in results experienced by the patients'. A relevant statistical hypothesis would be much more restricted along the lines of 'drug x and drug y have similar potencies' or that 'drug x and drug y have similar durations of action' or maybe 'doses of drug x and drug y can be found where they have similar effects'. Of course, the required degree of similarity and the assays used for evaluation of the statistical hypothesis will have to be defined. Apart from the enormous differences in scope of the scientific and potential statistical hypotheses, the first may require several or all of the others to be true. If you want to know if a hypothesis is a statistical hypothesis then if it concerns the value of a parameter within a statistical model or can be restated as being about a parameter value, then it is. Now, the "alternative hypothesis". For the hypothesis testing framework there are two things that are commonly called 'alternative hypotheses'. The first is an arbitrary effect size that is used in the pre-data calculation of test power (usually for sample size determination). That alternative hypothesis is ONLY relevant before the data are in hand. Once you have the data the arbitrarily specified effect size loses its relevance because the observed effect size is known. When you perform the hypothesis test the effective alternative becomes nothing more than 'not the null'. It is a bad mistake to assume that a rejection of the null hypothesis in a hypothesis test leads to the acceptance of the pre-data alternative hypothesis, and it is just about as bad to assume that it leads to the acceptance of the observed effect size as a true hypothesis. Of course, the hypothesis test framework is not the only statistical approach, and I would argue, it is not even the most relevant to the majority of scientific endeavours. If you use a likelihood ratio test then you can compare the data support for two specified parameter values within the statistical model and that means that you can do the same within a Bayesian framework.
Should the alternative hypothesis always be the research hypothesis? I would say that the "alternative hypothesis" is usually NOT a "proposed hypothesis". You do not define "proposed hypothesis" and it is not a common phrase. Presumably you mean that it is either a sta
43,926
Should the alternative hypothesis always be the research hypothesis?
The principle of statistical hypothesis tests, by definition, treats the null hypothesis H0 and the alternative H1 asymmetrically. This always needs to be taken into account. A test is able to tell you whether there is evidence against the null hypothesis in the direction of the alternative. It will never tell you that there is evidence against the alternative. The choice of the H0 determines what the test can do; it determines what the test can indicate against. I share @Michael Lew's reservations against a formal use of the term "proposed hypothesis", however let's assume for the following that you can translate your scientific research hypothesis into certain parameter values for a specified statistical model. Let's call this R. If you choose R as H0, you can find evidence against it, but not in its favour. This may not be what you want - although it isn't out of question. You may well wonder whether certain data contradict your R, in which case you can use it as H0, however this has no potential, even in case of non-rejection, to convince other people that R is correct. There is however a very reasonable scientific justification for using R as H0, which is that according to Popper in order to corroborate a scientific theory, you should try to falsify it, and the best corroboration comes from repeated attempts to falsify it (in a way in which it seems likely that the theory will be rejected if it is in fact false, which is what Mayo's "severity" concept is about). Apart from statistical error probabilities, this is what testing R as H0 actually allows to do, so there is a good reason for using R as H0. If you choose R as H1, you can find evidence against the H0, which is not normally quite what you want, unless you interpret evidence against H0 as evidence in favour of your H1, which isn't necessarily granted (model assumptions may be violated for both H0 and H1, so they may both technically be wrong, and rejecting H0 doesn't "statistically prove" H1), although many would interpret a test in this way. It has value only to the extent that somebody who opposes your R argues that H0 might be true (as in "your hypothesised real effect does not exist, it's all just due to random variation"). In this case a test with R as H1 has at least the potential to indicate strongly against that H0. You can even go on and say it'll give you evidence that H0 is violated "in the direction of H1", but as said before there may be other explanations for this than that H1 is actually true. Also, "the direction of H1" is rather imprecise and doesn't amount to any specific parameter value or it's surroundings. It may depend on the application area how important that is. A homeopath may be happy enough to significantly show that homeopathy does something good rather than having its effect explained by random variation only, regardless of how much good it actually does, however precise numerical theories in physics/engineering, say, can hardly be backed up by just rejecting a random variation alternative. The "equivalence testing" idea would amount to specifying a rather precise R (specific parameter value and small neighbourhood) as H1 and potentially rejecting a much bigger part of the parameter space on both sides of R. This would then be more informative, but has still the same issue with model assumptions, i.e., H0 and H1 may both be wrong. (Obviously model assumption diagnoses may help to some extent. Also even if neither H0 nor H1 is true, arguably some more distributions can be seen as "interpretatively equivalent" with them, e.g., two equal non-normal distributions in a two-sample setup where a normality-based test is applied, and actually may work well due to the Central Limit Theorem even for many non-normal distributions.) So basically you need to choose what kind of statement you want to allow your test to back up. Choose R as H0 and the data can only reject it. Choose R as H1 and the data can reject the H0, and how valuable that is depends on the situation (particularly on how realistic the H0 looks as a competitor; i.e., how informative it actually is to reject it). The equivalence test setup is special by allowing you to use a rather precise R as H1 and reject a big H0, so the difference between this and rejecting a "random variation/no effect" H0 regards the precise or imprecise nature of the research hypothesis R to be tested.
Should the alternative hypothesis always be the research hypothesis?
The principle of statistical hypothesis tests, by definition, treats the null hypothesis H0 and the alternative H1 asymmetrically. This always needs to be taken into account. A test is able to tell yo
Should the alternative hypothesis always be the research hypothesis? The principle of statistical hypothesis tests, by definition, treats the null hypothesis H0 and the alternative H1 asymmetrically. This always needs to be taken into account. A test is able to tell you whether there is evidence against the null hypothesis in the direction of the alternative. It will never tell you that there is evidence against the alternative. The choice of the H0 determines what the test can do; it determines what the test can indicate against. I share @Michael Lew's reservations against a formal use of the term "proposed hypothesis", however let's assume for the following that you can translate your scientific research hypothesis into certain parameter values for a specified statistical model. Let's call this R. If you choose R as H0, you can find evidence against it, but not in its favour. This may not be what you want - although it isn't out of question. You may well wonder whether certain data contradict your R, in which case you can use it as H0, however this has no potential, even in case of non-rejection, to convince other people that R is correct. There is however a very reasonable scientific justification for using R as H0, which is that according to Popper in order to corroborate a scientific theory, you should try to falsify it, and the best corroboration comes from repeated attempts to falsify it (in a way in which it seems likely that the theory will be rejected if it is in fact false, which is what Mayo's "severity" concept is about). Apart from statistical error probabilities, this is what testing R as H0 actually allows to do, so there is a good reason for using R as H0. If you choose R as H1, you can find evidence against the H0, which is not normally quite what you want, unless you interpret evidence against H0 as evidence in favour of your H1, which isn't necessarily granted (model assumptions may be violated for both H0 and H1, so they may both technically be wrong, and rejecting H0 doesn't "statistically prove" H1), although many would interpret a test in this way. It has value only to the extent that somebody who opposes your R argues that H0 might be true (as in "your hypothesised real effect does not exist, it's all just due to random variation"). In this case a test with R as H1 has at least the potential to indicate strongly against that H0. You can even go on and say it'll give you evidence that H0 is violated "in the direction of H1", but as said before there may be other explanations for this than that H1 is actually true. Also, "the direction of H1" is rather imprecise and doesn't amount to any specific parameter value or it's surroundings. It may depend on the application area how important that is. A homeopath may be happy enough to significantly show that homeopathy does something good rather than having its effect explained by random variation only, regardless of how much good it actually does, however precise numerical theories in physics/engineering, say, can hardly be backed up by just rejecting a random variation alternative. The "equivalence testing" idea would amount to specifying a rather precise R (specific parameter value and small neighbourhood) as H1 and potentially rejecting a much bigger part of the parameter space on both sides of R. This would then be more informative, but has still the same issue with model assumptions, i.e., H0 and H1 may both be wrong. (Obviously model assumption diagnoses may help to some extent. Also even if neither H0 nor H1 is true, arguably some more distributions can be seen as "interpretatively equivalent" with them, e.g., two equal non-normal distributions in a two-sample setup where a normality-based test is applied, and actually may work well due to the Central Limit Theorem even for many non-normal distributions.) So basically you need to choose what kind of statement you want to allow your test to back up. Choose R as H0 and the data can only reject it. Choose R as H1 and the data can reject the H0, and how valuable that is depends on the situation (particularly on how realistic the H0 looks as a competitor; i.e., how informative it actually is to reject it). The equivalence test setup is special by allowing you to use a rather precise R as H1 and reject a big H0, so the difference between this and rejecting a "random variation/no effect" H0 regards the precise or imprecise nature of the research hypothesis R to be tested.
Should the alternative hypothesis always be the research hypothesis? The principle of statistical hypothesis tests, by definition, treats the null hypothesis H0 and the alternative H1 asymmetrically. This always needs to be taken into account. A test is able to tell yo
43,927
Should the alternative hypothesis always be the research hypothesis?
In this case there should be the equality as an alternative hypothesis and therefore the difference as an null hypothesis? Hypothesis testing works well when a particular hypothesis makes a precise prediction. Like the observed value is likely equal or above/below some value. Hypothesis testing is about making predictions based on a theory and observing whether those predictions come true. If you would have a hypothesis that drug X and Y are unequal, then you would have an untestable theory. Given some differences between the populations of X and Y, whether that difference is zero or not, in nearly any circumstances the observations of samples from X and Y will be different anyway, independent from the hypothesis whether or not X and Y similar distributions. (and even when samples from X and Y are observed to be equal, then this might not be significant as the difference can be as small as we like, making the observation of equal samples not anything special that falsifies the hypothesis) Test of equivalence However what would be possible is a test of equivalence, which relates to a hypothesis that the mean difference between X and Y is between some small range. Then, observing a larger range could falsify that hypothesis. So the 'alternative hypothesis' can be used as the null hypothesis. But, it needs to be expressed in a form that restricts the observations. The hypothesis 'X ≠ Y' doesn't do that. However a limit on the difference '|X-Y| < a' is a testible theory/hypothesis. Confidence interval Another popular alternative to null hypothesis testing is to present confidence intervals. The confidence interval can be seen as the range of hypothetical parameter values that pass a null hypothesis test where the hypothetical value is the null hypothesis. Related: Why are standard frequentist hypotheses so uninteresting?
Should the alternative hypothesis always be the research hypothesis?
In this case there should be the equality as an alternative hypothesis and therefore the difference as an null hypothesis? Hypothesis testing works well when a particular hypothesis makes a precise p
Should the alternative hypothesis always be the research hypothesis? In this case there should be the equality as an alternative hypothesis and therefore the difference as an null hypothesis? Hypothesis testing works well when a particular hypothesis makes a precise prediction. Like the observed value is likely equal or above/below some value. Hypothesis testing is about making predictions based on a theory and observing whether those predictions come true. If you would have a hypothesis that drug X and Y are unequal, then you would have an untestable theory. Given some differences between the populations of X and Y, whether that difference is zero or not, in nearly any circumstances the observations of samples from X and Y will be different anyway, independent from the hypothesis whether or not X and Y similar distributions. (and even when samples from X and Y are observed to be equal, then this might not be significant as the difference can be as small as we like, making the observation of equal samples not anything special that falsifies the hypothesis) Test of equivalence However what would be possible is a test of equivalence, which relates to a hypothesis that the mean difference between X and Y is between some small range. Then, observing a larger range could falsify that hypothesis. So the 'alternative hypothesis' can be used as the null hypothesis. But, it needs to be expressed in a form that restricts the observations. The hypothesis 'X ≠ Y' doesn't do that. However a limit on the difference '|X-Y| < a' is a testible theory/hypothesis. Confidence interval Another popular alternative to null hypothesis testing is to present confidence intervals. The confidence interval can be seen as the range of hypothetical parameter values that pass a null hypothesis test where the hypothetical value is the null hypothesis. Related: Why are standard frequentist hypotheses so uninteresting?
Should the alternative hypothesis always be the research hypothesis? In this case there should be the equality as an alternative hypothesis and therefore the difference as an null hypothesis? Hypothesis testing works well when a particular hypothesis makes a precise p
43,928
Should the alternative hypothesis always be the research hypothesis?
@Dave gave me a light about the question and told me about the equivalence test, explained here. The hypothesis test for equivalence can be written as follows: H0: The difference between the two group means is outside the equivalence interval H1: The difference between the two group means is inside the equivalence interval However, I study this question deeply in the last days in many textbooks and other sources. There is no consensus of all statistics on this issue. I found several divergent opinions. The divergence happens more relative to the debate if the alternative hypothesis is always complementary to the null hypothesis, or is not. I, for my part, find it much more logical to consider the null and alternative hypothesis as perfectly complementary. This, this and this (sources linked to universities) agree with me. As stated in the referred link, if there is a gray zone, which is neither included in the alternative hypothesis nor in the zero hypothesis.In this case, rejecting the null hypothesis no longer serves conceptually to help highlight the alternative hypothesis, it may merely mean that we are in the gray zone. For me there is no point in thinking that way. However, almost all experts agrees that the null hypothesis always should contain '=' operator ("<=", "=" or ">="). See, for instance, here, here and here, sources linked to universities, adopt this line of thought. And I understand why. Always have '=' in the null hypothesis, it creates a certain standardization of statistical methodologies that could reject this equality. It would be very confusing to have to deal with an alternative hypothesis that could contain equality. If we accept that null and the alternative hypothesis is the complement (">","≠" or "<", respectively) in a exhaustive way. Sometimes the researcher believes in the alternative hypothesis, sometimes don't. This applies to the hypothetical situation that I've created, if we suppose the research hypothesis does not necessarily align with the researcher's beliefs. In this context, the alternative hypothesis it would be the hypothesis that "challenges" the null hypothesis, in the sense of finding out if the study has statistically evidence regarded as sufficient to reject it. Addendum: 2 textbooks as an example 1) Understandable Statistics - Brase, Brase -10th edition - 2012 ...Any hypothesis that differs from the null hypothesis is called an alternate hypothesis... pg 411 In statistical testing, the null hypothesis H0 always contains the equals symbol. pg. 412 It agrees with this 2 claims (null hypothesis should contains '=' and null hypothesis and alternative hypothesis are complementary) 2) Statistics - James McClave, Terry Sincich - 13th edition - 2018 ...While alternative hypotheses are always specified as strict inequalities, such as μ < 2,400, μ > 2,400, or μ ≠ 2,400, null hypotheses are usually specified as equalities, such as μ = 2,400. Even when the null hypothesis is an inequality, such as μ ≤ 2,400, we specify H0: μ = 2,400, reasoning that if sufficient evidence exists to show that Ha:μ > 2,400 is true when tested against H0: m = 2,400, then surely sufficient evidence exists to reject μ < 2,400 as well... pg 403 It agrees with that Ho should contain '=' operator, but works with a "hole" in hypothesis space. However, looking at the text, it's clear that it's irrelevant.
Should the alternative hypothesis always be the research hypothesis?
@Dave gave me a light about the question and told me about the equivalence test, explained here. The hypothesis test for equivalence can be written as follows: H0: The difference between the two group
Should the alternative hypothesis always be the research hypothesis? @Dave gave me a light about the question and told me about the equivalence test, explained here. The hypothesis test for equivalence can be written as follows: H0: The difference between the two group means is outside the equivalence interval H1: The difference between the two group means is inside the equivalence interval However, I study this question deeply in the last days in many textbooks and other sources. There is no consensus of all statistics on this issue. I found several divergent opinions. The divergence happens more relative to the debate if the alternative hypothesis is always complementary to the null hypothesis, or is not. I, for my part, find it much more logical to consider the null and alternative hypothesis as perfectly complementary. This, this and this (sources linked to universities) agree with me. As stated in the referred link, if there is a gray zone, which is neither included in the alternative hypothesis nor in the zero hypothesis.In this case, rejecting the null hypothesis no longer serves conceptually to help highlight the alternative hypothesis, it may merely mean that we are in the gray zone. For me there is no point in thinking that way. However, almost all experts agrees that the null hypothesis always should contain '=' operator ("<=", "=" or ">="). See, for instance, here, here and here, sources linked to universities, adopt this line of thought. And I understand why. Always have '=' in the null hypothesis, it creates a certain standardization of statistical methodologies that could reject this equality. It would be very confusing to have to deal with an alternative hypothesis that could contain equality. If we accept that null and the alternative hypothesis is the complement (">","≠" or "<", respectively) in a exhaustive way. Sometimes the researcher believes in the alternative hypothesis, sometimes don't. This applies to the hypothetical situation that I've created, if we suppose the research hypothesis does not necessarily align with the researcher's beliefs. In this context, the alternative hypothesis it would be the hypothesis that "challenges" the null hypothesis, in the sense of finding out if the study has statistically evidence regarded as sufficient to reject it. Addendum: 2 textbooks as an example 1) Understandable Statistics - Brase, Brase -10th edition - 2012 ...Any hypothesis that differs from the null hypothesis is called an alternate hypothesis... pg 411 In statistical testing, the null hypothesis H0 always contains the equals symbol. pg. 412 It agrees with this 2 claims (null hypothesis should contains '=' and null hypothesis and alternative hypothesis are complementary) 2) Statistics - James McClave, Terry Sincich - 13th edition - 2018 ...While alternative hypotheses are always specified as strict inequalities, such as μ < 2,400, μ > 2,400, or μ ≠ 2,400, null hypotheses are usually specified as equalities, such as μ = 2,400. Even when the null hypothesis is an inequality, such as μ ≤ 2,400, we specify H0: μ = 2,400, reasoning that if sufficient evidence exists to show that Ha:μ > 2,400 is true when tested against H0: m = 2,400, then surely sufficient evidence exists to reject μ < 2,400 as well... pg 403 It agrees with that Ho should contain '=' operator, but works with a "hole" in hypothesis space. However, looking at the text, it's clear that it's irrelevant.
Should the alternative hypothesis always be the research hypothesis? @Dave gave me a light about the question and told me about the equivalence test, explained here. The hypothesis test for equivalence can be written as follows: H0: The difference between the two group
43,929
Should the alternative hypothesis always be the research hypothesis?
We generally assume as the null hypotheses as an old orthodox belief as true even though we do not have sufficient proof of its truth. and Alternate Hypothesis H1 as a new radical belief that is challenging our old system of belief. So we need a great level of effort to reject our old belief H0. We will need a high degree of confidence in H1 to dismantle our old traditional beliefs. Lets understand this by example. Aristotle's view of solar system For nearly 1,000 years, Aristotle’s view of a stationary Earth at the center of a revolving universe dominated natural philosophy In old times we believed that sun revolves around earth consider this as our old traditional orthodox belief => Null Hypothesis {We will try very hard to stick to this belief} “We revolve around the Sun like any other planet.” —Nicolaus Copernicus Our new radical claim is that earth revolves around the sun. => Alternate Hypothesis H1. So whichever drug company you work in X or Y you will assume your company's drug(H0) is better than the competitor(H1) Reference NASA Reference Georgia Tech course EDX.org Note:- Please correct me if I am wrong I am just a student trying to learn Thanks
Should the alternative hypothesis always be the research hypothesis?
We generally assume as the null hypotheses as an old orthodox belief as true even though we do not have sufficient proof of its truth. and Alternate Hypothesis H1 as a new radical belief that is chall
Should the alternative hypothesis always be the research hypothesis? We generally assume as the null hypotheses as an old orthodox belief as true even though we do not have sufficient proof of its truth. and Alternate Hypothesis H1 as a new radical belief that is challenging our old system of belief. So we need a great level of effort to reject our old belief H0. We will need a high degree of confidence in H1 to dismantle our old traditional beliefs. Lets understand this by example. Aristotle's view of solar system For nearly 1,000 years, Aristotle’s view of a stationary Earth at the center of a revolving universe dominated natural philosophy In old times we believed that sun revolves around earth consider this as our old traditional orthodox belief => Null Hypothesis {We will try very hard to stick to this belief} “We revolve around the Sun like any other planet.” —Nicolaus Copernicus Our new radical claim is that earth revolves around the sun. => Alternate Hypothesis H1. So whichever drug company you work in X or Y you will assume your company's drug(H0) is better than the competitor(H1) Reference NASA Reference Georgia Tech course EDX.org Note:- Please correct me if I am wrong I am just a student trying to learn Thanks
Should the alternative hypothesis always be the research hypothesis? We generally assume as the null hypotheses as an old orthodox belief as true even though we do not have sufficient proof of its truth. and Alternate Hypothesis H1 as a new radical belief that is chall
43,930
PDF does not integrate to 1 - where is my mistake?
As pointed out in comments, the range of integration in your integral does not match the listed support of the random variable (which is $\mu \leqslant x < \infty$). Start by correcting the expression for your density, with explicit statement of the support: $$f(x) = \begin{cases} \frac{2n}{\mu} \Big( \frac{\mu}{x} \Big)^{2n+1} & & & \text{for } x \geqslant \mu, \\[6pt] 0 & & & \text{otherwise}. \\[6pt] \end{cases}$$ Now correct your integral: $$\begin{align} \int \limits_{-\infty}^\infty f(x) \ dx &= \int \limits_{-\infty}^\mu 0 \ dx + \int \limits_{\mu}^\infty \frac{2n}{\mu} \Big( \frac{\mu}{x} \Big)^{2n+1} \ dx \\[6pt] &= 2n \mu^{2n} \int \limits_{\mu}^\infty x^{-2n-1} \ dx \\[6pt] &= 2n \mu^{2n} \bigg[ -\frac{x^{-2n}}{2n} \bigg]_{x = \mu}^{x \rightarrow \infty} \\[6pt] &= 2n \mu^{2n} \bigg[ 0 - \Big( -\frac{\mu^{-2n}}{2n} \Big) \bigg] \\[6pt] &= 2n \mu^{2n} \cdot \frac{\mu^{-2n}}{2n} \\[12pt] &= 1. \\[6pt] \end{align}$$
PDF does not integrate to 1 - where is my mistake?
As pointed out in comments, the range of integration in your integral does not match the listed support of the random variable (which is $\mu \leqslant x < \infty$). Start by correcting the expressio
PDF does not integrate to 1 - where is my mistake? As pointed out in comments, the range of integration in your integral does not match the listed support of the random variable (which is $\mu \leqslant x < \infty$). Start by correcting the expression for your density, with explicit statement of the support: $$f(x) = \begin{cases} \frac{2n}{\mu} \Big( \frac{\mu}{x} \Big)^{2n+1} & & & \text{for } x \geqslant \mu, \\[6pt] 0 & & & \text{otherwise}. \\[6pt] \end{cases}$$ Now correct your integral: $$\begin{align} \int \limits_{-\infty}^\infty f(x) \ dx &= \int \limits_{-\infty}^\mu 0 \ dx + \int \limits_{\mu}^\infty \frac{2n}{\mu} \Big( \frac{\mu}{x} \Big)^{2n+1} \ dx \\[6pt] &= 2n \mu^{2n} \int \limits_{\mu}^\infty x^{-2n-1} \ dx \\[6pt] &= 2n \mu^{2n} \bigg[ -\frac{x^{-2n}}{2n} \bigg]_{x = \mu}^{x \rightarrow \infty} \\[6pt] &= 2n \mu^{2n} \bigg[ 0 - \Big( -\frac{\mu^{-2n}}{2n} \Big) \bigg] \\[6pt] &= 2n \mu^{2n} \cdot \frac{\mu^{-2n}}{2n} \\[12pt] &= 1. \\[6pt] \end{align}$$
PDF does not integrate to 1 - where is my mistake? As pointed out in comments, the range of integration in your integral does not match the listed support of the random variable (which is $\mu \leqslant x < \infty$). Start by correcting the expressio
43,931
Why use bar chart with error whiskers instead of box plot?
Realistically, the reason people do most of the things they do, is tradition / habit. 'Such-and-such is what I learned in graduate school, it's what I've always done, it's what everyone else in my field does, it's what reviewers / editors / readers will expect and understand readily.' Having said that, we can ask if there is any better justification for bar charts with error bars over boxplots. I agree that boxplots do show more information on the whole, but something can be said for bar charts: People are typically interested in group means. Bar charts display means directly. Boxplots, by default, do not display means, although they can be augmented to do so. People are typically interested in inferences about means. The error bars on bar charts, while they can be tricky in some cases, do display information that is relevant to the inference about the means. Boxplots, by default, do not, although they can be augmented to do so. People are not typically primarily interested in various quantiles. Boxplots make it easy to see the median and quartiles, and the minimum and maximum values. I think these are interesting, but they are typically not what researchers are theorizing about. Bar charts do not display this information, which people might consider extraneous and adding 'clutter' to the display. (I don't really agree with that take, but I'm well aware that many people hold it.) In short, bar charts display what most end users want to see, and not what they don't. It's the opposite for boxplots, although I do wish these attitudes were less prevalent.
Why use bar chart with error whiskers instead of box plot?
Realistically, the reason people do most of the things they do, is tradition / habit. 'Such-and-such is what I learned in graduate school, it's what I've always done, it's what everyone else in my fi
Why use bar chart with error whiskers instead of box plot? Realistically, the reason people do most of the things they do, is tradition / habit. 'Such-and-such is what I learned in graduate school, it's what I've always done, it's what everyone else in my field does, it's what reviewers / editors / readers will expect and understand readily.' Having said that, we can ask if there is any better justification for bar charts with error bars over boxplots. I agree that boxplots do show more information on the whole, but something can be said for bar charts: People are typically interested in group means. Bar charts display means directly. Boxplots, by default, do not display means, although they can be augmented to do so. People are typically interested in inferences about means. The error bars on bar charts, while they can be tricky in some cases, do display information that is relevant to the inference about the means. Boxplots, by default, do not, although they can be augmented to do so. People are not typically primarily interested in various quantiles. Boxplots make it easy to see the median and quartiles, and the minimum and maximum values. I think these are interesting, but they are typically not what researchers are theorizing about. Bar charts do not display this information, which people might consider extraneous and adding 'clutter' to the display. (I don't really agree with that take, but I'm well aware that many people hold it.) In short, bar charts display what most end users want to see, and not what they don't. It's the opposite for boxplots, although I do wish these attitudes were less prevalent.
Why use bar chart with error whiskers instead of box plot? Realistically, the reason people do most of the things they do, is tradition / habit. 'Such-and-such is what I learned in graduate school, it's what I've always done, it's what everyone else in my fi
43,932
Why use bar chart with error whiskers instead of box plot?
Personally, I have never encountered a good use case for bar plots and think it's mostly inertia in some fields that leads to their continued use. If you like Tufte's ideas about data-ink ratios, it's clear that they take up far too much plot area to convey quite little information. All the information in the bar can be communicated with a point. One-sided error bars also don't offer much leeway for communicating asymmetric errors/confidence intervals. Two-way error bars are less clear because of overlap with the bar itself. Since the information is contained in the height, you need to be especially careful about the starting value and the scale for the Y-axis. I'd say that starting at zero and linear scales are generally more important for easy and intuitive interpretation of barplots than alternatives such as dot charts. There's probably one feature that supporters would claim makes them superior, which is the ability to use shading/texture in the bar to distinguish between categories. I don't think this is a particularly strong point, but it's the only defence I can think of. That said, in many circumstances, they are not actively harmful and non-statisticians seem to find them visually appealing, so they tend to persist. I would add that though boxplots communicate more information, they also have weaknesses and can sometimes mislead. If you're summarising just a few data points, it's better to just plot the raw data, possibly with some jittering or transparency. Other options include histograms, violin plots, and dot charts/beeswarm plots.
Why use bar chart with error whiskers instead of box plot?
Personally, I have never encountered a good use case for bar plots and think it's mostly inertia in some fields that leads to their continued use. If you like Tufte's ideas about data-ink ratios, it'
Why use bar chart with error whiskers instead of box plot? Personally, I have never encountered a good use case for bar plots and think it's mostly inertia in some fields that leads to their continued use. If you like Tufte's ideas about data-ink ratios, it's clear that they take up far too much plot area to convey quite little information. All the information in the bar can be communicated with a point. One-sided error bars also don't offer much leeway for communicating asymmetric errors/confidence intervals. Two-way error bars are less clear because of overlap with the bar itself. Since the information is contained in the height, you need to be especially careful about the starting value and the scale for the Y-axis. I'd say that starting at zero and linear scales are generally more important for easy and intuitive interpretation of barplots than alternatives such as dot charts. There's probably one feature that supporters would claim makes them superior, which is the ability to use shading/texture in the bar to distinguish between categories. I don't think this is a particularly strong point, but it's the only defence I can think of. That said, in many circumstances, they are not actively harmful and non-statisticians seem to find them visually appealing, so they tend to persist. I would add that though boxplots communicate more information, they also have weaknesses and can sometimes mislead. If you're summarising just a few data points, it's better to just plot the raw data, possibly with some jittering or transparency. Other options include histograms, violin plots, and dot charts/beeswarm plots.
Why use bar chart with error whiskers instead of box plot? Personally, I have never encountered a good use case for bar plots and think it's mostly inertia in some fields that leads to their continued use. If you like Tufte's ideas about data-ink ratios, it'
43,933
Why use bar chart with error whiskers instead of box plot?
Boxplots (and violin plots, which I prefer because they convey more information, and the raw observations themselves) visualize observations and summary information of the observations. Barplots, as used in these communities, visualize parameter estimates. Typically, as in the example you give, the estimate is simply the group mean, so there actually is little difference, and the choice is down to a community's traditions and expectations. However, suppose there is one grouping factor, and also one numerical covariate. Boxplots or violin plots can plot the data and their means per group. But we would lose the information about the covariate. A simple way of giving a visual summary would be to plot three bars per group: one with the estimated response within the group with the covariate at its 25% quantile, one with the covariate at its median and one with the covariate at its 75%. In each case, we can also add a whisker to show the standard error of the estimate. Note that boxplots can't convey this kind of information. However, I would still say that a simple dot with whiskers would still be superior to the bar plot, if only because of the within-the-bar-bias that barplots induce. And in any case, one must note in the figure caption what the whiskers refer to - are they the estimate plus one standard error of the estimate (e.g., SEM), or plus two standard errors, or are they the standard deviation of the raw data being plotted, or what?
Why use bar chart with error whiskers instead of box plot?
Boxplots (and violin plots, which I prefer because they convey more information, and the raw observations themselves) visualize observations and summary information of the observations. Barplots, as u
Why use bar chart with error whiskers instead of box plot? Boxplots (and violin plots, which I prefer because they convey more information, and the raw observations themselves) visualize observations and summary information of the observations. Barplots, as used in these communities, visualize parameter estimates. Typically, as in the example you give, the estimate is simply the group mean, so there actually is little difference, and the choice is down to a community's traditions and expectations. However, suppose there is one grouping factor, and also one numerical covariate. Boxplots or violin plots can plot the data and their means per group. But we would lose the information about the covariate. A simple way of giving a visual summary would be to plot three bars per group: one with the estimated response within the group with the covariate at its 25% quantile, one with the covariate at its median and one with the covariate at its 75%. In each case, we can also add a whisker to show the standard error of the estimate. Note that boxplots can't convey this kind of information. However, I would still say that a simple dot with whiskers would still be superior to the bar plot, if only because of the within-the-bar-bias that barplots induce. And in any case, one must note in the figure caption what the whiskers refer to - are they the estimate plus one standard error of the estimate (e.g., SEM), or plus two standard errors, or are they the standard deviation of the raw data being plotted, or what?
Why use bar chart with error whiskers instead of box plot? Boxplots (and violin plots, which I prefer because they convey more information, and the raw observations themselves) visualize observations and summary information of the observations. Barplots, as u
43,934
Determining if difference is significant
You can do the chi-squared test and get a p-value. (I haven't done the test, so I don't know what the p-value is.) What you cannot do — without making a big assumption — is to claim that the feature increases the probability of conversion. It may be the case that users who were more likely to convert were also more likely to use the feature. In other words, the population of customers who use and don't use the feature may not the same. This conundrum illustrates why A/B tests are useful: by randomizing customers to use the feature or not, we make sure that those who have access to the feature are comparable (exchangeable) with those who do not and so we can draw conclusions about the feature's effectiveness to increase conversion.
Determining if difference is significant
You can do the chi-squared test and get a p-value. (I haven't done the test, so I don't know what the p-value is.) What you cannot do — without making a big assumption — is to claim that the feature i
Determining if difference is significant You can do the chi-squared test and get a p-value. (I haven't done the test, so I don't know what the p-value is.) What you cannot do — without making a big assumption — is to claim that the feature increases the probability of conversion. It may be the case that users who were more likely to convert were also more likely to use the feature. In other words, the population of customers who use and don't use the feature may not the same. This conundrum illustrates why A/B tests are useful: by randomizing customers to use the feature or not, we make sure that those who have access to the feature are comparable (exchangeable) with those who do not and so we can draw conclusions about the feature's effectiveness to increase conversion.
Determining if difference is significant You can do the chi-squared test and get a p-value. (I haven't done the test, so I don't know what the p-value is.) What you cannot do — without making a big assumption — is to claim that the feature i
43,935
Determining if difference is significant
If all the customers are independent (e.g. you don't have data on the same customer multiple encounters) then this is the classic 2 by 2 table that can be analyzed using a Chi-Squared test: https://en.wikipedia.org/wiki/Chi-squared_test.
Determining if difference is significant
If all the customers are independent (e.g. you don't have data on the same customer multiple encounters) then this is the classic 2 by 2 table that can be analyzed using a Chi-Squared test: https://en
Determining if difference is significant If all the customers are independent (e.g. you don't have data on the same customer multiple encounters) then this is the classic 2 by 2 table that can be analyzed using a Chi-Squared test: https://en.wikipedia.org/wiki/Chi-squared_test.
Determining if difference is significant If all the customers are independent (e.g. you don't have data on the same customer multiple encounters) then this is the classic 2 by 2 table that can be analyzed using a Chi-Squared test: https://en
43,936
Determining if difference is significant
Normally, testing involving two samples requires more complicated analysis than testing with one sample. But in this case, the sizes are so unbalanced that it's a reasonable approximation to just do an analysis on the smaller sample. We can take a null hypothesis that the smaller sample is from a Poisson distribution whose $\lambda$ is equal to the percentage of the large sample times the size of the small sample. That gives $0.029*20570=596.53$. This gives a p-value of 8.9%, which is not significant. You could also use a binomial distribution, which gives a p-value of 8.6%.
Determining if difference is significant
Normally, testing involving two samples requires more complicated analysis than testing with one sample. But in this case, the sizes are so unbalanced that it's a reasonable approximation to just do a
Determining if difference is significant Normally, testing involving two samples requires more complicated analysis than testing with one sample. But in this case, the sizes are so unbalanced that it's a reasonable approximation to just do an analysis on the smaller sample. We can take a null hypothesis that the smaller sample is from a Poisson distribution whose $\lambda$ is equal to the percentage of the large sample times the size of the small sample. That gives $0.029*20570=596.53$. This gives a p-value of 8.9%, which is not significant. You could also use a binomial distribution, which gives a p-value of 8.6%.
Determining if difference is significant Normally, testing involving two samples requires more complicated analysis than testing with one sample. But in this case, the sizes are so unbalanced that it's a reasonable approximation to just do a
43,937
Correlations - Pearson and Spearman
Pearson correlation depends on the values of the data; Spearman correlation depends only on their (marginal) ranks. Thus, the former is (far) more sensitive to outlying data. What kind of outlying data? Those with high leverage. These are far to the left or right of the rest of the points in a plot, as in the left panel in the figure. That isolated point at $(20,20)$ pulls the least-squares line close to it (for otherwise the squared penalty would be huge). As a result, the Pearson correlation (which is the standardized slope of this line) must be large and negative. However, that same point no longer has the same leverage in a plot of the ranks of the data: yes, it is off to the left again, but it cannot be far to the left. It pulls the least squares line up only a little. The Spearman correlation is large and positive, because the $30$ points already have high positive Spearman correlation and altering the value of one point cannot change those ranks all that much. Flip these pictures upside-down for an example of a switch from a large positive Pearson correlation to a large negative Spearman correlation. Fixing the rightmost 30 points along a line segment from $(-1,-1)$ to $(1,1),$ we may vary that outlying point $(a,-a)$ and plot the correlations as a function of $a.$ The black curve tracks the Pearson correlation. When $a=0,$ the point $(0,0)$ fits in perfectly with the other $30$ points and the both correlations are $1.$ But for extremely negative and positive values of $a,$ this leverage phenomenon occurs and the two correlation coefficients separate. The dotted red curve tracks the Spearman correlation, which stays high no matter what value $a$ might have. In the limit, the Pearson correlation can approach $-1.$ The Spearman correlation reaches a lower limiting value that depends only on the amount of data: in the figure, it's about $0.806.$ With sufficiently large datasets, the Spearman correlation will stay very close to $1.$ For instance, repeating this example with $300+1$ points rather than $30+1$ points, the Spearman coefficient is never less than $0.980.$ The gray (Pearson) and dotted blue (Spearman) curves show the situation with the $y$ values negated. Thus, by making $n$ sufficiently large and pulling just a single point away from a highly correlated dataset, you can make the two correlation coefficients as close to $\pm 1$ as you want, but with opposite signs.
Correlations - Pearson and Spearman
Pearson correlation depends on the values of the data; Spearman correlation depends only on their (marginal) ranks. Thus, the former is (far) more sensitive to outlying data. What kind of outlying da
Correlations - Pearson and Spearman Pearson correlation depends on the values of the data; Spearman correlation depends only on their (marginal) ranks. Thus, the former is (far) more sensitive to outlying data. What kind of outlying data? Those with high leverage. These are far to the left or right of the rest of the points in a plot, as in the left panel in the figure. That isolated point at $(20,20)$ pulls the least-squares line close to it (for otherwise the squared penalty would be huge). As a result, the Pearson correlation (which is the standardized slope of this line) must be large and negative. However, that same point no longer has the same leverage in a plot of the ranks of the data: yes, it is off to the left again, but it cannot be far to the left. It pulls the least squares line up only a little. The Spearman correlation is large and positive, because the $30$ points already have high positive Spearman correlation and altering the value of one point cannot change those ranks all that much. Flip these pictures upside-down for an example of a switch from a large positive Pearson correlation to a large negative Spearman correlation. Fixing the rightmost 30 points along a line segment from $(-1,-1)$ to $(1,1),$ we may vary that outlying point $(a,-a)$ and plot the correlations as a function of $a.$ The black curve tracks the Pearson correlation. When $a=0,$ the point $(0,0)$ fits in perfectly with the other $30$ points and the both correlations are $1.$ But for extremely negative and positive values of $a,$ this leverage phenomenon occurs and the two correlation coefficients separate. The dotted red curve tracks the Spearman correlation, which stays high no matter what value $a$ might have. In the limit, the Pearson correlation can approach $-1.$ The Spearman correlation reaches a lower limiting value that depends only on the amount of data: in the figure, it's about $0.806.$ With sufficiently large datasets, the Spearman correlation will stay very close to $1.$ For instance, repeating this example with $300+1$ points rather than $30+1$ points, the Spearman coefficient is never less than $0.980.$ The gray (Pearson) and dotted blue (Spearman) curves show the situation with the $y$ values negated. Thus, by making $n$ sufficiently large and pulling just a single point away from a highly correlated dataset, you can make the two correlation coefficients as close to $\pm 1$ as you want, but with opposite signs.
Correlations - Pearson and Spearman Pearson correlation depends on the values of the data; Spearman correlation depends only on their (marginal) ranks. Thus, the former is (far) more sensitive to outlying data. What kind of outlying da
43,938
Correlations - Pearson and Spearman
I know that Pearson correlation is sensitive to outliers, unlike Spearman correlation. There is a more striking difference between the two: Pearson assumes a linear relationship between the data, whereas Spearman checks whether it is simply monotonuous (see the image below, taken from Wikipedia). Generating data via a non-linear process is thus a way to show that these are not equivalent. A Spearman correlation of 1 results when the two variables being compared are monotonically related, even if their relationship is not linear. This means that all data points with greater x values than that of a given data point will have greater y values as well. In contrast, this does not give a perfect Pearson correlation.
Correlations - Pearson and Spearman
I know that Pearson correlation is sensitive to outliers, unlike Spearman correlation. There is a more striking difference between the two: Pearson assumes a linear relationship between the data, whe
Correlations - Pearson and Spearman I know that Pearson correlation is sensitive to outliers, unlike Spearman correlation. There is a more striking difference between the two: Pearson assumes a linear relationship between the data, whereas Spearman checks whether it is simply monotonuous (see the image below, taken from Wikipedia). Generating data via a non-linear process is thus a way to show that these are not equivalent. A Spearman correlation of 1 results when the two variables being compared are monotonically related, even if their relationship is not linear. This means that all data points with greater x values than that of a given data point will have greater y values as well. In contrast, this does not give a perfect Pearson correlation.
Correlations - Pearson and Spearman I know that Pearson correlation is sensitive to outliers, unlike Spearman correlation. There is a more striking difference between the two: Pearson assumes a linear relationship between the data, whe
43,939
Correlations - Pearson and Spearman
This is the basic idea. In this example Spearman's correlation is obviously 1, and Pearson's correlation is 0.65. You can generate "step data" that will look like almost a straight line, then add an outlier.
Correlations - Pearson and Spearman
This is the basic idea. In this example Spearman's correlation is obviously 1, and Pearson's correlation is 0.65. You can generate "step data" that will look like almost a straight line, then add an o
Correlations - Pearson and Spearman This is the basic idea. In this example Spearman's correlation is obviously 1, and Pearson's correlation is 0.65. You can generate "step data" that will look like almost a straight line, then add an outlier.
Correlations - Pearson and Spearman This is the basic idea. In this example Spearman's correlation is obviously 1, and Pearson's correlation is 0.65. You can generate "step data" that will look like almost a straight line, then add an o
43,940
Sample size calculation in COVID-19 study
A glib answer is that they probably just plugged their numbers into a power calculator. I've attached a screenshot re-creating this power analysis in G*Power 3.1, a freely available power calculator. Note to match their result of 621 I had to go to "Options" and select "Maximize Alpha". The paper says "We anticipated that illness compatible with Covid-19 would develop in 10% of close contacts exposed to Covid-19" as well as "50% relative effect size". I interpret the second part to mean they assume that the effect of treatment will reduce the illness rate from 10% to 5%. This leads to the values of $0.05$ and $0.1$ for Proportions p1 and p2 respectively. Sadly I don't know how G*Power makes this calculation, but I can attempt to explain the idea at least. We are given our proportions of 0.1 and 0.05. For a given sample size $n$, we can randomly sample a 2x2 contingency table by sampling from two binomial random variables. The power calculation asks, "how often will Fischer's Exact Test reject the null hypothesis for a contingency table created using this process?". In particular, we want to find the smallest $n$ such that Fischer's test will reject the null hypothesis at least 90% of the time. One way to approximate this is with simulation. For a given $n$, sample say 10,000 contingency tables, run Fischer's test, and see how often the p-value is below 0.05. Keep increasing $n$ until the p-value is below 0.05 90% of the time or more...
Sample size calculation in COVID-19 study
A glib answer is that they probably just plugged their numbers into a power calculator. I've attached a screenshot re-creating this power analysis in G*Power 3.1, a freely available power calculator.
Sample size calculation in COVID-19 study A glib answer is that they probably just plugged their numbers into a power calculator. I've attached a screenshot re-creating this power analysis in G*Power 3.1, a freely available power calculator. Note to match their result of 621 I had to go to "Options" and select "Maximize Alpha". The paper says "We anticipated that illness compatible with Covid-19 would develop in 10% of close contacts exposed to Covid-19" as well as "50% relative effect size". I interpret the second part to mean they assume that the effect of treatment will reduce the illness rate from 10% to 5%. This leads to the values of $0.05$ and $0.1$ for Proportions p1 and p2 respectively. Sadly I don't know how G*Power makes this calculation, but I can attempt to explain the idea at least. We are given our proportions of 0.1 and 0.05. For a given sample size $n$, we can randomly sample a 2x2 contingency table by sampling from two binomial random variables. The power calculation asks, "how often will Fischer's Exact Test reject the null hypothesis for a contingency table created using this process?". In particular, we want to find the smallest $n$ such that Fischer's test will reject the null hypothesis at least 90% of the time. One way to approximate this is with simulation. For a given $n$, sample say 10,000 contingency tables, run Fischer's test, and see how often the p-value is below 0.05. Keep increasing $n$ until the p-value is below 0.05 90% of the time or more...
Sample size calculation in COVID-19 study A glib answer is that they probably just plugged their numbers into a power calculator. I've attached a screenshot re-creating this power analysis in G*Power 3.1, a freely available power calculator.
43,941
Sample size calculation in COVID-19 study
I know I am several months late, but just want to respond to the other answers. All answers use simulations and/or claim the exact Fisher calculation is too computationally intensive. If you code this efficiently, you can get an exact computation very quickly. Below is a comparison time of the sample code fisherpower() function vs. the power.exact.test() function in the Exact R package: > system.time(power1 <- fisherpower(0.1,0.05,621)) user system elapsed 698.23 0.93 700.23 > system.time(power2 <- Exact::power.exact.test(n1=621, n2=621, p1=0.1, p2=0.05, method="Fisher")$power) user system elapsed 0.32 0.00 0.33 > power1 [1] 0.9076656 > power2 [1] 0.9076656 The calculation only takes 0.33s using power.exact.test() function compared with 700s using the fisherpower() function. Note the power.exact.test() function computes the exact power without simulations, so there's no uncertainty and it's faster than simulating. I also strongly recommend using Barnard's exact test over Fisher's exact test for comparing two proportions. Below is the power calculation as the group sample size increases: nGroup <- 570:630 powerFisher <- vapply(nGroup, FUN = function(xn) { Exact::power.exact.test(n1=xn, n2=xn, p1=0.1, p2=0.05, method="Fisher")$power }, numeric(1) ) powerBarnard <- vapply(nGroup, FUN = function(xn) { Exact::power.exact.test(n1=xn, n2=xn, p1=0.1, p2=0.05, method="Z-pooled")$power }, numeric(1) ) plot(NA, xlim=range(nGroup), ylim = c(0.85,0.95), xlab="Sample Size per Group", ylab = "Power") lines(nGroup, powerFisher, col='red', lwd=2) points(nGroup, powerFisher, pch = 21, col = 'red', bg = "red", cex = 0.8) lines(nGroup, powerBarnard, col='blue', lwd=2) points(nGroup, powerBarnard, pch = 21, col = 'blue', bg = "blue", cex = 0.8) abline(h=0.9, lty=2) abline(v=c(579, 606), col=c('blue', 'red')) legend(610, 0.875, c("Barnard", "Fisher"), col = c('blue', 'red'), lty = 1, pch=21, pt.bg=c('blue', 'red'), cex=1.2) @heropup is correct that the group sample size should be 606 (not 621) as shown in the figure. However, Barnard's test is more powerful and only requires 579 participants in each group using the "Z-pooled" test statistic. Since this is a rare event, one may want to use the Berger and Boos (1994) interval approach, which brings the sample size down to 573 participants (code not shown, takes some time). Importantly, these alternatives still control for the type 1 error rate and are simply superior to Fisher's exact test for 2x2 tables. For analyzing the dataset, I would recommend using Exact::exact.test() which takes only 0.3s for the example dataset that @SextusEmpiricus provided instead of Barnard::barnard.test() which takes 47s. However, both yield the same results and I am the maintainer of the Exact R package so may be biased.
Sample size calculation in COVID-19 study
I know I am several months late, but just want to respond to the other answers. All answers use simulations and/or claim the exact Fisher calculation is too computationally intensive. If you code th
Sample size calculation in COVID-19 study I know I am several months late, but just want to respond to the other answers. All answers use simulations and/or claim the exact Fisher calculation is too computationally intensive. If you code this efficiently, you can get an exact computation very quickly. Below is a comparison time of the sample code fisherpower() function vs. the power.exact.test() function in the Exact R package: > system.time(power1 <- fisherpower(0.1,0.05,621)) user system elapsed 698.23 0.93 700.23 > system.time(power2 <- Exact::power.exact.test(n1=621, n2=621, p1=0.1, p2=0.05, method="Fisher")$power) user system elapsed 0.32 0.00 0.33 > power1 [1] 0.9076656 > power2 [1] 0.9076656 The calculation only takes 0.33s using power.exact.test() function compared with 700s using the fisherpower() function. Note the power.exact.test() function computes the exact power without simulations, so there's no uncertainty and it's faster than simulating. I also strongly recommend using Barnard's exact test over Fisher's exact test for comparing two proportions. Below is the power calculation as the group sample size increases: nGroup <- 570:630 powerFisher <- vapply(nGroup, FUN = function(xn) { Exact::power.exact.test(n1=xn, n2=xn, p1=0.1, p2=0.05, method="Fisher")$power }, numeric(1) ) powerBarnard <- vapply(nGroup, FUN = function(xn) { Exact::power.exact.test(n1=xn, n2=xn, p1=0.1, p2=0.05, method="Z-pooled")$power }, numeric(1) ) plot(NA, xlim=range(nGroup), ylim = c(0.85,0.95), xlab="Sample Size per Group", ylab = "Power") lines(nGroup, powerFisher, col='red', lwd=2) points(nGroup, powerFisher, pch = 21, col = 'red', bg = "red", cex = 0.8) lines(nGroup, powerBarnard, col='blue', lwd=2) points(nGroup, powerBarnard, pch = 21, col = 'blue', bg = "blue", cex = 0.8) abline(h=0.9, lty=2) abline(v=c(579, 606), col=c('blue', 'red')) legend(610, 0.875, c("Barnard", "Fisher"), col = c('blue', 'red'), lty = 1, pch=21, pt.bg=c('blue', 'red'), cex=1.2) @heropup is correct that the group sample size should be 606 (not 621) as shown in the figure. However, Barnard's test is more powerful and only requires 579 participants in each group using the "Z-pooled" test statistic. Since this is a rare event, one may want to use the Berger and Boos (1994) interval approach, which brings the sample size down to 573 participants (code not shown, takes some time). Importantly, these alternatives still control for the type 1 error rate and are simply superior to Fisher's exact test for 2x2 tables. For analyzing the dataset, I would recommend using Exact::exact.test() which takes only 0.3s for the example dataset that @SextusEmpiricus provided instead of Barnard::barnard.test() which takes 47s. However, both yield the same results and I am the maintainer of the Exact R package so may be biased.
Sample size calculation in COVID-19 study I know I am several months late, but just want to respond to the other answers. All answers use simulations and/or claim the exact Fisher calculation is too computationally intensive. If you code th
43,942
Sample size calculation in COVID-19 study
They used Fisher's exact test, which relates to sampling without replacement. But in reality this is not exactly like that, and it is more like binomial distributed data. For that case you get the following: For the null hypothesis it is sampling where you have equal probabilities that the people get covid-19, no matter whether they are in the placebo group or the effect group. The alternative hypothesis, for which they computed the power, is that you have 10% probability for the placebo group to get covid-19 and 5% for the treatment group (so the treatment reduces probability by 50%). Exact computation of power You can compute the probability of rejecting the null hypothesis given certain sample sizes and probabilities simply by trying all possibilities and see which ones result in a negative/positive fisher's test. Then you sum over the probabilities to get the cases where you reject the test. $$P(\text{reject})= \sum_{\substack{\text{over all $i,j$} \\ \text{where Fisher test is rejected}}} P(\text{$i$ placebo cases and $j$ treatment cases})$$ Below is a code example fisherpower <- function(p1, p2, n) { pf <- 0 for (i in 1:n) { for (j in 1:n) { M <- matrix(c(i,n-i,j,n-j),2) if (fisher.test(M)$p.value <= 0.05) { pf <- pf + dbinom(i,n,p1)*dbinom(j,n,p2) } } } pf } which gives > fisherpower(0.1,0.05,621) [1] 0.9076656 However, this method costs a lot of computation power. You need to try 621 times 621 possibilities. The implementation above can be improved a lot (you do not need to compute all 621 by 621 cases), but it will remain slow so that is why the standard implementation in R uses simulations. A fast implementation of the above is in Peter Calhoun's R package Exact which he explains in his answer here. Computing with simulations You compute multiple times a hypothetical outcome and for that outcome you determine whether a 5% hypothesis test will fail or not. As a function of the sample sizes you get: If the null hypothesis is true then you will always get 5% probability to reject. Actually this is not entirely true and the Fisher's exact test is slightly conservative when the conditioning is not correct. The Fisher's exact test will reject less often than 5%, even when the null hypothesis is true (in the case that we do not sampling with replacement). In the example graph below we compute the rejection probability when $p_1 = p_2 = 0.1$ (in which case the null is true). If the null hypothesis is false, and the probabilities are not equal. Then you get a larger probability to reject the null hypothesis when the sample size is larger. ### computing set.seed(1) n <- seq(100,1000,20) power <- sapply(n, FUN = function(xn) { statmod::power.fisher.test(0.1,0.05,xn,xn, nsim = 10000) } ) type1 <- sapply(n, FUN = function(xn) { statmod::power.fisher.test(0.1,0.1,xn,xn, nsim = 10000) } ) ### plotting of results plot(n,power, type = "l", ylim = c(0,1), ylab = "reject probability") lines(n,type1, col =2) points(n,power, pch = 21, col = 1, bg = "white", cex = 0.7) points(n,type1, pch = 21, col = 2, bg = "white", cex = 0.7) # lines at 0.05 and 0.9 lines(c(0,2000),c(0.05,0.05), col = 2, lty = 2) lines(c(0,2000),c(0.9,0.9), col = 1, lty = 2) # legend legend(1000,0.6,c("if p1 = p2 = 0.1", "if p1 = 0.1, p2 = 0.05"), title = "reject probability", col = c(2,1), lty = 1, cex = 0.7, xjust = 1 ) Alternative tests There are many other ways to look at it. We can also perform a Barnards test > Barnard::barnard.test(49,58,414-49,407-58) Barnard's Unconditional Test Treatment I Treatment II Outcome I 49 58 Outcome II 365 349 Null hypothesis: Treatments have no effect on the outcomes Score statistic = 1.02759 Nuisance parameter = 0.012 (One sided), 0.986 (Two sided) P-value = 0.16485 (One sided), 0.320387 (Two sided) or use a GLM model > summary(glm(cbind(c(49,58),c(414-49, 407-58)) ~ 1+c("chloroquine", "placebo"), family = binomial(link="identity"))) Call: glm(formula = cbind(c(49, 58), c(414 - 49, 407 - 58)) ~ 1 + c("chloroquine", "placebo"), family = binomial(link = "identity")) Deviance Residuals: [1] 0 0 Coefficients: Estimate Std. Error (Intercept) 0.11836 0.01588 c("chloroquine", "placebo")placebo 0.02415 0.02350 z value Pr(>|z|) (Intercept) 7.455 8.98e-14 *** c("chloroquine", "placebo")placebo 1.028 0.304 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 1.0568e+00 on 1 degrees of freedom Residual deviance: 2.4780e-13 on 0 degrees of freedom AIC: 15.355 Number of Fisher Scoring iterations: 2 > Each of these methods shows more or less the same thing, the result 58 vs 49 is not an anomaly (but also, the effect would need to be 50% or more in order for us to have at least 90% probability to detect an anomaly with this test).
Sample size calculation in COVID-19 study
They used Fisher's exact test, which relates to sampling without replacement. But in reality this is not exactly like that, and it is more like binomial distributed data. For that case you get the fol
Sample size calculation in COVID-19 study They used Fisher's exact test, which relates to sampling without replacement. But in reality this is not exactly like that, and it is more like binomial distributed data. For that case you get the following: For the null hypothesis it is sampling where you have equal probabilities that the people get covid-19, no matter whether they are in the placebo group or the effect group. The alternative hypothesis, for which they computed the power, is that you have 10% probability for the placebo group to get covid-19 and 5% for the treatment group (so the treatment reduces probability by 50%). Exact computation of power You can compute the probability of rejecting the null hypothesis given certain sample sizes and probabilities simply by trying all possibilities and see which ones result in a negative/positive fisher's test. Then you sum over the probabilities to get the cases where you reject the test. $$P(\text{reject})= \sum_{\substack{\text{over all $i,j$} \\ \text{where Fisher test is rejected}}} P(\text{$i$ placebo cases and $j$ treatment cases})$$ Below is a code example fisherpower <- function(p1, p2, n) { pf <- 0 for (i in 1:n) { for (j in 1:n) { M <- matrix(c(i,n-i,j,n-j),2) if (fisher.test(M)$p.value <= 0.05) { pf <- pf + dbinom(i,n,p1)*dbinom(j,n,p2) } } } pf } which gives > fisherpower(0.1,0.05,621) [1] 0.9076656 However, this method costs a lot of computation power. You need to try 621 times 621 possibilities. The implementation above can be improved a lot (you do not need to compute all 621 by 621 cases), but it will remain slow so that is why the standard implementation in R uses simulations. A fast implementation of the above is in Peter Calhoun's R package Exact which he explains in his answer here. Computing with simulations You compute multiple times a hypothetical outcome and for that outcome you determine whether a 5% hypothesis test will fail or not. As a function of the sample sizes you get: If the null hypothesis is true then you will always get 5% probability to reject. Actually this is not entirely true and the Fisher's exact test is slightly conservative when the conditioning is not correct. The Fisher's exact test will reject less often than 5%, even when the null hypothesis is true (in the case that we do not sampling with replacement). In the example graph below we compute the rejection probability when $p_1 = p_2 = 0.1$ (in which case the null is true). If the null hypothesis is false, and the probabilities are not equal. Then you get a larger probability to reject the null hypothesis when the sample size is larger. ### computing set.seed(1) n <- seq(100,1000,20) power <- sapply(n, FUN = function(xn) { statmod::power.fisher.test(0.1,0.05,xn,xn, nsim = 10000) } ) type1 <- sapply(n, FUN = function(xn) { statmod::power.fisher.test(0.1,0.1,xn,xn, nsim = 10000) } ) ### plotting of results plot(n,power, type = "l", ylim = c(0,1), ylab = "reject probability") lines(n,type1, col =2) points(n,power, pch = 21, col = 1, bg = "white", cex = 0.7) points(n,type1, pch = 21, col = 2, bg = "white", cex = 0.7) # lines at 0.05 and 0.9 lines(c(0,2000),c(0.05,0.05), col = 2, lty = 2) lines(c(0,2000),c(0.9,0.9), col = 1, lty = 2) # legend legend(1000,0.6,c("if p1 = p2 = 0.1", "if p1 = 0.1, p2 = 0.05"), title = "reject probability", col = c(2,1), lty = 1, cex = 0.7, xjust = 1 ) Alternative tests There are many other ways to look at it. We can also perform a Barnards test > Barnard::barnard.test(49,58,414-49,407-58) Barnard's Unconditional Test Treatment I Treatment II Outcome I 49 58 Outcome II 365 349 Null hypothesis: Treatments have no effect on the outcomes Score statistic = 1.02759 Nuisance parameter = 0.012 (One sided), 0.986 (Two sided) P-value = 0.16485 (One sided), 0.320387 (Two sided) or use a GLM model > summary(glm(cbind(c(49,58),c(414-49, 407-58)) ~ 1+c("chloroquine", "placebo"), family = binomial(link="identity"))) Call: glm(formula = cbind(c(49, 58), c(414 - 49, 407 - 58)) ~ 1 + c("chloroquine", "placebo"), family = binomial(link = "identity")) Deviance Residuals: [1] 0 0 Coefficients: Estimate Std. Error (Intercept) 0.11836 0.01588 c("chloroquine", "placebo")placebo 0.02415 0.02350 z value Pr(>|z|) (Intercept) 7.455 8.98e-14 *** c("chloroquine", "placebo")placebo 1.028 0.304 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 1.0568e+00 on 1 degrees of freedom Residual deviance: 2.4780e-13 on 0 degrees of freedom AIC: 15.355 Number of Fisher Scoring iterations: 2 > Each of these methods shows more or less the same thing, the result 58 vs 49 is not an anomaly (but also, the effect would need to be 50% or more in order for us to have at least 90% probability to detect an anomaly with this test).
Sample size calculation in COVID-19 study They used Fisher's exact test, which relates to sampling without replacement. But in reality this is not exactly like that, and it is more like binomial distributed data. For that case you get the fol
43,943
Sample size calculation in COVID-19 study
You are missing a critical piece of information that the article cited immediately prior to your quote: We anticipated that illness compatible with Covid-19 would develop in 10% of close contacts exposed to Covid-19. This is the assumed incidence in the control group under the alternative hypothesis; i.e., $\pi_c = 0.1$. The 50% relative effect size refers to a reduction in the incidence of Covid-19 infection in the treatment group, i.e. $\pi_t/\pi_c = 0.5$ from which it follows that $\pi_t = 0.05$, under the alternative hypothesis. However, when I input these (along with $\alpha$ and $\beta$) into EAST 6, I don't get $n = 621$ per arm. I get $n = 606$ per arm, and based on my simulations, I believe the latter value is correct.
Sample size calculation in COVID-19 study
You are missing a critical piece of information that the article cited immediately prior to your quote: We anticipated that illness compatible with Covid-19 would develop in 10% of close contacts exp
Sample size calculation in COVID-19 study You are missing a critical piece of information that the article cited immediately prior to your quote: We anticipated that illness compatible with Covid-19 would develop in 10% of close contacts exposed to Covid-19. This is the assumed incidence in the control group under the alternative hypothesis; i.e., $\pi_c = 0.1$. The 50% relative effect size refers to a reduction in the incidence of Covid-19 infection in the treatment group, i.e. $\pi_t/\pi_c = 0.5$ from which it follows that $\pi_t = 0.05$, under the alternative hypothesis. However, when I input these (along with $\alpha$ and $\beta$) into EAST 6, I don't get $n = 621$ per arm. I get $n = 606$ per arm, and based on my simulations, I believe the latter value is correct.
Sample size calculation in COVID-19 study You are missing a critical piece of information that the article cited immediately prior to your quote: We anticipated that illness compatible with Covid-19 would develop in 10% of close contacts exp
43,944
Mean vs. Trimmed mean in the normal distribution
For an exponential family like the Normal distribution, the sample average $\bar{x}$ is know to achieve the Cramér-Rao lower bound, that is the minimal possible variance among all unbiased estimators of the mean. It is thus no surprise that another estimator such as the trimmed mean is found to be more variable than $\bar{x}$.
Mean vs. Trimmed mean in the normal distribution
For an exponential family like the Normal distribution, the sample average $\bar{x}$ is know to achieve the Cramér-Rao lower bound, that is the minimal possible variance among all unbiased estimators
Mean vs. Trimmed mean in the normal distribution For an exponential family like the Normal distribution, the sample average $\bar{x}$ is know to achieve the Cramér-Rao lower bound, that is the minimal possible variance among all unbiased estimators of the mean. It is thus no surprise that another estimator such as the trimmed mean is found to be more variable than $\bar{x}$.
Mean vs. Trimmed mean in the normal distribution For an exponential family like the Normal distribution, the sample average $\bar{x}$ is know to achieve the Cramér-Rao lower bound, that is the minimal possible variance among all unbiased estimators
43,945
Mean vs. Trimmed mean in the normal distribution
With a light-tailed distribution, the more distant points are most informative about location; with a heavier-tailed distribution their inclusion in an average may be anything from unhelpful to ruinous. So when you use a suitably-trimmed mean with a heavy-tailed distribution, it will tend to have a lower variance than not trimming. On the other hand when you do it with a light-tailed distribution, you're throwing away valuable data (and so your estimate is noisier, somewhat like it would be if you had a smaller sample) If you look at say a $t_4$ distribution you can see some gain from trimming. If you look at a uniform on $(-k,k)$, you can see a cost from trimming (indeed, you'd be better still to average the trimmed-off values at some very small level of trimming than to use the mean). These simulations were for n=100 in each case.
Mean vs. Trimmed mean in the normal distribution
With a light-tailed distribution, the more distant points are most informative about location; with a heavier-tailed distribution their inclusion in an average may be anything from unhelpful to ruinou
Mean vs. Trimmed mean in the normal distribution With a light-tailed distribution, the more distant points are most informative about location; with a heavier-tailed distribution their inclusion in an average may be anything from unhelpful to ruinous. So when you use a suitably-trimmed mean with a heavy-tailed distribution, it will tend to have a lower variance than not trimming. On the other hand when you do it with a light-tailed distribution, you're throwing away valuable data (and so your estimate is noisier, somewhat like it would be if you had a smaller sample) If you look at say a $t_4$ distribution you can see some gain from trimming. If you look at a uniform on $(-k,k)$, you can see a cost from trimming (indeed, you'd be better still to average the trimmed-off values at some very small level of trimming than to use the mean). These simulations were for n=100 in each case.
Mean vs. Trimmed mean in the normal distribution With a light-tailed distribution, the more distant points are most informative about location; with a heavier-tailed distribution their inclusion in an average may be anything from unhelpful to ruinou
43,946
Smarter example of biased but consistent estimator?
Here's a straightforward one. Consider a uniform population with unknown upper bound $$ X \sim U(0, \theta) $$ A simple estimator of $\theta$ is the sample maximum $$ \hat \theta = \max(x_1, x_2, \ldots, x_n) $$ This is a biased estimator. With a little math you can show that $$ E[\hat \theta] = \frac{n}{n+1} \theta $$ Which is a little smaller than $\theta$ itself. This also shows that the estimator is consistent, since $\frac{n}{n+1} \rightarrow 1$ as $n \rightarrow \infty$. An natural unbiased estimator of the maximum is twice the sample mean. You can show that this unbiased estimator has much higher variance than the slightly biased on above.
Smarter example of biased but consistent estimator?
Here's a straightforward one. Consider a uniform population with unknown upper bound $$ X \sim U(0, \theta) $$ A simple estimator of $\theta$ is the sample maximum $$ \hat \theta = \max(x_1, x_2, \ldo
Smarter example of biased but consistent estimator? Here's a straightforward one. Consider a uniform population with unknown upper bound $$ X \sim U(0, \theta) $$ A simple estimator of $\theta$ is the sample maximum $$ \hat \theta = \max(x_1, x_2, \ldots, x_n) $$ This is a biased estimator. With a little math you can show that $$ E[\hat \theta] = \frac{n}{n+1} \theta $$ Which is a little smaller than $\theta$ itself. This also shows that the estimator is consistent, since $\frac{n}{n+1} \rightarrow 1$ as $n \rightarrow \infty$. An natural unbiased estimator of the maximum is twice the sample mean. You can show that this unbiased estimator has much higher variance than the slightly biased on above.
Smarter example of biased but consistent estimator? Here's a straightforward one. Consider a uniform population with unknown upper bound $$ X \sim U(0, \theta) $$ A simple estimator of $\theta$ is the sample maximum $$ \hat \theta = \max(x_1, x_2, \ldo
43,947
Smarter example of biased but consistent estimator?
A very commonly used consistent but biased estimator used is that of the estimated standard deviation. If we are looking at a simple situation in our data is distributed as $x_i \sim N(\mu, \sigma^2)$, then sometimes the MLE estimate of $\sigma$ is used, ie $\hat \sigma^2 = \frac{1}{n} \sum_{i = 1}^n (x_i - \bar x)^2$ This is, of course, a biased but consistent estimator of the variance. Some people may try to account for this bias by using $\hat s^2 = \frac{1}{n-1} \sum_{i = 1}^n (x_i - \bar x)^2 $ which is now unbiased for $\sigma^2$...but people don't usually look at variances, they usually look at standard deviations! Jensen's inequality will tell us that if $\hat s^2$ is an unbiased estimator of $\sigma^2$ with positive variance, then $E[s] > \sqrt{E[s^2]}$...so even though we had a unbiased estimator for $\sigma^2$, by taking the square root of this estimator, we now have a biased estimator for $\sigma$! More generally (and stated without proof), it is very common that MLE estimates of variance components will be downwardly biased but consistent. Hopefully, this bias is ignorable; in the example above, we can see that the fix is almost inconsequential for decent sized $n$. However, if the number of parameters estimated becomes very large, it is quite possible that this bias can be especially problematic; this manifests itself as overfitting.
Smarter example of biased but consistent estimator?
A very commonly used consistent but biased estimator used is that of the estimated standard deviation. If we are looking at a simple situation in our data is distributed as $x_i \sim N(\mu, \sigma^2)
Smarter example of biased but consistent estimator? A very commonly used consistent but biased estimator used is that of the estimated standard deviation. If we are looking at a simple situation in our data is distributed as $x_i \sim N(\mu, \sigma^2)$, then sometimes the MLE estimate of $\sigma$ is used, ie $\hat \sigma^2 = \frac{1}{n} \sum_{i = 1}^n (x_i - \bar x)^2$ This is, of course, a biased but consistent estimator of the variance. Some people may try to account for this bias by using $\hat s^2 = \frac{1}{n-1} \sum_{i = 1}^n (x_i - \bar x)^2 $ which is now unbiased for $\sigma^2$...but people don't usually look at variances, they usually look at standard deviations! Jensen's inequality will tell us that if $\hat s^2$ is an unbiased estimator of $\sigma^2$ with positive variance, then $E[s] > \sqrt{E[s^2]}$...so even though we had a unbiased estimator for $\sigma^2$, by taking the square root of this estimator, we now have a biased estimator for $\sigma$! More generally (and stated without proof), it is very common that MLE estimates of variance components will be downwardly biased but consistent. Hopefully, this bias is ignorable; in the example above, we can see that the fix is almost inconsequential for decent sized $n$. However, if the number of parameters estimated becomes very large, it is quite possible that this bias can be especially problematic; this manifests itself as overfitting.
Smarter example of biased but consistent estimator? A very commonly used consistent but biased estimator used is that of the estimated standard deviation. If we are looking at a simple situation in our data is distributed as $x_i \sim N(\mu, \sigma^2)
43,948
Log transformation and correlation
Spearman correlation tests for monotonic association (tendency to increase together and decrease together); it's unaffected by monotonic-increasing transformation (like taking logs, square roots or squaring positive values). To Spearman correlation, these are all perfectly correlated: ... since each variable increases (though by varying amounts) as the other one does. If you expect the correlation to change when you transform one or the other, you're probably thinking of something more like Pearson correlation, which measures linear association and is affected by monotonic transformation. (Incidentally, if you do want to transform for a Pearson correlation, I'd suggest considering transforming both variables by taking logs.)
Log transformation and correlation
Spearman correlation tests for monotonic association (tendency to increase together and decrease together); it's unaffected by monotonic-increasing transformation (like taking logs, square roots or sq
Log transformation and correlation Spearman correlation tests for monotonic association (tendency to increase together and decrease together); it's unaffected by monotonic-increasing transformation (like taking logs, square roots or squaring positive values). To Spearman correlation, these are all perfectly correlated: ... since each variable increases (though by varying amounts) as the other one does. If you expect the correlation to change when you transform one or the other, you're probably thinking of something more like Pearson correlation, which measures linear association and is affected by monotonic transformation. (Incidentally, if you do want to transform for a Pearson correlation, I'd suggest considering transforming both variables by taking logs.)
Log transformation and correlation Spearman correlation tests for monotonic association (tendency to increase together and decrease together); it's unaffected by monotonic-increasing transformation (like taking logs, square roots or sq
43,949
Log transformation and correlation
The reason you aren't seeing any difference is because you're calculating Spearman's rather than Pearson's correlation. The latter is a measure of linear association, but Spearman's correlation measures the strength of any monotone relationship, which should be invariant to monotone transformations. The way we calculate Spearman's correlation is by first converting the observations into their ranks and then applying Pearson's correlation. Since any monotone increasing transformation (such as the logarithm) does not change the order of the observations, you will get exactly the same ranks as before you applying the transformation, and so you get the same value for Spearman's correlation.
Log transformation and correlation
The reason you aren't seeing any difference is because you're calculating Spearman's rather than Pearson's correlation. The latter is a measure of linear association, but Spearman's correlation measu
Log transformation and correlation The reason you aren't seeing any difference is because you're calculating Spearman's rather than Pearson's correlation. The latter is a measure of linear association, but Spearman's correlation measures the strength of any monotone relationship, which should be invariant to monotone transformations. The way we calculate Spearman's correlation is by first converting the observations into their ranks and then applying Pearson's correlation. Since any monotone increasing transformation (such as the logarithm) does not change the order of the observations, you will get exactly the same ranks as before you applying the transformation, and so you get the same value for Spearman's correlation.
Log transformation and correlation The reason you aren't seeing any difference is because you're calculating Spearman's rather than Pearson's correlation. The latter is a measure of linear association, but Spearman's correlation measu
43,950
Log transformation and correlation
Spearman's correlation coefficient uses rank, rather than the actual data values. Using Spearman's correlation is actually therefore already a transformation, as you are transforming the data values into ranks. A log transformation will change the values of the variable, but it won't change the ranking of the values relative to one another. Thus, the Spearman correlation coefficient will remain unchanged.
Log transformation and correlation
Spearman's correlation coefficient uses rank, rather than the actual data values. Using Spearman's correlation is actually therefore already a transformation, as you are transforming the data values i
Log transformation and correlation Spearman's correlation coefficient uses rank, rather than the actual data values. Using Spearman's correlation is actually therefore already a transformation, as you are transforming the data values into ranks. A log transformation will change the values of the variable, but it won't change the ranking of the values relative to one another. Thus, the Spearman correlation coefficient will remain unchanged.
Log transformation and correlation Spearman's correlation coefficient uses rank, rather than the actual data values. Using Spearman's correlation is actually therefore already a transformation, as you are transforming the data values i
43,951
Machine learning methods which takes time-to-event into account?
It is a mistake to assume that the Cox proportional hazards model makes simple assumptions such as linearity. All regression models have been extended for decades using regression splines, tensor interaction splines, and other approaches to allow for great flexibility in the low- to mid-dimensional case. As others have said, penalization is instrumental in handling higher-dimensional cases. [One problem is how to scale nonlinear terms when using penalization and regression splines simultaneously.] Note also that the term 'multivariate' is inappropriate in this context as there is only one $Y$. More to the original question, one of the amazing things about statistics is the ability of statistical approaches to extend models in various ways based on sound principles. Faraggi and Simon (Statistics in Medicine, 1995) did just that to develop a likelihood function for obtaining an artificial neural network Cox model.
Machine learning methods which takes time-to-event into account?
It is a mistake to assume that the Cox proportional hazards model makes simple assumptions such as linearity. All regression models have been extended for decades using regression splines, tensor int
Machine learning methods which takes time-to-event into account? It is a mistake to assume that the Cox proportional hazards model makes simple assumptions such as linearity. All regression models have been extended for decades using regression splines, tensor interaction splines, and other approaches to allow for great flexibility in the low- to mid-dimensional case. As others have said, penalization is instrumental in handling higher-dimensional cases. [One problem is how to scale nonlinear terms when using penalization and regression splines simultaneously.] Note also that the term 'multivariate' is inappropriate in this context as there is only one $Y$. More to the original question, one of the amazing things about statistics is the ability of statistical approaches to extend models in various ways based on sound principles. Faraggi and Simon (Statistics in Medicine, 1995) did just that to develop a likelihood function for obtaining an artificial neural network Cox model.
Machine learning methods which takes time-to-event into account? It is a mistake to assume that the Cox proportional hazards model makes simple assumptions such as linearity. All regression models have been extended for decades using regression splines, tensor int
43,952
Machine learning methods which takes time-to-event into account?
You may might be interested in Random Survival Forests and the corresponding R package randomForestSRC: http://www.ccs.miami.edu/~hishwaran/papers/randomSurvivalForests.pdf https://cran.r-project.org/web/packages/randomForestSRC/ I believe the main limitation of the approach is that it doesn't deal with time varying predictors.
Machine learning methods which takes time-to-event into account?
You may might be interested in Random Survival Forests and the corresponding R package randomForestSRC: http://www.ccs.miami.edu/~hishwaran/papers/randomSurvivalForests.pdf https://cran.r-project.org/
Machine learning methods which takes time-to-event into account? You may might be interested in Random Survival Forests and the corresponding R package randomForestSRC: http://www.ccs.miami.edu/~hishwaran/papers/randomSurvivalForests.pdf https://cran.r-project.org/web/packages/randomForestSRC/ I believe the main limitation of the approach is that it doesn't deal with time varying predictors.
Machine learning methods which takes time-to-event into account? You may might be interested in Random Survival Forests and the corresponding R package randomForestSRC: http://www.ccs.miami.edu/~hishwaran/papers/randomSurvivalForests.pdf https://cran.r-project.org/
43,953
Machine learning methods which takes time-to-event into account?
The majority of the linear models based in the likelihood function have extension to the Cox regression. For example, penalized regression models (lasso, rigde regression, elastic net) or partial least squares. In other hand, there are extensions from the classification trees to survival trees. This means all the ensemble methods based in trees are also extended to survival data in a natural way: random forest, bagging, gradient boosting machines, …. Finally, other methods, like support vector machines or neural networks have some theoretical versions for survival data, but there are difficult to apply in the practice.
Machine learning methods which takes time-to-event into account?
The majority of the linear models based in the likelihood function have extension to the Cox regression. For example, penalized regression models (lasso, rigde regression, elastic net) or partial leas
Machine learning methods which takes time-to-event into account? The majority of the linear models based in the likelihood function have extension to the Cox regression. For example, penalized regression models (lasso, rigde regression, elastic net) or partial least squares. In other hand, there are extensions from the classification trees to survival trees. This means all the ensemble methods based in trees are also extended to survival data in a natural way: random forest, bagging, gradient boosting machines, …. Finally, other methods, like support vector machines or neural networks have some theoretical versions for survival data, but there are difficult to apply in the practice.
Machine learning methods which takes time-to-event into account? The majority of the linear models based in the likelihood function have extension to the Cox regression. For example, penalized regression models (lasso, rigde regression, elastic net) or partial leas
43,954
Machine learning methods which takes time-to-event into account?
Any linear survival analysis method can be straightforwardly kernelised to generate a non-linear equivalent. I did something like this a while back for modelling the time-to-growth of microbial pathogens from spores in foods. G. C. Cawley, N. L. C. Talbot, G. J. Janacek and M. W. Peck, Sparse Bayesian kernel survival analysis for modelling the growth domain of microbial pathogens, IEEE Transactions on Neural Networks, volume 17, number 2, pp. 471-481, March 2006. (www)
Machine learning methods which takes time-to-event into account?
Any linear survival analysis method can be straightforwardly kernelised to generate a non-linear equivalent. I did something like this a while back for modelling the time-to-growth of microbial patho
Machine learning methods which takes time-to-event into account? Any linear survival analysis method can be straightforwardly kernelised to generate a non-linear equivalent. I did something like this a while back for modelling the time-to-growth of microbial pathogens from spores in foods. G. C. Cawley, N. L. C. Talbot, G. J. Janacek and M. W. Peck, Sparse Bayesian kernel survival analysis for modelling the growth domain of microbial pathogens, IEEE Transactions on Neural Networks, volume 17, number 2, pp. 471-481, March 2006. (www)
Machine learning methods which takes time-to-event into account? Any linear survival analysis method can be straightforwardly kernelised to generate a non-linear equivalent. I did something like this a while back for modelling the time-to-growth of microbial patho
43,955
Standardizing a Standard normal Variable
If $X_i$ are iid Normal(0,1), then a sample from it won't have sample mean 0 or sample standard deviation 1 just due to random variation. Now consider what happens when we do $Z=\frac{X-\overline{X}}{s_X}$ While we do now have sample mean 0 and sample standard deviation 1, what we don't have is $Z$ being normally distributed. In small to moderate sample sizes, it has short tails, and substantially smaller kurtosis than a standard normal, Indeed from simulation for samples of size n=10 it looks pretty similar to a scaled beta(4,4) (that has been scaled to lie in (-3,3) ): (The x-axis is a random sample of B(4,4) scaled to (-3,3). Of course this doesn't mean the distribution shape is a beta(4,4). -- Edit: as Henry points out, it is in fact a Beta(4,4).) The values in res were generated as follows: res=replicate(100000,scale(rnorm(10))) For samples of size 5, the result looks rather like a scaled beta(3/2,3/2). Further, the values in each sample are no longer independent, since they sum to 0 and their squares sum to $n-1$
Standardizing a Standard normal Variable
If $X_i$ are iid Normal(0,1), then a sample from it won't have sample mean 0 or sample standard deviation 1 just due to random variation. Now consider what happens when we do $Z=\frac{X-\overline{X}}{
Standardizing a Standard normal Variable If $X_i$ are iid Normal(0,1), then a sample from it won't have sample mean 0 or sample standard deviation 1 just due to random variation. Now consider what happens when we do $Z=\frac{X-\overline{X}}{s_X}$ While we do now have sample mean 0 and sample standard deviation 1, what we don't have is $Z$ being normally distributed. In small to moderate sample sizes, it has short tails, and substantially smaller kurtosis than a standard normal, Indeed from simulation for samples of size n=10 it looks pretty similar to a scaled beta(4,4) (that has been scaled to lie in (-3,3) ): (The x-axis is a random sample of B(4,4) scaled to (-3,3). Of course this doesn't mean the distribution shape is a beta(4,4). -- Edit: as Henry points out, it is in fact a Beta(4,4).) The values in res were generated as follows: res=replicate(100000,scale(rnorm(10))) For samples of size 5, the result looks rather like a scaled beta(3/2,3/2). Further, the values in each sample are no longer independent, since they sum to 0 and their squares sum to $n-1$
Standardizing a Standard normal Variable If $X_i$ are iid Normal(0,1), then a sample from it won't have sample mean 0 or sample standard deviation 1 just due to random variation. Now consider what happens when we do $Z=\frac{X-\overline{X}}{
43,956
Standardizing a Standard normal Variable
We have that $$X_i^* = \frac{X_i}{s} - \frac{\bar X}{s}$$ The sample variance from a normal sample follows an exact distribution, $$(n-1)s^2/\sigma^2\sim\chi^2_{n-1} \implies s^2 \sim \frac{1}{n-1}\chi^2_{n-1} \implies s \sim \frac{1}{\sqrt{n-1}}\chi_{n-1}$$ i.e. $s$ follows the square root of a chi-square divided by its degrees of freedom. But even if this means that $\frac{X_i}{s}$ is the ratio of a standard normal over the square root of a chi-square divided by its degrees of freedom, the numerator is not independent of the denominator, and so we cannot say that the ratio follows a Student's $t$-distribution (and personally I do not know its distribution). As for the second term, it is known that the sample mean and the sample variance are independent random variables if and only if the sample consists of independent normals, which is the case here. Furthermore, the sample mean follows a zero-mean normal distribution with variance here $1/n$, so $\sqrt{n}\bar X$ follows a standard normal. So we have that $$\frac{\sqrt {n} \bar X}{s} \sim t \implies \frac{\bar X}{s} \sim \frac{1}{\sqrt {n}}t $$ i.e. the second term of $X_i^*$ follows a scaled student's $t$-distribution So in all $$X^*_i = \frac{Z_i}{\sqrt{\chi^2_{n-1}/(n-1)}} - \frac{1}{\sqrt {n}}t$$ where I have used the symbol $Z$ to denote a random variable following a standard normal. The first term is not a Student's $t$, and moreover, it is not independent from the second term. Put together it doesn't look much of a normal or of a Student's distribution either.
Standardizing a Standard normal Variable
We have that $$X_i^* = \frac{X_i}{s} - \frac{\bar X}{s}$$ The sample variance from a normal sample follows an exact distribution, $$(n-1)s^2/\sigma^2\sim\chi^2_{n-1} \implies s^2 \sim \frac{1}{n-1}\c
Standardizing a Standard normal Variable We have that $$X_i^* = \frac{X_i}{s} - \frac{\bar X}{s}$$ The sample variance from a normal sample follows an exact distribution, $$(n-1)s^2/\sigma^2\sim\chi^2_{n-1} \implies s^2 \sim \frac{1}{n-1}\chi^2_{n-1} \implies s \sim \frac{1}{\sqrt{n-1}}\chi_{n-1}$$ i.e. $s$ follows the square root of a chi-square divided by its degrees of freedom. But even if this means that $\frac{X_i}{s}$ is the ratio of a standard normal over the square root of a chi-square divided by its degrees of freedom, the numerator is not independent of the denominator, and so we cannot say that the ratio follows a Student's $t$-distribution (and personally I do not know its distribution). As for the second term, it is known that the sample mean and the sample variance are independent random variables if and only if the sample consists of independent normals, which is the case here. Furthermore, the sample mean follows a zero-mean normal distribution with variance here $1/n$, so $\sqrt{n}\bar X$ follows a standard normal. So we have that $$\frac{\sqrt {n} \bar X}{s} \sim t \implies \frac{\bar X}{s} \sim \frac{1}{\sqrt {n}}t $$ i.e. the second term of $X_i^*$ follows a scaled student's $t$-distribution So in all $$X^*_i = \frac{Z_i}{\sqrt{\chi^2_{n-1}/(n-1)}} - \frac{1}{\sqrt {n}}t$$ where I have used the symbol $Z$ to denote a random variable following a standard normal. The first term is not a Student's $t$, and moreover, it is not independent from the second term. Put together it doesn't look much of a normal or of a Student's distribution either.
Standardizing a Standard normal Variable We have that $$X_i^* = \frac{X_i}{s} - \frac{\bar X}{s}$$ The sample variance from a normal sample follows an exact distribution, $$(n-1)s^2/\sigma^2\sim\chi^2_{n-1} \implies s^2 \sim \frac{1}{n-1}\c
43,957
Standardizing a Standard normal Variable
The original standard normal variables have TRUE mean 0 (E(X) = 0) and are independent. By taking a set of them and dividing them by their standard deviation, you DO standardize them, but the result, ironically, isn't standard normal. They are dependent (because they share the denominator) and actually have t-distributions. So if you want standard normal, just stick with rnorm(5).
Standardizing a Standard normal Variable
The original standard normal variables have TRUE mean 0 (E(X) = 0) and are independent. By taking a set of them and dividing them by their standard deviation, you DO standardize them, but the result,
Standardizing a Standard normal Variable The original standard normal variables have TRUE mean 0 (E(X) = 0) and are independent. By taking a set of them and dividing them by their standard deviation, you DO standardize them, but the result, ironically, isn't standard normal. They are dependent (because they share the denominator) and actually have t-distributions. So if you want standard normal, just stick with rnorm(5).
Standardizing a Standard normal Variable The original standard normal variables have TRUE mean 0 (E(X) = 0) and are independent. By taking a set of them and dividing them by their standard deviation, you DO standardize them, but the result,
43,958
Standardizing a Standard normal Variable
Just did some experiments. It seems after scale again, you are closer to get some data with $\mu=0$ and $\sigma=1$. set.seed(123) x <- rnorm(1000,0,1) mean(x) sd(x) y<-scale(x) mean(y) sd(y) Results: > mean(x) [1] 0.01612787 > sd(x) [1] 0.991695 > y<-scale(x) > mean(y) [1] -8.235085e-18 > sd(y) [1] 1
Standardizing a Standard normal Variable
Just did some experiments. It seems after scale again, you are closer to get some data with $\mu=0$ and $\sigma=1$. set.seed(123) x <- rnorm(1000,0,1) mean(x) sd(x) y<-scale(x) mean(y) sd(y) Results
Standardizing a Standard normal Variable Just did some experiments. It seems after scale again, you are closer to get some data with $\mu=0$ and $\sigma=1$. set.seed(123) x <- rnorm(1000,0,1) mean(x) sd(x) y<-scale(x) mean(y) sd(y) Results: > mean(x) [1] 0.01612787 > sd(x) [1] 0.991695 > y<-scale(x) > mean(y) [1] -8.235085e-18 > sd(y) [1] 1
Standardizing a Standard normal Variable Just did some experiments. It seems after scale again, you are closer to get some data with $\mu=0$ and $\sigma=1$. set.seed(123) x <- rnorm(1000,0,1) mean(x) sd(x) y<-scale(x) mean(y) sd(y) Results
43,959
Standardizing a Standard normal Variable
Intuitive proof by counterexample There are already some general answers that cover the question, but personally I find the following reasoning most easy to follow. Suppose your sample size is 1. Your definition of $X^*$ is as follows $$X^*=\frac{x-\bar x}{sd(x)}$$ Because the sample size is 1, we have $\bar x = x$, so for any $x$ the expression reduces to $$X^*=\frac{\bar x-\bar x}{sd(x)} =\frac{0}{0}$$ As $X^*$ is clearly not normally distributed for sample size 1, it can definitely not have a standard normal distribution in general.
Standardizing a Standard normal Variable
Intuitive proof by counterexample There are already some general answers that cover the question, but personally I find the following reasoning most easy to follow. Suppose your sample size is 1. Your
Standardizing a Standard normal Variable Intuitive proof by counterexample There are already some general answers that cover the question, but personally I find the following reasoning most easy to follow. Suppose your sample size is 1. Your definition of $X^*$ is as follows $$X^*=\frac{x-\bar x}{sd(x)}$$ Because the sample size is 1, we have $\bar x = x$, so for any $x$ the expression reduces to $$X^*=\frac{\bar x-\bar x}{sd(x)} =\frac{0}{0}$$ As $X^*$ is clearly not normally distributed for sample size 1, it can definitely not have a standard normal distribution in general.
Standardizing a Standard normal Variable Intuitive proof by counterexample There are already some general answers that cover the question, but personally I find the following reasoning most easy to follow. Suppose your sample size is 1. Your
43,960
Proving Causality with t-test/regression
@John is correct, but, in addition you cannot prove causation with any experimental design: You can only have weaker or stronger evidence of causality. In any study, but especially in an observational study, evidence for causality is increased by including relevant covariates, giving a scientifically plausible causal path, replicating results and so on. However, even in the best experimental design, you don't prove causality. As for t-tests vs. regression - your friend does not know what he/she is talking about. T-tests results can be duplicated exactly with regression procedures: Just use a single independent variable that is dichotomous.
Proving Causality with t-test/regression
@John is correct, but, in addition you cannot prove causation with any experimental design: You can only have weaker or stronger evidence of causality. In any study, but especially in an observational
Proving Causality with t-test/regression @John is correct, but, in addition you cannot prove causation with any experimental design: You can only have weaker or stronger evidence of causality. In any study, but especially in an observational study, evidence for causality is increased by including relevant covariates, giving a scientifically plausible causal path, replicating results and so on. However, even in the best experimental design, you don't prove causality. As for t-tests vs. regression - your friend does not know what he/she is talking about. T-tests results can be duplicated exactly with regression procedures: Just use a single independent variable that is dichotomous.
Proving Causality with t-test/regression @John is correct, but, in addition you cannot prove causation with any experimental design: You can only have weaker or stronger evidence of causality. In any study, but especially in an observational
43,961
Proving Causality with t-test/regression
Causal relationships are established by experimental design, not a particular statistical test. You could use a correlation as your statistical test and demonstrate that the high quality true experiment you conducted strongly implies causation. You could perform a t-test as your statistic and show a relationship in your quasi or observational study but that statistic does not, in and of itself, justify a causal explanation.
Proving Causality with t-test/regression
Causal relationships are established by experimental design, not a particular statistical test. You could use a correlation as your statistical test and demonstrate that the high quality true experim
Proving Causality with t-test/regression Causal relationships are established by experimental design, not a particular statistical test. You could use a correlation as your statistical test and demonstrate that the high quality true experiment you conducted strongly implies causation. You could perform a t-test as your statistic and show a relationship in your quasi or observational study but that statistic does not, in and of itself, justify a causal explanation.
Proving Causality with t-test/regression Causal relationships are established by experimental design, not a particular statistical test. You could use a correlation as your statistical test and demonstrate that the high quality true experim
43,962
Proving Causality with t-test/regression
Like everyone else said, math alone cannot determine causality. A solid way to find causality is to first develop your causal theory. Once you have a causal theory you can group all the known variables. Having all the known variables will allow you to compare them all through multiple tests. Then make a list of potential unknown variables. Have multiple tests for each potential one to see if there is an impact. Remember to perform impact tests, not correlation tests. Determining this is largely dependent on what you are studying, and not entirely mathematical in all cases. In other words, you can't truly find causality with just a mathematical test. This should be logical because the numbers you are inputting are not guaranteed to be accurate, and secondly the numbers you are inputting are only from specific variables to begin with. Theory needs to be applied, but once it is applied math plays a very strong role in determining each variable's strength.
Proving Causality with t-test/regression
Like everyone else said, math alone cannot determine causality. A solid way to find causality is to first develop your causal theory. Once you have a causal theory you can group all the known variable
Proving Causality with t-test/regression Like everyone else said, math alone cannot determine causality. A solid way to find causality is to first develop your causal theory. Once you have a causal theory you can group all the known variables. Having all the known variables will allow you to compare them all through multiple tests. Then make a list of potential unknown variables. Have multiple tests for each potential one to see if there is an impact. Remember to perform impact tests, not correlation tests. Determining this is largely dependent on what you are studying, and not entirely mathematical in all cases. In other words, you can't truly find causality with just a mathematical test. This should be logical because the numbers you are inputting are not guaranteed to be accurate, and secondly the numbers you are inputting are only from specific variables to begin with. Theory needs to be applied, but once it is applied math plays a very strong role in determining each variable's strength.
Proving Causality with t-test/regression Like everyone else said, math alone cannot determine causality. A solid way to find causality is to first develop your causal theory. Once you have a causal theory you can group all the known variable
43,963
How to perform a non-equi-spaced histogram in R?
You will notice that there is an argument breaks as a part of the function hist(), with the default set to "Sturges". You can also set your own breakpoints and use them instead of the default sturges algorithm as follows: breakpoints <- c(0, 1, 10, 11, 12) hist(data, breaks=breakpoints) If you read all the way down to the bottom, there are a couple of examples with non-equidistant breaks as well. Update: This may not be a direct answer to your question, but you could use a different approach (i.e., graph) than a histogram. Personally, I don't find histograms terribly useful. Instead you could try a kernel density plot, which I think would address the first two cases you list (I don't see how you can get out of the third). In R, the code would be: plot(density(data)).
How to perform a non-equi-spaced histogram in R?
You will notice that there is an argument breaks as a part of the function hist(), with the default set to "Sturges". You can also set your own breakpoints and use them instead of the default sturges
How to perform a non-equi-spaced histogram in R? You will notice that there is an argument breaks as a part of the function hist(), with the default set to "Sturges". You can also set your own breakpoints and use them instead of the default sturges algorithm as follows: breakpoints <- c(0, 1, 10, 11, 12) hist(data, breaks=breakpoints) If you read all the way down to the bottom, there are a couple of examples with non-equidistant breaks as well. Update: This may not be a direct answer to your question, but you could use a different approach (i.e., graph) than a histogram. Personally, I don't find histograms terribly useful. Instead you could try a kernel density plot, which I think would address the first two cases you list (I don't see how you can get out of the third). In R, the code would be: plot(density(data)).
How to perform a non-equi-spaced histogram in R? You will notice that there is an argument breaks as a part of the function hist(), with the default set to "Sturges". You can also set your own breakpoints and use them instead of the default sturges
43,964
How to perform a non-equi-spaced histogram in R?
Denby and Mallows 2009 ungated linkprovide a nice approach called the 'diagonally cut histogram', and provide a function 'dhist' in their supplementary material (available at the above link). Here is the abstract: When constructing a histogram, it is common to make all bars the same width. One could also choose to make them all have the same area. These two options have complementary strengths and weaknesses; the equal-width histogram oversmooths in regions of high density, and is poor at identifying sharp peaks; the equal-area histogram oversmooths in regions of low density, and so does not identify outliers. We describe a compromise approach which avoids both of these defects. We regard the histogram as an exploratory device, rather than as an estimate of a density. We argue that relying on the asymptotics of integrated mean squared error leads to inappropriate recommendations for choosing bin-widths And a figure comparing the a) cdf, b) equal area histogram, c) equal bin-width histogram and d) dhist: Lorraine Denby, Colin Mallows. Journal of Computational and Graphical Statistics. March 1, 2009, 18(1): 21-31. doi:10.1198/jcgs.2009.0002.
How to perform a non-equi-spaced histogram in R?
Denby and Mallows 2009 ungated linkprovide a nice approach called the 'diagonally cut histogram', and provide a function 'dhist' in their supplementary material (available at the above link). Here is
How to perform a non-equi-spaced histogram in R? Denby and Mallows 2009 ungated linkprovide a nice approach called the 'diagonally cut histogram', and provide a function 'dhist' in their supplementary material (available at the above link). Here is the abstract: When constructing a histogram, it is common to make all bars the same width. One could also choose to make them all have the same area. These two options have complementary strengths and weaknesses; the equal-width histogram oversmooths in regions of high density, and is poor at identifying sharp peaks; the equal-area histogram oversmooths in regions of low density, and so does not identify outliers. We describe a compromise approach which avoids both of these defects. We regard the histogram as an exploratory device, rather than as an estimate of a density. We argue that relying on the asymptotics of integrated mean squared error leads to inappropriate recommendations for choosing bin-widths And a figure comparing the a) cdf, b) equal area histogram, c) equal bin-width histogram and d) dhist: Lorraine Denby, Colin Mallows. Journal of Computational and Graphical Statistics. March 1, 2009, 18(1): 21-31. doi:10.1198/jcgs.2009.0002.
How to perform a non-equi-spaced histogram in R? Denby and Mallows 2009 ungated linkprovide a nice approach called the 'diagonally cut histogram', and provide a function 'dhist' in their supplementary material (available at the above link). Here is
43,965
How to perform a non-equi-spaced histogram in R?
One easy solution would be to use quantiles as breaks: x <- rnorm(100) hist(x) hist(x, breaks = quantile(x, 0:10 / 10))
How to perform a non-equi-spaced histogram in R?
One easy solution would be to use quantiles as breaks: x <- rnorm(100) hist(x) hist(x, breaks = quantile(x, 0:10 / 10))
How to perform a non-equi-spaced histogram in R? One easy solution would be to use quantiles as breaks: x <- rnorm(100) hist(x) hist(x, breaks = quantile(x, 0:10 / 10))
How to perform a non-equi-spaced histogram in R? One easy solution would be to use quantiles as breaks: x <- rnorm(100) hist(x) hist(x, breaks = quantile(x, 0:10 / 10))
43,966
No valid coefficients for NegBin regression
Before jumping to a model that includes all interactions, you can try adding only the 2-way interactions: model.nb.intr <- glm.nb(Response ~ (Pred1 + Pred2 + Pred3 + Pred4 + Pred5)^2 - 1, data=d)
No valid coefficients for NegBin regression
Before jumping to a model that includes all interactions, you can try adding only the 2-way interactions: model.nb.intr <- glm.nb(Response ~ (Pred1 + Pred2 + Pred3 + Pred4 + Pred5)^2 - 1, data=d)
No valid coefficients for NegBin regression Before jumping to a model that includes all interactions, you can try adding only the 2-way interactions: model.nb.intr <- glm.nb(Response ~ (Pred1 + Pred2 + Pred3 + Pred4 + Pred5)^2 - 1, data=d)
No valid coefficients for NegBin regression Before jumping to a model that includes all interactions, you can try adding only the 2-way interactions: model.nb.intr <- glm.nb(Response ~ (Pred1 + Pred2 + Pred3 + Pred4 + Pred5)^2 - 1, data=d)
43,967
No valid coefficients for NegBin regression
Your model is too complex for the computer to work out some reasonable starting values that do not lead to infinite deviance when doing the glm.fit iterations. Have you got enough data to estimate all these interactions? Do you think it is plausible for all predictors to interact with each other? If not, think about which predictors might interact and include only those terms. The error asks you to supply some starting values for it to work from. For this, you need to supply a vector of parameter values as argument start; from ?glm: start: starting values for the parameters in the linear predictor. You need to supply 31 model parameters (I hope you have many 1000s of data points?) to start, in this order: > colnames(model.matrix(Y ~ Pred1*Pred2*Pred3*Pred4*Pred5 -1, data = DF)) [1] "Pred1" "Pred2" [3] "Pred3" "Pred4" [5] "Pred5" "Pred1:Pred2" [7] "Pred1:Pred3" "Pred2:Pred3" [9] "Pred1:Pred4" "Pred2:Pred4" [11] "Pred3:Pred4" "Pred1:Pred5" [13] "Pred2:Pred5" "Pred3:Pred5" [15] "Pred4:Pred5" "Pred1:Pred2:Pred3" [17] "Pred1:Pred2:Pred4" "Pred1:Pred3:Pred4" [19] "Pred2:Pred3:Pred4" "Pred1:Pred2:Pred5" [21] "Pred1:Pred3:Pred5" "Pred2:Pred3:Pred5" [23] "Pred1:Pred4:Pred5" "Pred2:Pred4:Pred5" [25] "Pred3:Pred4:Pred5" "Pred1:Pred2:Pred3:Pred4" [27] "Pred1:Pred2:Pred3:Pred5" "Pred1:Pred2:Pred4:Pred5" [29] "Pred1:Pred3:Pred4:Pred5" "Pred2:Pred3:Pred4:Pred5" [31] "Pred1:Pred2:Pred3:Pred4:Pred5" I would use the coefs from the first model to fill in the first 5 starting values and then what you do about the others is up to you. You could try starting them all off at 1 and see if that will get the model to fit? You might also benefit from code in the pscl package which can fit hurdle and zero-inflated models to count data.
No valid coefficients for NegBin regression
Your model is too complex for the computer to work out some reasonable starting values that do not lead to infinite deviance when doing the glm.fit iterations. Have you got enough data to estimate all
No valid coefficients for NegBin regression Your model is too complex for the computer to work out some reasonable starting values that do not lead to infinite deviance when doing the glm.fit iterations. Have you got enough data to estimate all these interactions? Do you think it is plausible for all predictors to interact with each other? If not, think about which predictors might interact and include only those terms. The error asks you to supply some starting values for it to work from. For this, you need to supply a vector of parameter values as argument start; from ?glm: start: starting values for the parameters in the linear predictor. You need to supply 31 model parameters (I hope you have many 1000s of data points?) to start, in this order: > colnames(model.matrix(Y ~ Pred1*Pred2*Pred3*Pred4*Pred5 -1, data = DF)) [1] "Pred1" "Pred2" [3] "Pred3" "Pred4" [5] "Pred5" "Pred1:Pred2" [7] "Pred1:Pred3" "Pred2:Pred3" [9] "Pred1:Pred4" "Pred2:Pred4" [11] "Pred3:Pred4" "Pred1:Pred5" [13] "Pred2:Pred5" "Pred3:Pred5" [15] "Pred4:Pred5" "Pred1:Pred2:Pred3" [17] "Pred1:Pred2:Pred4" "Pred1:Pred3:Pred4" [19] "Pred2:Pred3:Pred4" "Pred1:Pred2:Pred5" [21] "Pred1:Pred3:Pred5" "Pred2:Pred3:Pred5" [23] "Pred1:Pred4:Pred5" "Pred2:Pred4:Pred5" [25] "Pred3:Pred4:Pred5" "Pred1:Pred2:Pred3:Pred4" [27] "Pred1:Pred2:Pred3:Pred5" "Pred1:Pred2:Pred4:Pred5" [29] "Pred1:Pred3:Pred4:Pred5" "Pred2:Pred3:Pred4:Pred5" [31] "Pred1:Pred2:Pred3:Pred4:Pred5" I would use the coefs from the first model to fill in the first 5 starting values and then what you do about the others is up to you. You could try starting them all off at 1 and see if that will get the model to fit? You might also benefit from code in the pscl package which can fit hurdle and zero-inflated models to count data.
No valid coefficients for NegBin regression Your model is too complex for the computer to work out some reasonable starting values that do not lead to infinite deviance when doing the glm.fit iterations. Have you got enough data to estimate all
43,968
No valid coefficients for NegBin regression
If you can't get satisfaction with R you can fit this model and more complicated ones with AD Model Builder which is free software available at http://admb-project.org. ADMB permits you to model the over dispersion in a variety of ways, rather than being confined to the GLM paradigm. I can advise you if you are interested.
No valid coefficients for NegBin regression
If you can't get satisfaction with R you can fit this model and more complicated ones with AD Model Builder which is free software available at http://admb-project.org. ADMB permits you to model the
No valid coefficients for NegBin regression If you can't get satisfaction with R you can fit this model and more complicated ones with AD Model Builder which is free software available at http://admb-project.org. ADMB permits you to model the over dispersion in a variety of ways, rather than being confined to the GLM paradigm. I can advise you if you are interested.
No valid coefficients for NegBin regression If you can't get satisfaction with R you can fit this model and more complicated ones with AD Model Builder which is free software available at http://admb-project.org. ADMB permits you to model the
43,969
Calculating False Acceptance Rate for a Gaussian Distribution of scores
Just to add to other responses, here is a brief recap' on terminology. For any biometric or classification system, the main performance indicator is the receiver operating characteristic (ROC) curve, which is a plot of true acceptance rate (TAR=1-FRR, the false rejection rate) against false acceptance rate (FAR), which is computed as the number of false instances classified as positive among all intruder and impostor cases. The closer the curve is to the top left corner, the better it is (this corresponds to maximizing the so-called area under the curve or AUC). Generally, such curves are generated offline from a database of previous records. In the biometric literature, FAR is sometimes defined such that the "impostor" makes zero effort to obtain a match. Here, I'm roughly quoting Biometrics, from Boulgouris et al. (chap. 26). So, you may choose your cutoff by using standard ROC tools (search for "ROC analysis" on Rseek) to find the best compromise between FAR and TAR (this is not necessarily that cutoff that maximizes the AUC, it depends on your objectives). Now, as has been highlighted in other responses, this compromise between FAR and TAR led to similar interpretation in psychophysics, classification, or biomedical science. It's just a matter of terminology, and we often speak of Hit rate vs. False Alarm rate; sensibility vs. specificty. Note Here are some pictures to complement other responses, which I hope will help you to draw the parallel with decision theory and statistical testing. Let an individual be facing a two-alternative choice experiment. Depending on the location of his internal criterion, his response may lead to Hit or False Alarm (response > criterion), or alternatively Correct Rejection or Miss (response < criterion). The corresponding probabilistic response curve resemble your situation. Most classical textbooks on Statistics provide a Table similar to the one below, where we describe the probabilities of incorrectly rejecting a null hypothesis ($\alpha$) vs. falsely “accepting” the null ($\beta$) where in fact the alternative is true. This leads to quite the same picture as with the psychophysical threshold model:
Calculating False Acceptance Rate for a Gaussian Distribution of scores
Just to add to other responses, here is a brief recap' on terminology. For any biometric or classification system, the main performance indicator is the receiver operating characteristic (ROC) curve,
Calculating False Acceptance Rate for a Gaussian Distribution of scores Just to add to other responses, here is a brief recap' on terminology. For any biometric or classification system, the main performance indicator is the receiver operating characteristic (ROC) curve, which is a plot of true acceptance rate (TAR=1-FRR, the false rejection rate) against false acceptance rate (FAR), which is computed as the number of false instances classified as positive among all intruder and impostor cases. The closer the curve is to the top left corner, the better it is (this corresponds to maximizing the so-called area under the curve or AUC). Generally, such curves are generated offline from a database of previous records. In the biometric literature, FAR is sometimes defined such that the "impostor" makes zero effort to obtain a match. Here, I'm roughly quoting Biometrics, from Boulgouris et al. (chap. 26). So, you may choose your cutoff by using standard ROC tools (search for "ROC analysis" on Rseek) to find the best compromise between FAR and TAR (this is not necessarily that cutoff that maximizes the AUC, it depends on your objectives). Now, as has been highlighted in other responses, this compromise between FAR and TAR led to similar interpretation in psychophysics, classification, or biomedical science. It's just a matter of terminology, and we often speak of Hit rate vs. False Alarm rate; sensibility vs. specificty. Note Here are some pictures to complement other responses, which I hope will help you to draw the parallel with decision theory and statistical testing. Let an individual be facing a two-alternative choice experiment. Depending on the location of his internal criterion, his response may lead to Hit or False Alarm (response > criterion), or alternatively Correct Rejection or Miss (response < criterion). The corresponding probabilistic response curve resemble your situation. Most classical textbooks on Statistics provide a Table similar to the one below, where we describe the probabilities of incorrectly rejecting a null hypothesis ($\alpha$) vs. falsely “accepting” the null ($\beta$) where in fact the alternative is true. This leads to quite the same picture as with the psychophysical threshold model:
Calculating False Acceptance Rate for a Gaussian Distribution of scores Just to add to other responses, here is a brief recap' on terminology. For any biometric or classification system, the main performance indicator is the receiver operating characteristic (ROC) curve,
43,970
Calculating False Acceptance Rate for a Gaussian Distribution of scores
I'm not certain. I'm curious as to the other responses you get. However, I think you'll need to clarify a bit: Does your Gaussian distribution represent the scores for a population of individuals which should be rejected by your biometric system? If so, then I think you simply need to compute a cumulative probability - i.e. the percentage of individuals which should be rejected but who, by random chance, fall above your threshold and are "falsely accepted" by your biometric device. So, it could be as simply as computing the number of people who randomly fall above your threshold divided by the total number of "should be rejected" people. But again, I'm not certain of my response and I think you need to clarify what your assumptions are, what your threshold is, and how you wish to classify individuals as "falsely rejected".
Calculating False Acceptance Rate for a Gaussian Distribution of scores
I'm not certain. I'm curious as to the other responses you get. However, I think you'll need to clarify a bit: Does your Gaussian distribution represent the scores for a population of individuals wh
Calculating False Acceptance Rate for a Gaussian Distribution of scores I'm not certain. I'm curious as to the other responses you get. However, I think you'll need to clarify a bit: Does your Gaussian distribution represent the scores for a population of individuals which should be rejected by your biometric system? If so, then I think you simply need to compute a cumulative probability - i.e. the percentage of individuals which should be rejected but who, by random chance, fall above your threshold and are "falsely accepted" by your biometric device. So, it could be as simply as computing the number of people who randomly fall above your threshold divided by the total number of "should be rejected" people. But again, I'm not certain of my response and I think you need to clarify what your assumptions are, what your threshold is, and how you wish to classify individuals as "falsely rejected".
Calculating False Acceptance Rate for a Gaussian Distribution of scores I'm not certain. I'm curious as to the other responses you get. However, I think you'll need to clarify a bit: Does your Gaussian distribution represent the scores for a population of individuals wh
43,971
Calculating False Acceptance Rate for a Gaussian Distribution of scores
it sounds as tho the following simplified situation may capture the essence of your problem: there are two populations of individuals: A = acceptable individuals and U = unacceptables. associated with each individual is a 'score' $X$. suppose in each of the two populations, the scores have gaussian distributions, where in A, the [true] mean is $\mu_A$ and in U, it is $\mu_U$. we can also suppose [altho need not] that the distributions have the same SD = $\sigma$. all three [or four] parameters are presumably known. suppose $\mu_A > \mu_U$, so it makes sense to accept an individual if their 'score' $X$ is above some threshold $c$, say. there are two ways this rule can go wrong: an $X$ from U can exceed $c$, leading to a false acceptance. an $X$ from A can be below $c$, leading to a false rejection. the probabilities $$err_{falseacc} = P(N(\mu_U, \sigma^2) > c)$$ and $$err_{falserej} = P(N(\mu_A, \sigma^2) < c)$$ are the two error rates associated with the rule. you are focusing on $err_{falseacc}$. it is not difficult to see that as the threshold $c$ is changed, one error-rate will decrease and the other will increase. so $c$ has to be chosen to give values of both error-rates that one can live with. once you choose $c$, as others have already remarked, the error rates can be calculated. in the language of statistics, you are testing two hypotheses about the $\mu$ of the population that the individual with observed score $X$ came from. one hypothesis is H$_A: \mu = \mu_A$ and the other is H$_U: \mu = \mu_U$. the 'test' to decide between these two hypotheses is the above rule and the error rates given above are [somewhat unhelpfully] called the type I and type II errors, or [equally unhelpfully, IMHO] the sensitivity and the specificity or [likewise] the producer's risk and the consumer's risk. which is which depends on which of the two hypotheses is designated as the 'null hypothesis', a distinction that may not be entirely helpful in this context.
Calculating False Acceptance Rate for a Gaussian Distribution of scores
it sounds as tho the following simplified situation may capture the essence of your problem: there are two populations of individuals: A = acceptable individuals and U = unacceptables. associated with
Calculating False Acceptance Rate for a Gaussian Distribution of scores it sounds as tho the following simplified situation may capture the essence of your problem: there are two populations of individuals: A = acceptable individuals and U = unacceptables. associated with each individual is a 'score' $X$. suppose in each of the two populations, the scores have gaussian distributions, where in A, the [true] mean is $\mu_A$ and in U, it is $\mu_U$. we can also suppose [altho need not] that the distributions have the same SD = $\sigma$. all three [or four] parameters are presumably known. suppose $\mu_A > \mu_U$, so it makes sense to accept an individual if their 'score' $X$ is above some threshold $c$, say. there are two ways this rule can go wrong: an $X$ from U can exceed $c$, leading to a false acceptance. an $X$ from A can be below $c$, leading to a false rejection. the probabilities $$err_{falseacc} = P(N(\mu_U, \sigma^2) > c)$$ and $$err_{falserej} = P(N(\mu_A, \sigma^2) < c)$$ are the two error rates associated with the rule. you are focusing on $err_{falseacc}$. it is not difficult to see that as the threshold $c$ is changed, one error-rate will decrease and the other will increase. so $c$ has to be chosen to give values of both error-rates that one can live with. once you choose $c$, as others have already remarked, the error rates can be calculated. in the language of statistics, you are testing two hypotheses about the $\mu$ of the population that the individual with observed score $X$ came from. one hypothesis is H$_A: \mu = \mu_A$ and the other is H$_U: \mu = \mu_U$. the 'test' to decide between these two hypotheses is the above rule and the error rates given above are [somewhat unhelpfully] called the type I and type II errors, or [equally unhelpfully, IMHO] the sensitivity and the specificity or [likewise] the producer's risk and the consumer's risk. which is which depends on which of the two hypotheses is designated as the 'null hypothesis', a distinction that may not be entirely helpful in this context.
Calculating False Acceptance Rate for a Gaussian Distribution of scores it sounds as tho the following simplified situation may capture the essence of your problem: there are two populations of individuals: A = acceptable individuals and U = unacceptables. associated with
43,972
Machine Learning conferences? [closed]
ICML (International Conference on Machine Learning) ICML 2010
Machine Learning conferences? [closed]
ICML (International Conference on Machine Learning) ICML 2010
Machine Learning conferences? [closed] ICML (International Conference on Machine Learning) ICML 2010
Machine Learning conferences? [closed] ICML (International Conference on Machine Learning) ICML 2010
43,973
Machine Learning conferences? [closed]
NIPS (Neural Information Processing Systems). It's actually an intersection of machine learning, and application areas such as speech/language, vision, neuro-science, and other related areas.
Machine Learning conferences? [closed]
NIPS (Neural Information Processing Systems). It's actually an intersection of machine learning, and application areas such as speech/language, vision, neuro-science, and other related areas.
Machine Learning conferences? [closed] NIPS (Neural Information Processing Systems). It's actually an intersection of machine learning, and application areas such as speech/language, vision, neuro-science, and other related areas.
Machine Learning conferences? [closed] NIPS (Neural Information Processing Systems). It's actually an intersection of machine learning, and application areas such as speech/language, vision, neuro-science, and other related areas.
43,974
Machine Learning conferences? [closed]
AISTATS -- Conference on Artificial Intelligence and Statistics Similar flavor of papers to NIPS, although papers may be of slightly lower quality. It is much smaller than ICML or NIPS, which allows people to have deeper interactions.
Machine Learning conferences? [closed]
AISTATS -- Conference on Artificial Intelligence and Statistics Similar flavor of papers to NIPS, although papers may be of slightly lower quality. It is much smaller than ICML or NIPS, which allows p
Machine Learning conferences? [closed] AISTATS -- Conference on Artificial Intelligence and Statistics Similar flavor of papers to NIPS, although papers may be of slightly lower quality. It is much smaller than ICML or NIPS, which allows people to have deeper interactions.
Machine Learning conferences? [closed] AISTATS -- Conference on Artificial Intelligence and Statistics Similar flavor of papers to NIPS, although papers may be of slightly lower quality. It is much smaller than ICML or NIPS, which allows p
43,975
Machine Learning conferences? [closed]
AAAI (in Atlanta this year)
Machine Learning conferences? [closed]
AAAI (in Atlanta this year)
Machine Learning conferences? [closed] AAAI (in Atlanta this year)
Machine Learning conferences? [closed] AAAI (in Atlanta this year)
43,976
Machine Learning conferences? [closed]
Artificial Intelligence In Medicine (AIME), odd years starting from 1985.
Machine Learning conferences? [closed]
Artificial Intelligence In Medicine (AIME), odd years starting from 1985.
Machine Learning conferences? [closed] Artificial Intelligence In Medicine (AIME), odd years starting from 1985.
Machine Learning conferences? [closed] Artificial Intelligence In Medicine (AIME), odd years starting from 1985.
43,977
Machine Learning conferences? [closed]
European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases (ECML PKDD) To see the type of papers presented at the conference see the videos of the last confenece on videolectures.net
Machine Learning conferences? [closed]
European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases (ECML PKDD) To see the type of papers presented at the conference see the videos of the last co
Machine Learning conferences? [closed] European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases (ECML PKDD) To see the type of papers presented at the conference see the videos of the last confenece on videolectures.net
Machine Learning conferences? [closed] European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases (ECML PKDD) To see the type of papers presented at the conference see the videos of the last co
43,978
Machine Learning conferences? [closed]
One of the only machine learning conferences for those in Australia and New Zealand is: 23rd Australasian Joint Conference on Artificial Intelligence It's held in Adelaide this year.
Machine Learning conferences? [closed]
One of the only machine learning conferences for those in Australia and New Zealand is: 23rd Australasian Joint Conference on Artificial Intelligence It's held in Adelaide this year.
Machine Learning conferences? [closed] One of the only machine learning conferences for those in Australia and New Zealand is: 23rd Australasian Joint Conference on Artificial Intelligence It's held in Adelaide this year.
Machine Learning conferences? [closed] One of the only machine learning conferences for those in Australia and New Zealand is: 23rd Australasian Joint Conference on Artificial Intelligence It's held in Adelaide this year.
43,979
Machine Learning conferences? [closed]
European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning
Machine Learning conferences? [closed]
European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning
Machine Learning conferences? [closed] European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning
Machine Learning conferences? [closed] European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning
43,980
Machine Learning conferences? [closed]
IEEE World Congress on Computational Intelligence. Note that it is the link for 2010 conference.
Machine Learning conferences? [closed]
IEEE World Congress on Computational Intelligence. Note that it is the link for 2010 conference.
Machine Learning conferences? [closed] IEEE World Congress on Computational Intelligence. Note that it is the link for 2010 conference.
Machine Learning conferences? [closed] IEEE World Congress on Computational Intelligence. Note that it is the link for 2010 conference.
43,981
Machine Learning conferences? [closed]
International Conference on Artificial Neural Networks. Note that the link is for the 2010 conference.
Machine Learning conferences? [closed]
International Conference on Artificial Neural Networks. Note that the link is for the 2010 conference.
Machine Learning conferences? [closed] International Conference on Artificial Neural Networks. Note that the link is for the 2010 conference.
Machine Learning conferences? [closed] International Conference on Artificial Neural Networks. Note that the link is for the 2010 conference.
43,982
Machine Learning conferences? [closed]
International Conference on Robotics and Automation ICRA2015 ICRA2016
Machine Learning conferences? [closed]
International Conference on Robotics and Automation ICRA2015 ICRA2016
Machine Learning conferences? [closed] International Conference on Robotics and Automation ICRA2015 ICRA2016
Machine Learning conferences? [closed] International Conference on Robotics and Automation ICRA2015 ICRA2016
43,983
Machine Learning conferences? [closed]
IEEE/RSJ International Conference on Intelligent Robots and Systems IROS2015 IROS2016
Machine Learning conferences? [closed]
IEEE/RSJ International Conference on Intelligent Robots and Systems IROS2015 IROS2016
Machine Learning conferences? [closed] IEEE/RSJ International Conference on Intelligent Robots and Systems IROS2015 IROS2016
Machine Learning conferences? [closed] IEEE/RSJ International Conference on Intelligent Robots and Systems IROS2015 IROS2016
43,984
P-value adjustment for a single test with low sample size
No, for a single test you have a single p-value, thus no correction method is needed. Indeed, multiple comparisons problem arises when you perform many statistical tests or when you build many confidence intervals on the same data. Also, the small sample size issue is irrelevant to the multiplicity issue. If you are worried about the validity of the p-value in light of the small sample size, then you may try a test via Bootstrap or permutation.
P-value adjustment for a single test with low sample size
No, for a single test you have a single p-value, thus no correction method is needed. Indeed, multiple comparisons problem arises when you perform many statistical tests or when you build many confide
P-value adjustment for a single test with low sample size No, for a single test you have a single p-value, thus no correction method is needed. Indeed, multiple comparisons problem arises when you perform many statistical tests or when you build many confidence intervals on the same data. Also, the small sample size issue is irrelevant to the multiplicity issue. If you are worried about the validity of the p-value in light of the small sample size, then you may try a test via Bootstrap or permutation.
P-value adjustment for a single test with low sample size No, for a single test you have a single p-value, thus no correction method is needed. Indeed, multiple comparisons problem arises when you perform many statistical tests or when you build many confide
43,985
P-value adjustment for a single test with low sample size
With a small sample size, there are legitimate concerns. What kind of power do you have to reject a false null hypothesis? If your data lack normality, do you have enough data for the t-test to be robust to the deviation to the assumed normality? The latter feeds into the second, as deviations from normality tend to affect t-test power, rather than t-test size. That is, such deviations from the assumed normality make it more difficult to reject false null hypotheses, rather than making it easier to reject true null hypotheses. However, having a small sample size does not make it so your test statistic lacks the claimed distribution. The small sample size is accounted for by using a low number of degrees of freedom. What could be concerning is that, when the sample size is low, the true distribution of the t-stat might differ to a meaningful extent from the claimed distribution, meaning that your p-values are not really telling you what they are supposed to tell you, since they are calculated from incorrect distributions. Since you only have one test, no p-value adjustment is needed to account for multiple tests.
P-value adjustment for a single test with low sample size
With a small sample size, there are legitimate concerns. What kind of power do you have to reject a false null hypothesis? If your data lack normality, do you have enough data for the t-test to be r
P-value adjustment for a single test with low sample size With a small sample size, there are legitimate concerns. What kind of power do you have to reject a false null hypothesis? If your data lack normality, do you have enough data for the t-test to be robust to the deviation to the assumed normality? The latter feeds into the second, as deviations from normality tend to affect t-test power, rather than t-test size. That is, such deviations from the assumed normality make it more difficult to reject false null hypotheses, rather than making it easier to reject true null hypotheses. However, having a small sample size does not make it so your test statistic lacks the claimed distribution. The small sample size is accounted for by using a low number of degrees of freedom. What could be concerning is that, when the sample size is low, the true distribution of the t-stat might differ to a meaningful extent from the claimed distribution, meaning that your p-values are not really telling you what they are supposed to tell you, since they are calculated from incorrect distributions. Since you only have one test, no p-value adjustment is needed to account for multiple tests.
P-value adjustment for a single test with low sample size With a small sample size, there are legitimate concerns. What kind of power do you have to reject a false null hypothesis? If your data lack normality, do you have enough data for the t-test to be r
43,986
P-value adjustment for a single test with low sample size
(This answer ignores the issue with low sample size.) I'd like to add a bit of nuance to the answers here, as it's tempting to read them and come away with this rule: If a single p-value is observed, then correction is unnecessary; the type I error of the testing procedure is not inflated. Type I error is inflated if any part of the testing procedure, i.e., any part of the pipeline from observed dataset -> observed p-value, depends on the data. Read The garden of forking paths1 paper for more info. For example, if— (in another universe) the observations turn out to be so skewed that after plotting them you opt to test for the equality of medians rather than means, and you do not want to inflate the type I error —then a p-value adjustment needs to be made. For example, if you were to use a Bonferroni correction, then the number of null hypotheses here is 2: one for the mean test, and one for the median test. Note that you did not have to observe 2 p-values; you just had to use a testing procedure which allowed for 2 different hypotheses (whether you knew it or not!). Adjustment is unnecessary if universes like (1) don't exist, or you don't care about inflating type I error. To destroy universes like (1), the entire testing procedure needs to be pre-specified, e.g., force yourself to test for the equality of means regardless of the observed distribution (such a decision should usually be based on the science—not the data—anyway). In practical terms, this means implementing the entire data analysis code without looking at any data from your experiment. References Gelman, Andrew, and Eric Loken. "The garden of forking paths: Why multiple comparisons can be a problem, even when there is no “fishing expedition” or “p-hacking” and the research hypothesis was posited ahead of time." Department of Statistics, Columbia University 348 (2013): 1-17.
P-value adjustment for a single test with low sample size
(This answer ignores the issue with low sample size.) I'd like to add a bit of nuance to the answers here, as it's tempting to read them and come away with this rule: If a single p-value is observed,
P-value adjustment for a single test with low sample size (This answer ignores the issue with low sample size.) I'd like to add a bit of nuance to the answers here, as it's tempting to read them and come away with this rule: If a single p-value is observed, then correction is unnecessary; the type I error of the testing procedure is not inflated. Type I error is inflated if any part of the testing procedure, i.e., any part of the pipeline from observed dataset -> observed p-value, depends on the data. Read The garden of forking paths1 paper for more info. For example, if— (in another universe) the observations turn out to be so skewed that after plotting them you opt to test for the equality of medians rather than means, and you do not want to inflate the type I error —then a p-value adjustment needs to be made. For example, if you were to use a Bonferroni correction, then the number of null hypotheses here is 2: one for the mean test, and one for the median test. Note that you did not have to observe 2 p-values; you just had to use a testing procedure which allowed for 2 different hypotheses (whether you knew it or not!). Adjustment is unnecessary if universes like (1) don't exist, or you don't care about inflating type I error. To destroy universes like (1), the entire testing procedure needs to be pre-specified, e.g., force yourself to test for the equality of means regardless of the observed distribution (such a decision should usually be based on the science—not the data—anyway). In practical terms, this means implementing the entire data analysis code without looking at any data from your experiment. References Gelman, Andrew, and Eric Loken. "The garden of forking paths: Why multiple comparisons can be a problem, even when there is no “fishing expedition” or “p-hacking” and the research hypothesis was posited ahead of time." Department of Statistics, Columbia University 348 (2013): 1-17.
P-value adjustment for a single test with low sample size (This answer ignores the issue with low sample size.) I'd like to add a bit of nuance to the answers here, as it's tempting to read them and come away with this rule: If a single p-value is observed,
43,987
Lasso Regression Assumptions
I will be a contrarian and say that most assumptions do not apply to LASSO regression. In the classical linear model, those assumptions are used to show that the OLS estimator is the minimum-variance linear unbiased estimator (Gauss-Markov theorem) and to have correct t-stats, F-stats, and confidence intervals. In LASSO regression, those are less important. LASSO gives a biased estimator, so any of the Gauss-Markov business for the minimum-variance linear unbiased estimator no longer applies; indeed, LASSO is not even a linear estimator of the coefficients, so Gauss-Markov doubly does not apply. Then the hypothesis testing and confidence intervals would not be of primary concern for a LASSO regression. Indeed, it does not even seem agreed upon how such inference would be performed. (Linearity still matters, but that’s because OLS and LASSO both estimate the same parameters, which are the coefficients on the features.) Overall, the typical assumptions are assumed in an OLS linear regression because of nice properties of later inferences that are not particularly important for a situation where LASSO regression would be applied.
Lasso Regression Assumptions
I will be a contrarian and say that most assumptions do not apply to LASSO regression. In the classical linear model, those assumptions are used to show that the OLS estimator is the minimum-variance
Lasso Regression Assumptions I will be a contrarian and say that most assumptions do not apply to LASSO regression. In the classical linear model, those assumptions are used to show that the OLS estimator is the minimum-variance linear unbiased estimator (Gauss-Markov theorem) and to have correct t-stats, F-stats, and confidence intervals. In LASSO regression, those are less important. LASSO gives a biased estimator, so any of the Gauss-Markov business for the minimum-variance linear unbiased estimator no longer applies; indeed, LASSO is not even a linear estimator of the coefficients, so Gauss-Markov doubly does not apply. Then the hypothesis testing and confidence intervals would not be of primary concern for a LASSO regression. Indeed, it does not even seem agreed upon how such inference would be performed. (Linearity still matters, but that’s because OLS and LASSO both estimate the same parameters, which are the coefficients on the features.) Overall, the typical assumptions are assumed in an OLS linear regression because of nice properties of later inferences that are not particularly important for a situation where LASSO regression would be applied.
Lasso Regression Assumptions I will be a contrarian and say that most assumptions do not apply to LASSO regression. In the classical linear model, those assumptions are used to show that the OLS estimator is the minimum-variance
43,988
Lasso Regression Assumptions
Normality is not an assumption of linear regression. Yes, they do. Lasso regression is a linear regression with a penalty term on the magnitude of the coefficients; the penalty term in no way affects the structure of the underlying model (linearity, independence, homoskedasticity) and the assumptions are the same.
Lasso Regression Assumptions
Normality is not an assumption of linear regression. Yes, they do. Lasso regression is a linear regression with a penalty term on the magnitude of the coefficients; the penalty term in no way affect
Lasso Regression Assumptions Normality is not an assumption of linear regression. Yes, they do. Lasso regression is a linear regression with a penalty term on the magnitude of the coefficients; the penalty term in no way affects the structure of the underlying model (linearity, independence, homoskedasticity) and the assumptions are the same.
Lasso Regression Assumptions Normality is not an assumption of linear regression. Yes, they do. Lasso regression is a linear regression with a penalty term on the magnitude of the coefficients; the penalty term in no way affect
43,989
Lasso Regression Assumptions
Yes, they are valid also for Lasso, Ridge Regression and Elastic Net. I think you are referring to classical linear model (CLM) assumptions for cross-sectional regression: Linear in Parameters Random Sampling No perfect collinearity Zero Conditional Mean Homoskedasticity where the first four are used to establish unbiasedness of OLS, whereas the fifth is employed to derive the usual variance formulas and to conclude that OLS is Best linear unbiased. One can also assume normality of the error term to obtain the exact sampling distribution of t statistics and F statistics, so that one can carry out exact hypotheses tests, but normality is not a necessary assumption for CLM.
Lasso Regression Assumptions
Yes, they are valid also for Lasso, Ridge Regression and Elastic Net. I think you are referring to classical linear model (CLM) assumptions for cross-sectional regression: Linear in Parameters Random
Lasso Regression Assumptions Yes, they are valid also for Lasso, Ridge Regression and Elastic Net. I think you are referring to classical linear model (CLM) assumptions for cross-sectional regression: Linear in Parameters Random Sampling No perfect collinearity Zero Conditional Mean Homoskedasticity where the first four are used to establish unbiasedness of OLS, whereas the fifth is employed to derive the usual variance formulas and to conclude that OLS is Best linear unbiased. One can also assume normality of the error term to obtain the exact sampling distribution of t statistics and F statistics, so that one can carry out exact hypotheses tests, but normality is not a necessary assumption for CLM.
Lasso Regression Assumptions Yes, they are valid also for Lasso, Ridge Regression and Elastic Net. I think you are referring to classical linear model (CLM) assumptions for cross-sectional regression: Linear in Parameters Random
43,990
Using StandardScaler function of scikit-learn library
The StandardScaler function from the sklearn library actually does not convert a distribution into a Gaussian or Normal distribution. It is used when there are large variations among the distribution values. It simply is a Feature Scaling method used to standardize the distribution making the values lie in the same range. It subtracts the mean of the distribution from each of its values which is then divided by the standard deviation, thus giving a distribution with mean = 0 and standard deviation = 1, which is not necessarily a normal distribution. It remains non-Gaussian. Similarly, MinMaxScaler is another function that scales and transforms features which can be made to lie in a given range, e.g., (0, 1) which is the default range.
Using StandardScaler function of scikit-learn library
The StandardScaler function from the sklearn library actually does not convert a distribution into a Gaussian or Normal distribution. It is used when there are large variations among the distribution
Using StandardScaler function of scikit-learn library The StandardScaler function from the sklearn library actually does not convert a distribution into a Gaussian or Normal distribution. It is used when there are large variations among the distribution values. It simply is a Feature Scaling method used to standardize the distribution making the values lie in the same range. It subtracts the mean of the distribution from each of its values which is then divided by the standard deviation, thus giving a distribution with mean = 0 and standard deviation = 1, which is not necessarily a normal distribution. It remains non-Gaussian. Similarly, MinMaxScaler is another function that scales and transforms features which can be made to lie in a given range, e.g., (0, 1) which is the default range.
Using StandardScaler function of scikit-learn library The StandardScaler function from the sklearn library actually does not convert a distribution into a Gaussian or Normal distribution. It is used when there are large variations among the distribution
43,991
Using StandardScaler function of scikit-learn library
Not limited to scikit-learn, standardization does not convert features/variables into a normal distribution. It just subtracts the mean and divides by the standard deviation. The resulting feature will have a mean $0$ and a variance $1$. This has nothing to do with normal distribution. In essence, the following affine transform doesn't convert random variables into normal RV: $$Z=\frac{X-\mu}{\sigma}$$
Using StandardScaler function of scikit-learn library
Not limited to scikit-learn, standardization does not convert features/variables into a normal distribution. It just subtracts the mean and divides by the standard deviation. The resulting feature wil
Using StandardScaler function of scikit-learn library Not limited to scikit-learn, standardization does not convert features/variables into a normal distribution. It just subtracts the mean and divides by the standard deviation. The resulting feature will have a mean $0$ and a variance $1$. This has nothing to do with normal distribution. In essence, the following affine transform doesn't convert random variables into normal RV: $$Z=\frac{X-\mu}{\sigma}$$
Using StandardScaler function of scikit-learn library Not limited to scikit-learn, standardization does not convert features/variables into a normal distribution. It just subtracts the mean and divides by the standard deviation. The resulting feature wil
43,992
Expectation over a max operation
If $\text{max}(\mathbb{E}[X], c) = c$, as $\text{max}(X,c) \geq c$, we have \begin{align*} \mathbb{E}[\text{max}(X,c)] &\geq c \\ &\geq \text{max}(\mathbb{E}[X],c) \end{align*} When $\text{max}(\mathbb{E}[X],c) = \mathbb{E}[X]$ then again as $\text{max}(X,c) \geq X$ we have \begin{align*} \mathbb{E}[\text{max}(X,c)] &\geq \mathbb{E}[X] \\ &\geq \text{max}(\mathbb{E}[X],c) \end{align*} So that the inequality is actually the other way $$ \mathbb{E}[\text{max}(X,c)] \geq \text{max}(\mathbb{E}[X], c) $$
Expectation over a max operation
If $\text{max}(\mathbb{E}[X], c) = c$, as $\text{max}(X,c) \geq c$, we have \begin{align*} \mathbb{E}[\text{max}(X,c)] &\geq c \\ &\geq \text{max}(\mathbb{E}[X],c) \end{align*} When $\text{max}(\math
Expectation over a max operation If $\text{max}(\mathbb{E}[X], c) = c$, as $\text{max}(X,c) \geq c$, we have \begin{align*} \mathbb{E}[\text{max}(X,c)] &\geq c \\ &\geq \text{max}(\mathbb{E}[X],c) \end{align*} When $\text{max}(\mathbb{E}[X],c) = \mathbb{E}[X]$ then again as $\text{max}(X,c) \geq X$ we have \begin{align*} \mathbb{E}[\text{max}(X,c)] &\geq \mathbb{E}[X] \\ &\geq \text{max}(\mathbb{E}[X],c) \end{align*} So that the inequality is actually the other way $$ \mathbb{E}[\text{max}(X,c)] \geq \text{max}(\mathbb{E}[X], c) $$
Expectation over a max operation If $\text{max}(\mathbb{E}[X], c) = c$, as $\text{max}(X,c) \geq c$, we have \begin{align*} \mathbb{E}[\text{max}(X,c)] &\geq c \\ &\geq \text{max}(\mathbb{E}[X],c) \end{align*} When $\text{max}(\math
43,993
Expectation over a max operation
Similar to winperikle's answer, just tightening the arguments a bit: $\max\{X, c\} \geq X$ and $\max\{X, c\} \geq c$. So, by taking expectation, $\text{E}\left(\max\{X, c\}\right) \geq \text{E} X$ and $\text{E}\left(\max\{X, c\}\right) \geq c$. Combining, we get $\text{E}\left(\max\{X, c\}\right) \geq \max \{\text{E} X, c\}$. These arguments can be generalized to show that for a sequence of $\mathcal{L}_1$ random variables $(X_n)_{n\geq 1}$, $\text{E} \left(\sup_{n \geq 1} |X_n| \right) \geq \sup_{n \geq 1} \text{E}|X_n|$.
Expectation over a max operation
Similar to winperikle's answer, just tightening the arguments a bit: $\max\{X, c\} \geq X$ and $\max\{X, c\} \geq c$. So, by taking expectation, $\text{E}\left(\max\{X, c\}\right) \geq \text{E} X$ and
Expectation over a max operation Similar to winperikle's answer, just tightening the arguments a bit: $\max\{X, c\} \geq X$ and $\max\{X, c\} \geq c$. So, by taking expectation, $\text{E}\left(\max\{X, c\}\right) \geq \text{E} X$ and $\text{E}\left(\max\{X, c\}\right) \geq c$. Combining, we get $\text{E}\left(\max\{X, c\}\right) \geq \max \{\text{E} X, c\}$. These arguments can be generalized to show that for a sequence of $\mathcal{L}_1$ random variables $(X_n)_{n\geq 1}$, $\text{E} \left(\sup_{n \geq 1} |X_n| \right) \geq \sup_{n \geq 1} \text{E}|X_n|$.
Expectation over a max operation Similar to winperikle's answer, just tightening the arguments a bit: $\max\{X, c\} \geq X$ and $\max\{X, c\} \geq c$. So, by taking expectation, $\text{E}\left(\max\{X, c\}\right) \geq \text{E} X$ and
43,994
Expectation over a max operation
The inequality you have asserted is false: A simple counter-example is $X \sim \text{Bin}(2,\tfrac{1}{2})$ and $c=1$, which gives you the expectation: $$\mathbb{E}(\max(X,c)) = \frac{3}{4} \cdot 1 + \frac{1}{4} \cdot 2 = \frac{5}{4}.$$ For this counter-example we have: $$\frac{5}{4} = \mathbb{E}(\max(X,c)) > \max(\mathbb{E}(X),c) = 1.$$ There is a related inequality that is true: Although the inequality you have asserted is false (or at least, not generally true), the following alternative inequality is true: $$\mathbb{E}(\max(X,c)) \geqslant \max(\mathbb{E}(X), c).$$ This inequality can easily be proven either for the discrete or continuous (or mixed) case. For a discrete random variable you have: $$\begin{equation} \begin{aligned} \mathbb{E}(\max(X,c)) &= \sum_{x \in \mathscr{X}} \max(x,c) \cdot p_X(x) \\[8pt] &\geqslant \sum_{x \in \mathscr{X}} x \cdot p_X(x) = \mathbb{E}(X). \\[8pt] \end{aligned} \end{equation}$$ You also have: $$\begin{equation} \begin{aligned} \mathbb{E}(\max(X,c)) &= \sum_{x \in \mathscr{X}} \max(x,c) \cdot p_X(x) \\[8pt] &\geqslant \sum_{x \in \mathscr{X}} c \cdot p_X(x) = c. \\[8pt] \end{aligned} \end{equation}$$ Putting these together gives the inequality.
Expectation over a max operation
The inequality you have asserted is false: A simple counter-example is $X \sim \text{Bin}(2,\tfrac{1}{2})$ and $c=1$, which gives you the expectation: $$\mathbb{E}(\max(X,c)) = \frac{3}{4} \cdot 1 + \
Expectation over a max operation The inequality you have asserted is false: A simple counter-example is $X \sim \text{Bin}(2,\tfrac{1}{2})$ and $c=1$, which gives you the expectation: $$\mathbb{E}(\max(X,c)) = \frac{3}{4} \cdot 1 + \frac{1}{4} \cdot 2 = \frac{5}{4}.$$ For this counter-example we have: $$\frac{5}{4} = \mathbb{E}(\max(X,c)) > \max(\mathbb{E}(X),c) = 1.$$ There is a related inequality that is true: Although the inequality you have asserted is false (or at least, not generally true), the following alternative inequality is true: $$\mathbb{E}(\max(X,c)) \geqslant \max(\mathbb{E}(X), c).$$ This inequality can easily be proven either for the discrete or continuous (or mixed) case. For a discrete random variable you have: $$\begin{equation} \begin{aligned} \mathbb{E}(\max(X,c)) &= \sum_{x \in \mathscr{X}} \max(x,c) \cdot p_X(x) \\[8pt] &\geqslant \sum_{x \in \mathscr{X}} x \cdot p_X(x) = \mathbb{E}(X). \\[8pt] \end{aligned} \end{equation}$$ You also have: $$\begin{equation} \begin{aligned} \mathbb{E}(\max(X,c)) &= \sum_{x \in \mathscr{X}} \max(x,c) \cdot p_X(x) \\[8pt] &\geqslant \sum_{x \in \mathscr{X}} c \cdot p_X(x) = c. \\[8pt] \end{aligned} \end{equation}$$ Putting these together gives the inequality.
Expectation over a max operation The inequality you have asserted is false: A simple counter-example is $X \sim \text{Bin}(2,\tfrac{1}{2})$ and $c=1$, which gives you the expectation: $$\mathbb{E}(\max(X,c)) = \frac{3}{4} \cdot 1 + \
43,995
Expectation over a max operation
Let X be uniform in (0, 5) and c=2. Here you have a counterexample with each side of the inequality being 3.5 and 2.5
Expectation over a max operation
Let X be uniform in (0, 5) and c=2. Here you have a counterexample with each side of the inequality being 3.5 and 2.5
Expectation over a max operation Let X be uniform in (0, 5) and c=2. Here you have a counterexample with each side of the inequality being 3.5 and 2.5
Expectation over a max operation Let X be uniform in (0, 5) and c=2. Here you have a counterexample with each side of the inequality being 3.5 and 2.5
43,996
Conditional distribution of $\exp(-|x|-|y|-a \cdot |x-y|)$
Disclaimer: although there is nothing to complain about Ben's answer (!), except maybe that the normalising constant of the conditional is not of direct use, here is what I wrote while being off-line, so I may as well post it! The full conditional of $X$ given $Y$ has a density that is proportional to \begin{align} f(x|y) &\propto \exp\{ -|x|-a|y-x|\}\\ &=\begin{cases} \exp\{ -x-a(y-x)\} &\text{ if } 0\le x\le y\\ \exp\{ x-a(y-x)\} &\text{ if } x\le \min(y,0)\\ \exp\{ -x+a(y-x)\} &\text{ if } x\ge \max(0,y)\\ \exp\{ x+a(y-x)\} &\text{ if } y\le x\le 0\\ \end{cases} \\ &=\begin{cases} \exp\{ -(1-a)x-ay\} &\text{ if } 0\le x\le y\\ \exp\{ (1-a)x-ay\} &\text{ if } x\le \min(y,0)\\ \exp\{ -(a+1)x+ay\} &\text{ if } x\ge \max(0,y)\\ \exp\{ (1-a)x+ay\} &\text{ if } y\le x\le 0\\ \end{cases} \\ \end{align} with one of the two conditions $0\le x\le y$ or $y\le x\le 0$ being obviously empty. Each of the (lhs) terms can be normalised into a (rhs) density: \begin{align}\exp\{ -(1-a)x\} \mathbb{I}_{0\le x\le y} &\propto \dfrac{(a-1)\exp\{ -(1-a)x\}}{\exp\{ (a-1)y\}-1}\mathbb{I}_{0\le x\le y}\\ \exp\{ (1+a)x\} \mathbb{I}_{x\le \min(y,0)} &\propto \dfrac{(1+a)\exp\{ (1+a)x\}}{\exp\{ (1+a)\min(y,0)\}} \mathbb{I}_{x\le \min(y,0)}\\ \exp\{ -(1+a)x\} \mathbb{I}_{x\ge \max(0,y)}&\propto \dfrac{(1+a)\exp\{ (1+a)x\}}{\exp\{ (1+a)\max(0,y)\}}\mathbb{I}_{x\ge \max(0,y)}\\ \exp\{ (1-a)x\} \mathbb{I}_{y\le x\le 0} &\propto \dfrac{(1-a)\exp\{ (1-a)x\}}{1-\exp\{ (1-a)y\}}\mathbb{I}_{y\le x\le 0}\\ \end{align} which means that it is directly possible to simulate from each of these densities, by inverse cdf, picking one of the four (three if accounting fo) with probabilities $$\dfrac{\exp\{-ay\}[\exp\{ -(1-a)y\}-1]}{a-1}\mathbb{I}_{y\ge 0}, \dfrac{\exp\{-ay\}\exp\{ (1+a)\min(y,0)\}}{1+a}, \dfrac{\exp\{ay\}\exp\{ (1+a)\max(0,y)\}}{1+a}, \dfrac{\exp\{ay\}[1-\exp\{ (1-a)y\}]}{1-a}\mathbb{I}_{y\le 0}$$ (Obviously, a basic accept-reject algorithm based on a double exponential $\pm\mathcal{E}(1)$ proposal avoids this painful derivation since, when simulating $X\sim\pm\mathcal{E}(1)$ the accept-reject ratio $$\dfrac{\exp\{ -|x|-a|y-x|\}}{\exp\{-|x|\}}$$ is $\exp\{-a|y-x|\}\le 1$ and hence can be compared with a Uniformn draw.) Here is a Gibbs outcome for $a=10$ and $10^3$ Gibbs steps (using accept-reject sampling):
Conditional distribution of $\exp(-|x|-|y|-a \cdot |x-y|)$
Disclaimer: although there is nothing to complain about Ben's answer (!), except maybe that the normalising constant of the conditional is not of direct use, here is what I wrote while being off-lin
Conditional distribution of $\exp(-|x|-|y|-a \cdot |x-y|)$ Disclaimer: although there is nothing to complain about Ben's answer (!), except maybe that the normalising constant of the conditional is not of direct use, here is what I wrote while being off-line, so I may as well post it! The full conditional of $X$ given $Y$ has a density that is proportional to \begin{align} f(x|y) &\propto \exp\{ -|x|-a|y-x|\}\\ &=\begin{cases} \exp\{ -x-a(y-x)\} &\text{ if } 0\le x\le y\\ \exp\{ x-a(y-x)\} &\text{ if } x\le \min(y,0)\\ \exp\{ -x+a(y-x)\} &\text{ if } x\ge \max(0,y)\\ \exp\{ x+a(y-x)\} &\text{ if } y\le x\le 0\\ \end{cases} \\ &=\begin{cases} \exp\{ -(1-a)x-ay\} &\text{ if } 0\le x\le y\\ \exp\{ (1-a)x-ay\} &\text{ if } x\le \min(y,0)\\ \exp\{ -(a+1)x+ay\} &\text{ if } x\ge \max(0,y)\\ \exp\{ (1-a)x+ay\} &\text{ if } y\le x\le 0\\ \end{cases} \\ \end{align} with one of the two conditions $0\le x\le y$ or $y\le x\le 0$ being obviously empty. Each of the (lhs) terms can be normalised into a (rhs) density: \begin{align}\exp\{ -(1-a)x\} \mathbb{I}_{0\le x\le y} &\propto \dfrac{(a-1)\exp\{ -(1-a)x\}}{\exp\{ (a-1)y\}-1}\mathbb{I}_{0\le x\le y}\\ \exp\{ (1+a)x\} \mathbb{I}_{x\le \min(y,0)} &\propto \dfrac{(1+a)\exp\{ (1+a)x\}}{\exp\{ (1+a)\min(y,0)\}} \mathbb{I}_{x\le \min(y,0)}\\ \exp\{ -(1+a)x\} \mathbb{I}_{x\ge \max(0,y)}&\propto \dfrac{(1+a)\exp\{ (1+a)x\}}{\exp\{ (1+a)\max(0,y)\}}\mathbb{I}_{x\ge \max(0,y)}\\ \exp\{ (1-a)x\} \mathbb{I}_{y\le x\le 0} &\propto \dfrac{(1-a)\exp\{ (1-a)x\}}{1-\exp\{ (1-a)y\}}\mathbb{I}_{y\le x\le 0}\\ \end{align} which means that it is directly possible to simulate from each of these densities, by inverse cdf, picking one of the four (three if accounting fo) with probabilities $$\dfrac{\exp\{-ay\}[\exp\{ -(1-a)y\}-1]}{a-1}\mathbb{I}_{y\ge 0}, \dfrac{\exp\{-ay\}\exp\{ (1+a)\min(y,0)\}}{1+a}, \dfrac{\exp\{ay\}\exp\{ (1+a)\max(0,y)\}}{1+a}, \dfrac{\exp\{ay\}[1-\exp\{ (1-a)y\}]}{1-a}\mathbb{I}_{y\le 0}$$ (Obviously, a basic accept-reject algorithm based on a double exponential $\pm\mathcal{E}(1)$ proposal avoids this painful derivation since, when simulating $X\sim\pm\mathcal{E}(1)$ the accept-reject ratio $$\dfrac{\exp\{ -|x|-a|y-x|\}}{\exp\{-|x|\}}$$ is $\exp\{-a|y-x|\}\le 1$ and hence can be compared with a Uniformn draw.) Here is a Gibbs outcome for $a=10$ and $10^3$ Gibbs steps (using accept-reject sampling):
Conditional distribution of $\exp(-|x|-|y|-a \cdot |x-y|)$ Disclaimer: although there is nothing to complain about Ben's answer (!), except maybe that the normalising constant of the conditional is not of direct use, here is what I wrote while being off-lin
43,997
Conditional distribution of $\exp(-|x|-|y|-a \cdot |x-y|)$
The conditional density kernels are: $$\begin{equation} \begin{aligned} f(x|y) &\propto \exp(-|x|-a \cdot |x-y|), \\[6pt] f(y|x) &\propto \exp(-|y|-a \cdot |x-y|). \\[6pt] \end{aligned} \end{equation}$$ The difficulty here is to derive the actual densities that go with these kernels, which takes a bit of algebra. Integration over the full range of values gives the appropriate constant-of-integration: $$C(a,y) \equiv \int \limits_\mathbb{R} \exp(-|x|-a \cdot |x-y|) \ dx.$$ To evaluate this constant you need to break your integral up into pieces so that you can remove the absolute value signs. I will not do all of this, but I will show you part of it, which will show how it can be done. (For simplicity I am going to assume that $0<a<1$.) In the case where $y>0$ we have: $$\begin{equation} \begin{aligned} C(a,y) &= \int \limits_{-\infty}^{0} \exp(x-a (y-x)) \ dx \\ &\quad + \int \limits_{0}^{y} \exp(-x-a (y-x)) \ dx \\ &\quad + \int \limits_{y}^{\infty} \exp(-x-a (x-y)) \ dx \\[6pt] &= \frac{1}{1+a} \Bigg[ \exp((1+a)x-ay)) \Bigg]_{x \rightarrow -\infty}^{x=0} \\ &\quad - \frac{1}{1-a} \Bigg[ \exp((a-1)x-ay)) \Bigg]_{x=0}^{x=y} \\ &\quad - \frac{1}{1+a} \Bigg[ \exp(-(1+a)x + ay)) \Bigg]_{x=y}^{x \rightarrow \infty} \\[6pt] &= \frac{1}{1+a} \cdot \exp(-ay) \\ &\quad - \frac{1}{1-a} \cdot \exp(-y) + \frac{1}{1-a} \cdot \exp(-ay) \\ &\quad + \frac{1}{1+a} \cdot \exp(-y) \\[6pt] &= \Big( \frac{1}{1+a} + \frac{1}{1-a} \Big) \exp(-ay) + \Big( \frac{1}{1+a} - \frac{1}{1-a} \Big) \exp(-y) \\[6pt] &= \frac{2}{1-a^2} \cdot \exp(-ay) - \frac{2a}{1-a^2} \cdot \exp(-y). \\[6pt] \end{aligned} \end{equation}$$ So for $y>0$ you have: $$f(x|y) = \frac{(1-a^2) \exp(-|x|-a \cdot |x-y|)}{2 \exp(-ay) - 2a \exp(-y)}.$$ You will need to derive the corresponding case where $y \leqslant 0$ and then you will have the full density. Both the conditional densities in this problem are the same, so you will then be able to implement the Gibbs sampler by generating from this density.
Conditional distribution of $\exp(-|x|-|y|-a \cdot |x-y|)$
The conditional density kernels are: $$\begin{equation} \begin{aligned} f(x|y) &\propto \exp(-|x|-a \cdot |x-y|), \\[6pt] f(y|x) &\propto \exp(-|y|-a \cdot |x-y|). \\[6pt] \end{aligned} \end{equation}
Conditional distribution of $\exp(-|x|-|y|-a \cdot |x-y|)$ The conditional density kernels are: $$\begin{equation} \begin{aligned} f(x|y) &\propto \exp(-|x|-a \cdot |x-y|), \\[6pt] f(y|x) &\propto \exp(-|y|-a \cdot |x-y|). \\[6pt] \end{aligned} \end{equation}$$ The difficulty here is to derive the actual densities that go with these kernels, which takes a bit of algebra. Integration over the full range of values gives the appropriate constant-of-integration: $$C(a,y) \equiv \int \limits_\mathbb{R} \exp(-|x|-a \cdot |x-y|) \ dx.$$ To evaluate this constant you need to break your integral up into pieces so that you can remove the absolute value signs. I will not do all of this, but I will show you part of it, which will show how it can be done. (For simplicity I am going to assume that $0<a<1$.) In the case where $y>0$ we have: $$\begin{equation} \begin{aligned} C(a,y) &= \int \limits_{-\infty}^{0} \exp(x-a (y-x)) \ dx \\ &\quad + \int \limits_{0}^{y} \exp(-x-a (y-x)) \ dx \\ &\quad + \int \limits_{y}^{\infty} \exp(-x-a (x-y)) \ dx \\[6pt] &= \frac{1}{1+a} \Bigg[ \exp((1+a)x-ay)) \Bigg]_{x \rightarrow -\infty}^{x=0} \\ &\quad - \frac{1}{1-a} \Bigg[ \exp((a-1)x-ay)) \Bigg]_{x=0}^{x=y} \\ &\quad - \frac{1}{1+a} \Bigg[ \exp(-(1+a)x + ay)) \Bigg]_{x=y}^{x \rightarrow \infty} \\[6pt] &= \frac{1}{1+a} \cdot \exp(-ay) \\ &\quad - \frac{1}{1-a} \cdot \exp(-y) + \frac{1}{1-a} \cdot \exp(-ay) \\ &\quad + \frac{1}{1+a} \cdot \exp(-y) \\[6pt] &= \Big( \frac{1}{1+a} + \frac{1}{1-a} \Big) \exp(-ay) + \Big( \frac{1}{1+a} - \frac{1}{1-a} \Big) \exp(-y) \\[6pt] &= \frac{2}{1-a^2} \cdot \exp(-ay) - \frac{2a}{1-a^2} \cdot \exp(-y). \\[6pt] \end{aligned} \end{equation}$$ So for $y>0$ you have: $$f(x|y) = \frac{(1-a^2) \exp(-|x|-a \cdot |x-y|)}{2 \exp(-ay) - 2a \exp(-y)}.$$ You will need to derive the corresponding case where $y \leqslant 0$ and then you will have the full density. Both the conditional densities in this problem are the same, so you will then be able to implement the Gibbs sampler by generating from this density.
Conditional distribution of $\exp(-|x|-|y|-a \cdot |x-y|)$ The conditional density kernels are: $$\begin{equation} \begin{aligned} f(x|y) &\propto \exp(-|x|-a \cdot |x-y|), \\[6pt] f(y|x) &\propto \exp(-|y|-a \cdot |x-y|). \\[6pt] \end{aligned} \end{equation}
43,998
Conditional distribution of $\exp(-|x|-|y|-a \cdot |x-y|)$
An alternative to the painful simulation from the exact full conditional distributions is to ressort to slice sampling, that is, to express the density in $(x,y)$ as the marginal of a density in $(x,y,u_1,u_2,u_3)$ as follows: \begin{align*}f(x,y)&\propto\exp(-|x|-|y|-a \cdot |x-y|)\\&=\int_0^\infty\mathbb{I}_{u_1\le\exp\{-|x|\}}\text{d}u_1\int_0^\infty\mathbb{I}_{u_2\le\exp\{-|y|\}}\text{d}u_2\int_0^\infty\mathbb{I}_{u_3\le\exp\{-a|x-y|\}}\text{d}u_3\end{align*} The full conditionals are then all uniforms \begin{align*} x|y,u_1,u_2,u_3&\sim f(x|y,u_1,u_2,u_3)\propto\mathbb{I}_{u_1\le\exp\{-|x|\}}\mathbb{I}_{u_3\le\exp\{-a|x-y|\}}\\ y|x,u_1,u_2,u_3&\sim f(y|x,u_1,u_2,u_3)\propto\mathbb{I}_{u_2\le\exp\{-|y|\}}\mathbb{I}_{u_3\le\exp\{-a|x-y|\}}\\ u_1|x&\sim\mathcal U(0,\exp\{-|x|\})\\ u_3|x,y&\sim\mathcal U(0,\exp\{-a|x-y|\})\\ u_2|y&\sim\mathcal U(0,\exp\{-|x|\})\\ \end{align*} hence straightforward to simulate: xz=yz=rep(pi,1e3) a=10 for (t in 2:1e3){ u1=runif(1)*exp(-abs(xz[t-1])) u2=runif(1)*exp(-abs(yz[t-1])) u3=runif(1)*exp(-a*abs(xz[t-1]-yz[t-1])) xz[t]=runif(1,log(u1),-log(u1)) while (a*abs(xz[t]-yz[t-1])>-log(u3)) xz[t]=runif(1,log(u1),-log(u1)) yz[t]=runif(1,log(u2),-log(u2)) while (a*abs(xz[t]-yz[t])>-log(u3)) yz[t]=runif(1,log(u2),-log(u2)) } $\qquad\qquad$
Conditional distribution of $\exp(-|x|-|y|-a \cdot |x-y|)$
An alternative to the painful simulation from the exact full conditional distributions is to ressort to slice sampling, that is, to express the density in $(x,y)$ as the marginal of a density in $(x,y
Conditional distribution of $\exp(-|x|-|y|-a \cdot |x-y|)$ An alternative to the painful simulation from the exact full conditional distributions is to ressort to slice sampling, that is, to express the density in $(x,y)$ as the marginal of a density in $(x,y,u_1,u_2,u_3)$ as follows: \begin{align*}f(x,y)&\propto\exp(-|x|-|y|-a \cdot |x-y|)\\&=\int_0^\infty\mathbb{I}_{u_1\le\exp\{-|x|\}}\text{d}u_1\int_0^\infty\mathbb{I}_{u_2\le\exp\{-|y|\}}\text{d}u_2\int_0^\infty\mathbb{I}_{u_3\le\exp\{-a|x-y|\}}\text{d}u_3\end{align*} The full conditionals are then all uniforms \begin{align*} x|y,u_1,u_2,u_3&\sim f(x|y,u_1,u_2,u_3)\propto\mathbb{I}_{u_1\le\exp\{-|x|\}}\mathbb{I}_{u_3\le\exp\{-a|x-y|\}}\\ y|x,u_1,u_2,u_3&\sim f(y|x,u_1,u_2,u_3)\propto\mathbb{I}_{u_2\le\exp\{-|y|\}}\mathbb{I}_{u_3\le\exp\{-a|x-y|\}}\\ u_1|x&\sim\mathcal U(0,\exp\{-|x|\})\\ u_3|x,y&\sim\mathcal U(0,\exp\{-a|x-y|\})\\ u_2|y&\sim\mathcal U(0,\exp\{-|x|\})\\ \end{align*} hence straightforward to simulate: xz=yz=rep(pi,1e3) a=10 for (t in 2:1e3){ u1=runif(1)*exp(-abs(xz[t-1])) u2=runif(1)*exp(-abs(yz[t-1])) u3=runif(1)*exp(-a*abs(xz[t-1]-yz[t-1])) xz[t]=runif(1,log(u1),-log(u1)) while (a*abs(xz[t]-yz[t-1])>-log(u3)) xz[t]=runif(1,log(u1),-log(u1)) yz[t]=runif(1,log(u2),-log(u2)) while (a*abs(xz[t]-yz[t])>-log(u3)) yz[t]=runif(1,log(u2),-log(u2)) } $\qquad\qquad$
Conditional distribution of $\exp(-|x|-|y|-a \cdot |x-y|)$ An alternative to the painful simulation from the exact full conditional distributions is to ressort to slice sampling, that is, to express the density in $(x,y)$ as the marginal of a density in $(x,y
43,999
What does it mean, when, three standard deviations away from the mean, I land outside of the minimum or maximum value?
“Three st.dev.s include 99.7% of the data” You need to add some caveats to such a statement. The 99.7% thing is a fact about normal distributions -- 99.7% of the population values will be within three population standard deviations of the population mean. In large samples* from a normal distribution, it will usually be approximately the case -- about 99.7% of the data would be within three sample standard deviations of the sample mean (if you were sampling from a normal distribution, your sample should be large enough for that to be approximately true - it looks like there's about a 73% chance of getting $0.9973 \pm 0.0010$ with a sample of that size). * assuming random sampling But you don't have a sample from a normal distribution. If you don't put some restrictions on the distribution shape, the actual proportion within 3 standard deviations of the mean may be high or lower. $\qquad\qquad^\text{Example of a distribution with 100% of the distribution inside 2 sds of mean}$ The proportion of a distribution within 3 standard deviations of the mean could be as low as 88.9%. You may require more than 18 standard deviations to get 99.7% in. On the other hand you can get more than 99.7% within a good deal less than one standard deviation. So the 99.7% rule of thumb isn't necessarily much help unless you pin the distribution shape down a bit. If you relax your expectation a bit (to be only very "roughly" 99.7%), then the rule is sometimes useful without requiring normality as long as we keep in mind that it's not always going to work in every situation - even approximately.
What does it mean, when, three standard deviations away from the mean, I land outside of the minimum
“Three st.dev.s include 99.7% of the data” You need to add some caveats to such a statement. The 99.7% thing is a fact about normal distributions -- 99.7% of the population values will be within thr
What does it mean, when, three standard deviations away from the mean, I land outside of the minimum or maximum value? “Three st.dev.s include 99.7% of the data” You need to add some caveats to such a statement. The 99.7% thing is a fact about normal distributions -- 99.7% of the population values will be within three population standard deviations of the population mean. In large samples* from a normal distribution, it will usually be approximately the case -- about 99.7% of the data would be within three sample standard deviations of the sample mean (if you were sampling from a normal distribution, your sample should be large enough for that to be approximately true - it looks like there's about a 73% chance of getting $0.9973 \pm 0.0010$ with a sample of that size). * assuming random sampling But you don't have a sample from a normal distribution. If you don't put some restrictions on the distribution shape, the actual proportion within 3 standard deviations of the mean may be high or lower. $\qquad\qquad^\text{Example of a distribution with 100% of the distribution inside 2 sds of mean}$ The proportion of a distribution within 3 standard deviations of the mean could be as low as 88.9%. You may require more than 18 standard deviations to get 99.7% in. On the other hand you can get more than 99.7% within a good deal less than one standard deviation. So the 99.7% rule of thumb isn't necessarily much help unless you pin the distribution shape down a bit. If you relax your expectation a bit (to be only very "roughly" 99.7%), then the rule is sometimes useful without requiring normality as long as we keep in mind that it's not always going to work in every situation - even approximately.
What does it mean, when, three standard deviations away from the mean, I land outside of the minimum “Three st.dev.s include 99.7% of the data” You need to add some caveats to such a statement. The 99.7% thing is a fact about normal distributions -- 99.7% of the population values will be within thr
44,000
What does it mean, when, three standard deviations away from the mean, I land outside of the minimum or maximum value?
The short answer is that your sample has not precisely followed a normal distribution, so suggests perhaps you might need to re-examine your base assumptions, specifically one that you can apply tools designed for working with a normally distributed population. Just turn your question the other way round for enlightenment. If your sample was normally distributed, then one would expect a sample size of ~2000 to yield 6 data-points outside the range 30-48, on average. Yours does not, which signals a question 'What is the significance of this deviation from normal for any predictions you make by assuming that your wider population is following a normal distribution?' So the wider implication of this small anomaly is that, although your sample may not differ far from a normal distribution, some forecasts made assuming that it does represent a bigger normally distributed population could be inherently flawed and may warrant some qualification or further investigation. However estimating the likelihood of this deviation from normal, and the implied error margins and reliability of resulting forecasts is way beyond my level of ability, although fortunately explored in the many other answers here! But you clearly have a good habit to scrutinise your results in full, to question what your results genuinely mean and whether they prove your original hypothesis or not. Look for further abnormalities revealed in the data, like Kurtosis and Skew to see what clues they reveal or perhaps consider other distributions as better representing your population.
What does it mean, when, three standard deviations away from the mean, I land outside of the minimum
The short answer is that your sample has not precisely followed a normal distribution, so suggests perhaps you might need to re-examine your base assumptions, specifically one that you can apply tools
What does it mean, when, three standard deviations away from the mean, I land outside of the minimum or maximum value? The short answer is that your sample has not precisely followed a normal distribution, so suggests perhaps you might need to re-examine your base assumptions, specifically one that you can apply tools designed for working with a normally distributed population. Just turn your question the other way round for enlightenment. If your sample was normally distributed, then one would expect a sample size of ~2000 to yield 6 data-points outside the range 30-48, on average. Yours does not, which signals a question 'What is the significance of this deviation from normal for any predictions you make by assuming that your wider population is following a normal distribution?' So the wider implication of this small anomaly is that, although your sample may not differ far from a normal distribution, some forecasts made assuming that it does represent a bigger normally distributed population could be inherently flawed and may warrant some qualification or further investigation. However estimating the likelihood of this deviation from normal, and the implied error margins and reliability of resulting forecasts is way beyond my level of ability, although fortunately explored in the many other answers here! But you clearly have a good habit to scrutinise your results in full, to question what your results genuinely mean and whether they prove your original hypothesis or not. Look for further abnormalities revealed in the data, like Kurtosis and Skew to see what clues they reveal or perhaps consider other distributions as better representing your population.
What does it mean, when, three standard deviations away from the mean, I land outside of the minimum The short answer is that your sample has not precisely followed a normal distribution, so suggests perhaps you might need to re-examine your base assumptions, specifically one that you can apply tools