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 |
|---|---|---|---|---|---|---|
29,801 | Random Forest: Class specific feature importance | I would intentionally imbalance the labels using class weights to make 3 lists of importance.
Tests:
downrate A to 10% of actual prevalence
use actual prevalence
downrate B to 10% of actual prevalence
Then for each of these you can rank the importance, and look at those that have big and consistent changes across these tests.
Also, unless you have done a convergence study, you are likely using waay too many trees. I also like to use Boruta to estimate variable importance. The data having ~50k rows and 120 columns isn't that big that you need to get big-centric tools working. | Random Forest: Class specific feature importance | I would intentionally imbalance the labels using class weights to make 3 lists of importance.
Tests:
downrate A to 10% of actual prevalence
use actual prevalence
downrate B to 10% of actual prevalenc | Random Forest: Class specific feature importance
I would intentionally imbalance the labels using class weights to make 3 lists of importance.
Tests:
downrate A to 10% of actual prevalence
use actual prevalence
downrate B to 10% of actual prevalence
Then for each of these you can rank the importance, and look at those that have big and consistent changes across these tests.
Also, unless you have done a convergence study, you are likely using waay too many trees. I also like to use Boruta to estimate variable importance. The data having ~50k rows and 120 columns isn't that big that you need to get big-centric tools working. | Random Forest: Class specific feature importance
I would intentionally imbalance the labels using class weights to make 3 lists of importance.
Tests:
downrate A to 10% of actual prevalence
use actual prevalence
downrate B to 10% of actual prevalenc |
29,802 | Random Forest: Class specific feature importance | There are multiple way of doing so
1) visualization - you can plot the abundance/frequency of each selected feature within each group as a bar plot. I assume visually the top feature will be more abundant in one group comparing with the other groups.
2) Exhaustive way - build 3 Random Forest model on each pair of two labels. Rank the features in each combination and eventually plot the result and see if gini scores for feature x is higher on both combinations. | Random Forest: Class specific feature importance | There are multiple way of doing so
1) visualization - you can plot the abundance/frequency of each selected feature within each group as a bar plot. I assume visually the top feature will be more abun | Random Forest: Class specific feature importance
There are multiple way of doing so
1) visualization - you can plot the abundance/frequency of each selected feature within each group as a bar plot. I assume visually the top feature will be more abundant in one group comparing with the other groups.
2) Exhaustive way - build 3 Random Forest model on each pair of two labels. Rank the features in each combination and eventually plot the result and see if gini scores for feature x is higher on both combinations. | Random Forest: Class specific feature importance
There are multiple way of doing so
1) visualization - you can plot the abundance/frequency of each selected feature within each group as a bar plot. I assume visually the top feature will be more abun |
29,803 | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | if you write the sample mean $\bar x$ as a function of an outlier $O$, then its sensitivity to the value of an outlier is $d\bar x(O)/dO=1/n$, where $n$ is a sample size. the same for a median is zero, because changing value of an outlier doesn't do anything to the median, usually.
example to demonstrate the idea: 1,4,100. the sample mean is $\bar x=35$, if you replace 100 with 1000, you get $\bar x=335$. the median stays the same 4.
this is assuming that the outlier $O$ is not right in the middle of your sample, otherwise, you may get a bigger impact from an outlier on the median compared to the mean.
TL;DR;
adding the outlier
you may be tempted to measure the impact of an outlier by adding it to the sample instead of replacing a valid observation with na outlier. it can be done, but you have to isolate the impact of the sample size change. if you don't do it correctly, then you may end up with pseudo counter factual examples, some of which were proposed in answers here. I'll show you how to do it correctly, then incorrectly.
The mean $x_n$ changes as follows when you add an outlier $O$ to the sample of size $n$:
$$\bar x_{n+O}-\bar x_n=\frac {n \bar x_n +O}{n+1}-\bar x_n$$
Now, let's isolate the part that is adding a new observation $x_{n+1}$ from the outlier value change from $x_{n+1}$ to $O$. We have to do it because, by definition, outlier is an observation that is not from the same distribution as the rest of the sample $x_i$. Remember, the outlier is not a merely large observation, although that is how we often detect them. It is an observation that doesn't belong to the sample, and must be removed from it for this reason.
Here's how we isolate two steps:
$$\bar x_{n+O}-\bar x_n=\frac {n \bar x_n +x_{n+1}}{n+1}-\bar x_n+\frac {O-x_{n+1}}{n+1}\\
=(\bar x_{n+1}-\bar x_n)+\frac {O-x_{n+1}}{n+1}$$
Now, we can see that the second term $\frac {O-x_{n+1}}{n+1}$ in the equation represents the outlier impact on the mean, and that the sensitivity to turning a legit observation $x_{n+1}$ into an outlier $O$ is of the order $1/(n+1)$, just like in case where we were not adding the observation to the sample, of course. Note, that the first term $\bar x_{n+1}-\bar x_n$, which represents additional observation from the same population, is zero on average.
If we apply the same approach to the median $\bar{\bar x}_n$ we get the following equation:
$$\bar{\bar x}_{n+O}-\bar{\bar x}_n=(\bar{\bar x}_{n+1}-\bar{\bar x}_n)+0\times(O-x_{n+1})\\=(\bar{\bar x}_{n+1}-\bar{\bar x}_n)$$
In other words, there is no impact from replacing the legit observation $x_{n+1}$ with an outlier $O$, and the only reason the median $\bar{\bar x}_n$ changes is due to sampling a new observation from the same distribution.
a counter factual, that isn't
The analysis in previous section should give us an idea how to construct the pseudo counter factual example: use a large $n\gg 1$ so that the second term in the mean expression $\frac {O-x_{n+1}}{n+1}$ is smaller that the total change in the median. Here's one such example: "... our data is 5000 ones and 5000 hundreds, and we add an outlier of -100..."
Let's break this example into components as explained above. As an example implies, the values in the distribution are 1s and 100s, and -100 is an outlier. So, we can plug $x_{10001}=1$, and look at the mean:
$$\bar x_{10000+O}-\bar x_{10000}
=\left(50.5-\frac{505001}{10001}\right)+\frac {-100-\frac{505001}{10001}}{10001}\\\approx 0.00495-0.00150\approx 0.00345$$
The term $-0.00150$ in the expression above is the impact of the outlier value. It's is small, as designed, but it is non zero.
The same for the median:
$$\bar{\bar x}_{10000+O}-\bar{\bar x}_{10000}=(\bar{\bar x}_{10001}-\bar{\bar x}_{10000})\\=
(1-50.5)=-49.5$$
Voila! We manufactured a giant change in the median while the mean barely moved. However, if you followed my analysis, you can see the trick: entire change in the median is coming from adding a new observation from the same distribution, not from replacing the valid observation with an outlier, which is, as expected, zero.
a counter factual, that is
Now, what would be a real counter factual? In all previous analysis I assumed that the outlier $O$ stands our from the valid observations with its magnitude outside usual ranges. These are the outliers that we often detect. What if its value was right in the middle?
Let's modify the example above:"... our data is 5000 ones and 5000 hundreds, and we add an outlier of ..." 20!
Let's break this example into components as explained above. As an example implies, the values in the distribution are 1s and 100s, and 20 is an outlier. So, we can plug $x_{10001}=1$, and look at the mean:
$$\bar x_{10000+O}-\bar x_{10000}
=\left(50.5-\frac{505001}{10001}\right)+\frac {20-\frac{505001}{10001}}{10001}\\\approx 0.00495-0.00305\approx 0.00190$$
The term $-0.00305$ in the expression above is the impact of the outlier value. It's is small, as designed, but it is non zero.
The break down for the median is different now!
$$\bar{\bar x}_{10000+O}-\bar{\bar x}_{10000}=(\bar{\bar x}_{10001}-\bar{\bar x}_{10000})\\=
(1-50.5)+(20-1)=-49.5+19=-30.5$$
In this example we have a nonzero, and rather huge change in the median due to the outlier that is 19 compared to the same term's impact to mean of -0.00305! This shows that if you have an outlier that is in the middle of your sample, you can get a bigger impact on the median than the mean.
conclusion
Note, there are myths and misconceptions in statistics that have a strong staying power. For instance, the notion that you need a sample of size 30 for CLT to kick in. Virtually nobody knows who came up with this rule of thumb and based on what kind of analysis. So, it is fun to entertain the idea that maybe this median/mean things is one of these cases. However, it is not. Indeed the median is usually more robust than the mean to the presence of outliers. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | if you write the sample mean $\bar x$ as a function of an outlier $O$, then its sensitivity to the value of an outlier is $d\bar x(O)/dO=1/n$, where $n$ is a sample size. the same for a median is zero | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
if you write the sample mean $\bar x$ as a function of an outlier $O$, then its sensitivity to the value of an outlier is $d\bar x(O)/dO=1/n$, where $n$ is a sample size. the same for a median is zero, because changing value of an outlier doesn't do anything to the median, usually.
example to demonstrate the idea: 1,4,100. the sample mean is $\bar x=35$, if you replace 100 with 1000, you get $\bar x=335$. the median stays the same 4.
this is assuming that the outlier $O$ is not right in the middle of your sample, otherwise, you may get a bigger impact from an outlier on the median compared to the mean.
TL;DR;
adding the outlier
you may be tempted to measure the impact of an outlier by adding it to the sample instead of replacing a valid observation with na outlier. it can be done, but you have to isolate the impact of the sample size change. if you don't do it correctly, then you may end up with pseudo counter factual examples, some of which were proposed in answers here. I'll show you how to do it correctly, then incorrectly.
The mean $x_n$ changes as follows when you add an outlier $O$ to the sample of size $n$:
$$\bar x_{n+O}-\bar x_n=\frac {n \bar x_n +O}{n+1}-\bar x_n$$
Now, let's isolate the part that is adding a new observation $x_{n+1}$ from the outlier value change from $x_{n+1}$ to $O$. We have to do it because, by definition, outlier is an observation that is not from the same distribution as the rest of the sample $x_i$. Remember, the outlier is not a merely large observation, although that is how we often detect them. It is an observation that doesn't belong to the sample, and must be removed from it for this reason.
Here's how we isolate two steps:
$$\bar x_{n+O}-\bar x_n=\frac {n \bar x_n +x_{n+1}}{n+1}-\bar x_n+\frac {O-x_{n+1}}{n+1}\\
=(\bar x_{n+1}-\bar x_n)+\frac {O-x_{n+1}}{n+1}$$
Now, we can see that the second term $\frac {O-x_{n+1}}{n+1}$ in the equation represents the outlier impact on the mean, and that the sensitivity to turning a legit observation $x_{n+1}$ into an outlier $O$ is of the order $1/(n+1)$, just like in case where we were not adding the observation to the sample, of course. Note, that the first term $\bar x_{n+1}-\bar x_n$, which represents additional observation from the same population, is zero on average.
If we apply the same approach to the median $\bar{\bar x}_n$ we get the following equation:
$$\bar{\bar x}_{n+O}-\bar{\bar x}_n=(\bar{\bar x}_{n+1}-\bar{\bar x}_n)+0\times(O-x_{n+1})\\=(\bar{\bar x}_{n+1}-\bar{\bar x}_n)$$
In other words, there is no impact from replacing the legit observation $x_{n+1}$ with an outlier $O$, and the only reason the median $\bar{\bar x}_n$ changes is due to sampling a new observation from the same distribution.
a counter factual, that isn't
The analysis in previous section should give us an idea how to construct the pseudo counter factual example: use a large $n\gg 1$ so that the second term in the mean expression $\frac {O-x_{n+1}}{n+1}$ is smaller that the total change in the median. Here's one such example: "... our data is 5000 ones and 5000 hundreds, and we add an outlier of -100..."
Let's break this example into components as explained above. As an example implies, the values in the distribution are 1s and 100s, and -100 is an outlier. So, we can plug $x_{10001}=1$, and look at the mean:
$$\bar x_{10000+O}-\bar x_{10000}
=\left(50.5-\frac{505001}{10001}\right)+\frac {-100-\frac{505001}{10001}}{10001}\\\approx 0.00495-0.00150\approx 0.00345$$
The term $-0.00150$ in the expression above is the impact of the outlier value. It's is small, as designed, but it is non zero.
The same for the median:
$$\bar{\bar x}_{10000+O}-\bar{\bar x}_{10000}=(\bar{\bar x}_{10001}-\bar{\bar x}_{10000})\\=
(1-50.5)=-49.5$$
Voila! We manufactured a giant change in the median while the mean barely moved. However, if you followed my analysis, you can see the trick: entire change in the median is coming from adding a new observation from the same distribution, not from replacing the valid observation with an outlier, which is, as expected, zero.
a counter factual, that is
Now, what would be a real counter factual? In all previous analysis I assumed that the outlier $O$ stands our from the valid observations with its magnitude outside usual ranges. These are the outliers that we often detect. What if its value was right in the middle?
Let's modify the example above:"... our data is 5000 ones and 5000 hundreds, and we add an outlier of ..." 20!
Let's break this example into components as explained above. As an example implies, the values in the distribution are 1s and 100s, and 20 is an outlier. So, we can plug $x_{10001}=1$, and look at the mean:
$$\bar x_{10000+O}-\bar x_{10000}
=\left(50.5-\frac{505001}{10001}\right)+\frac {20-\frac{505001}{10001}}{10001}\\\approx 0.00495-0.00305\approx 0.00190$$
The term $-0.00305$ in the expression above is the impact of the outlier value. It's is small, as designed, but it is non zero.
The break down for the median is different now!
$$\bar{\bar x}_{10000+O}-\bar{\bar x}_{10000}=(\bar{\bar x}_{10001}-\bar{\bar x}_{10000})\\=
(1-50.5)+(20-1)=-49.5+19=-30.5$$
In this example we have a nonzero, and rather huge change in the median due to the outlier that is 19 compared to the same term's impact to mean of -0.00305! This shows that if you have an outlier that is in the middle of your sample, you can get a bigger impact on the median than the mean.
conclusion
Note, there are myths and misconceptions in statistics that have a strong staying power. For instance, the notion that you need a sample of size 30 for CLT to kick in. Virtually nobody knows who came up with this rule of thumb and based on what kind of analysis. So, it is fun to entertain the idea that maybe this median/mean things is one of these cases. However, it is not. Indeed the median is usually more robust than the mean to the presence of outliers. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
if you write the sample mean $\bar x$ as a function of an outlier $O$, then its sensitivity to the value of an outlier is $d\bar x(O)/dO=1/n$, where $n$ is a sample size. the same for a median is zero |
29,804 | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | A reasonable way to quantify the "sensitivity" of the mean/median to an outlier is to use the absolute rate-of-change of the mean/median as we change that data point. To that end, consider a subsample $x_1,...,x_{n-1}$ and one more data point $x$ (the one we will vary). If we denote the sample mean of this data by $\bar{x}_n$ and the sample median of this data by $\tilde{x}_n$ then we have:
$$\begin{align}
\text{Sensitivity of mean}
&\equiv \bigg| \frac{d\bar{x}_n}{dx} \bigg|
= \frac{1}{n}, \\[12pt]
\text{Sensitivity of median (} n \text{ odd)}
&\equiv \bigg| \frac{d\tilde{x}_n}{dx} \bigg|
= \mathbb{I}(x = x_{((n+1)/2)} < x_{((n+3)/2)}), \\[12pt]
\text{Sensitivity of median (} n \text{ even)}
&\equiv \bigg| \frac{d\tilde{x}_n}{dx} \bigg|
= \frac{1}{2} \cdot \mathbb{I}(x_{(n/2)} \leqslant x \leqslant x_{(n/2+1)} < x_{(n/2+2)}). \\[12pt]
\end{align}$$
In the trivial case where $n \leqslant 2$ the mean and median are identical and so they have the same sensitivity. In the non-trivial case where $n>2$ they are distinct. In this latter case the median is more sensitive to the internal values that affect it (i.e., values within the intervals shown in the above indicator functions) and less sensitive to the external values that do not affect it (e.g., an "outlier"). | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | A reasonable way to quantify the "sensitivity" of the mean/median to an outlier is to use the absolute rate-of-change of the mean/median as we change that data point. To that end, consider a subsampl | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
A reasonable way to quantify the "sensitivity" of the mean/median to an outlier is to use the absolute rate-of-change of the mean/median as we change that data point. To that end, consider a subsample $x_1,...,x_{n-1}$ and one more data point $x$ (the one we will vary). If we denote the sample mean of this data by $\bar{x}_n$ and the sample median of this data by $\tilde{x}_n$ then we have:
$$\begin{align}
\text{Sensitivity of mean}
&\equiv \bigg| \frac{d\bar{x}_n}{dx} \bigg|
= \frac{1}{n}, \\[12pt]
\text{Sensitivity of median (} n \text{ odd)}
&\equiv \bigg| \frac{d\tilde{x}_n}{dx} \bigg|
= \mathbb{I}(x = x_{((n+1)/2)} < x_{((n+3)/2)}), \\[12pt]
\text{Sensitivity of median (} n \text{ even)}
&\equiv \bigg| \frac{d\tilde{x}_n}{dx} \bigg|
= \frac{1}{2} \cdot \mathbb{I}(x_{(n/2)} \leqslant x \leqslant x_{(n/2+1)} < x_{(n/2+2)}). \\[12pt]
\end{align}$$
In the trivial case where $n \leqslant 2$ the mean and median are identical and so they have the same sensitivity. In the non-trivial case where $n>2$ they are distinct. In this latter case the median is more sensitive to the internal values that affect it (i.e., values within the intervals shown in the above indicator functions) and less sensitive to the external values that do not affect it (e.g., an "outlier"). | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
A reasonable way to quantify the "sensitivity" of the mean/median to an outlier is to use the absolute rate-of-change of the mean/median as we change that data point. To that end, consider a subsampl |
29,805 | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | Changing an outlier doesn't change the median; as long as you have at least three data points, making an extremum more extreme doesn't change the median, but it does change the mean by the amount the outlier changes divided by n.
Adding an outlier, or moving a "normal" point to an extreme value, can only move the median to an adjacent central point. For instance, if you start with the data [1,2,3,4,5], and change the first observation to 100 to get [100,2,3,4,5], the median goes from 3 to 4. So not only is the a maximum amount a single outlier can affect the median (the mean, on the other hand, can be affected an unlimited amount), the effect is to move to an adjacently ranked point in the middle of the data, and the data points tend to be more closely packed close to the median. So, for instance, if you have nine points evenly spaced in Gaussian percentile, such as [-1.28, -0.84, -0.52, -0.25, 0, 0.25, 0.52, 0.84, 1.28]. The average separation between observations is 0.32, but changing one observation can change the median by at most 0.25. The median of a bimodal distribution, on the other hand, could be very sensitive to change of one observation, if there are no observations between the modes. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | Changing an outlier doesn't change the median; as long as you have at least three data points, making an extremum more extreme doesn't change the median, but it does change the mean by the amount the | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
Changing an outlier doesn't change the median; as long as you have at least three data points, making an extremum more extreme doesn't change the median, but it does change the mean by the amount the outlier changes divided by n.
Adding an outlier, or moving a "normal" point to an extreme value, can only move the median to an adjacent central point. For instance, if you start with the data [1,2,3,4,5], and change the first observation to 100 to get [100,2,3,4,5], the median goes from 3 to 4. So not only is the a maximum amount a single outlier can affect the median (the mean, on the other hand, can be affected an unlimited amount), the effect is to move to an adjacently ranked point in the middle of the data, and the data points tend to be more closely packed close to the median. So, for instance, if you have nine points evenly spaced in Gaussian percentile, such as [-1.28, -0.84, -0.52, -0.25, 0, 0.25, 0.52, 0.84, 1.28]. The average separation between observations is 0.32, but changing one observation can change the median by at most 0.25. The median of a bimodal distribution, on the other hand, could be very sensitive to change of one observation, if there are no observations between the modes. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
Changing an outlier doesn't change the median; as long as you have at least three data points, making an extremum more extreme doesn't change the median, but it does change the mean by the amount the |
29,806 | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | Extreme values influence the tails of a distribution and the variance of the distribution. This also influences the mean of a sample taken from the distribution.
Extreme values do not influence the center portion of a distribution. This means that the median of a sample taken from a distribution is not influenced so much.
Example
Below is an illustration with a mixture of three normal distributions with different means.
The mixture is 90% a standard normal distribution making the large portion in the middle and two times 5% normal distributions with means at $+ \mu$ and $-\mu$.
The value of $\mu$ is varied giving distributions that mostly change in the tails.
The consequence of the different values of the extremes is that the distribution of the mean (right image) becomes a lot more variable.
For large sample sizes
The sample variance of the mean will relate to the variance of the population:
$$Var[mean(x_n)] \approx \frac{1}{n} Var[x]$$
The sample variance of the median will relate to the slope of the cumulative distribution (and the height of the distribution density near the median)
$$Var[median(x_n)] \approx \frac{1}{n} \frac{1}{4f(median(x))^2}$$
Example where the mean is less influenced by outliers
In general we have that large outliers influence the variance $Var[x]$ a lot, but not so much the density at the median $f(median(x))$.
But, it is possible to construct an example where this is not the case. If we mix/add some percentage $\phi$ of outliers to a distribution with a variance of the outliers that is relative $v$ larger than the variance of the distribution (and consider that these outliers do not change the mean and median), then the new mean and variance will be approximately
$$Var[mean(x_n)] \approx \frac{1}{n} (1-\phi + \phi v) Var[x]$$
$$Var[mean(x_n)] \approx \frac{1}{n} \frac{1}{4((1-\phi)f(median(x))^2}$$
So the relative change (of the sample variance of the statistics) are for the mean $\delta_\mu = (v-1)\phi$ and for the median $\delta_m = \frac{2\phi-\phi^2}{(1-\phi)^2}$. And we have $\delta_m > \delta_\mu$ if $$v < 1+ \frac{2-\phi}{(1-\phi)^2}$$
An example here is a continuous uniform distribution with point masses at the end as 'outliers'. The variance of a continuous uniform distribution is 1/3 of the variance of a Bernoulli distribution with equal spread. So $v=3$ and for any small $\phi>0$ the condition is fulfilled and the median will be relatively more influenced than the mean.
This is a contrived example in which the variance of the outliers is relatively small. This is done by using a continuous uniform distribution with point masses at the ends. So the outliers are very tight and relatively close to the mean of the distribution (relative to the variance of the distribution). | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | Extreme values influence the tails of a distribution and the variance of the distribution. This also influences the mean of a sample taken from the distribution.
Extreme values do not influence the ce | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
Extreme values influence the tails of a distribution and the variance of the distribution. This also influences the mean of a sample taken from the distribution.
Extreme values do not influence the center portion of a distribution. This means that the median of a sample taken from a distribution is not influenced so much.
Example
Below is an illustration with a mixture of three normal distributions with different means.
The mixture is 90% a standard normal distribution making the large portion in the middle and two times 5% normal distributions with means at $+ \mu$ and $-\mu$.
The value of $\mu$ is varied giving distributions that mostly change in the tails.
The consequence of the different values of the extremes is that the distribution of the mean (right image) becomes a lot more variable.
For large sample sizes
The sample variance of the mean will relate to the variance of the population:
$$Var[mean(x_n)] \approx \frac{1}{n} Var[x]$$
The sample variance of the median will relate to the slope of the cumulative distribution (and the height of the distribution density near the median)
$$Var[median(x_n)] \approx \frac{1}{n} \frac{1}{4f(median(x))^2}$$
Example where the mean is less influenced by outliers
In general we have that large outliers influence the variance $Var[x]$ a lot, but not so much the density at the median $f(median(x))$.
But, it is possible to construct an example where this is not the case. If we mix/add some percentage $\phi$ of outliers to a distribution with a variance of the outliers that is relative $v$ larger than the variance of the distribution (and consider that these outliers do not change the mean and median), then the new mean and variance will be approximately
$$Var[mean(x_n)] \approx \frac{1}{n} (1-\phi + \phi v) Var[x]$$
$$Var[mean(x_n)] \approx \frac{1}{n} \frac{1}{4((1-\phi)f(median(x))^2}$$
So the relative change (of the sample variance of the statistics) are for the mean $\delta_\mu = (v-1)\phi$ and for the median $\delta_m = \frac{2\phi-\phi^2}{(1-\phi)^2}$. And we have $\delta_m > \delta_\mu$ if $$v < 1+ \frac{2-\phi}{(1-\phi)^2}$$
An example here is a continuous uniform distribution with point masses at the end as 'outliers'. The variance of a continuous uniform distribution is 1/3 of the variance of a Bernoulli distribution with equal spread. So $v=3$ and for any small $\phi>0$ the condition is fulfilled and the median will be relatively more influenced than the mean.
This is a contrived example in which the variance of the outliers is relatively small. This is done by using a continuous uniform distribution with point masses at the ends. So the outliers are very tight and relatively close to the mean of the distribution (relative to the variance of the distribution). | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
Extreme values influence the tails of a distribution and the variance of the distribution. This also influences the mean of a sample taken from the distribution.
Extreme values do not influence the ce |
29,807 | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | An outlier is not precisely defined, a point can more or less of an outlier. You might say outlier is a fuzzy set where membership depends on the distance $d$ to the pre-existing average. Call such a point a $d$-outlier. The key difference in mean vs median is that the effect on the mean of a introducing a $d$-outlier depends on $d$, but the effect on the median does not. Using Big-0 notation, the effect on the mean is $O(d)$, and the effect on the median is $O(1)$.
Btw "the average weight of a blue whale and 100 squirrels will be closer to the blue whale's weight"--this is not true. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | An outlier is not precisely defined, a point can more or less of an outlier. You might say outlier is a fuzzy set where membership depends on the distance $d$ to the pre-existing average. Call such a | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
An outlier is not precisely defined, a point can more or less of an outlier. You might say outlier is a fuzzy set where membership depends on the distance $d$ to the pre-existing average. Call such a point a $d$-outlier. The key difference in mean vs median is that the effect on the mean of a introducing a $d$-outlier depends on $d$, but the effect on the median does not. Using Big-0 notation, the effect on the mean is $O(d)$, and the effect on the median is $O(1)$.
Btw "the average weight of a blue whale and 100 squirrels will be closer to the blue whale's weight"--this is not true. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
An outlier is not precisely defined, a point can more or less of an outlier. You might say outlier is a fuzzy set where membership depends on the distance $d$ to the pre-existing average. Call such a |
29,808 | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | Mathematical description/proof/viewpoint for special case
There is a short mathematical description/proof in the special case of
Comparing the sensitivity in terms of the variance of the sample statistic. (this can be generalized to the 3rd central moment, and possibly other cost functions)
Symmetric distributions in which case we can express the distribution of the median and mean in terms of integrals of the quantile functions in a similar way.
Let's assume that the distribution is centered at $0$ and the sample size $n$ is odd (such that the median is easier to express as a beta distribution).
Then in terms of the quantile function $Q_X(p)$ we can express
$$\begin{array}{rcrr}
Var[mean(X_n)] &=& \frac{1}{n}\int_0^1& 1 \cdot Q_X(p)^2 \, dp \\
Var[median(X_n)] &=& \frac{1}{n}\int_0^1& f_n(p) \cdot Q_X(p)^2 \, dp
\end{array}$$
where $f(p) = \frac{n}{Beta(\frac{n+1}{2}, \frac{n+1}{2})} p^{\frac{n-1}{2}}(1-p)^{\frac{n-1}{2}}$
Below is a plot of $f_n(p)$ when $n = 9$ and it is compared to the constant value of $1$ that is used to compute the variance of the sample mean.
What the plot shows is that the contribution of the squared quantile function to the variance of the sample statistics (mean/median) is for the median larger in the center and lower at the edges.
Adding outliers versus changing outliers.
When we change outliers, then the quantile function $Q_X(p)$ changes only at the edges where the factor $f_n(p) < 1$ and so the mean is more influenced than the median.
When we add outliers, then the quantile function $Q_X(p)$ is changed in the entire range. So the median might in some particular cases be more influenced than the mean.
Example: Say we have a mixture of two normal distributions with different variances and mixture proportions. Then the change of the quantile function is of a different type when we change the variance in comparison to when we change the proportions.
Below is an example of different quantile functions where we mixed two normal distributions.
The black line is the quantile function for the mixture of $90\%$ a distribution with $\sigma = 1$ and $\phi = 10\%$ a distribution with $\sigma_{outlier} = 2$.
On the left we changed the proportion of outliers $\phi \in \lbrace 20 \%, 30 \%, 40 \% \rbrace$.
On the right we changed the variance of outliers with $ \sigma_{outlier} \in \lbrace 4, 8, 16 \rbrace$.
The quantile function of a mixture is a sum of two components in the horizontal direction. Whether we add more of one component or whether we change the component will have different effects on the sum.
Generalizations
The conditions that the distribution is symmetric and that the distribution is centered at 0 can be lifted. It will make the integrals more complex. $$\begin{array}{rcrr}
Var[mean(X_n)] &=& \frac{1}{n}\int_0^1& 1 \cdot (Q_X(p)-Q_(p_{mean}))^2 \, dp \\
Var[median(X_n)] &=& \frac{1}{n}\int_0^1& f_n(p) \cdot (Q_X(p) - Q_X(p_{median}))^2 \, dp
\end{array}$$ now these 2nd terms in the integrals are different. We have $(Q_X(p)-Q_(p_{mean}))^2$ and $(Q_X(p) - Q_X(p_{median}))^2$. But we still have that the factor in front of it is the constant $1$ versus the factor $f_n(p)$ which goes towards zero at the edges.
The condition that we look at the variance is more difficult to relax. I have made a new question that looks for simple analogous cost functions. But we could imagine with some intuitive handwaving that we could eventually express the cost function as a sum of multiple expressions $$mean: E[S(X_n)] = \sum_{i}g_i(n) \int_0^1 1 \cdot h_{i,n}(Q_X) \, dp \\ median: E[S(X_n)] = \sum_{i}g_i(n) \int_0^1 f_n(p) \cdot h_{i,n}(Q_X) \, dp $$ where we can not solve it with a single term but in each of the terms we still have the $f_n(p)$ factor, which goes towards zero at the edges. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | Mathematical description/proof/viewpoint for special case
There is a short mathematical description/proof in the special case of
Comparing the sensitivity in terms of the variance of the sample stati | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
Mathematical description/proof/viewpoint for special case
There is a short mathematical description/proof in the special case of
Comparing the sensitivity in terms of the variance of the sample statistic. (this can be generalized to the 3rd central moment, and possibly other cost functions)
Symmetric distributions in which case we can express the distribution of the median and mean in terms of integrals of the quantile functions in a similar way.
Let's assume that the distribution is centered at $0$ and the sample size $n$ is odd (such that the median is easier to express as a beta distribution).
Then in terms of the quantile function $Q_X(p)$ we can express
$$\begin{array}{rcrr}
Var[mean(X_n)] &=& \frac{1}{n}\int_0^1& 1 \cdot Q_X(p)^2 \, dp \\
Var[median(X_n)] &=& \frac{1}{n}\int_0^1& f_n(p) \cdot Q_X(p)^2 \, dp
\end{array}$$
where $f(p) = \frac{n}{Beta(\frac{n+1}{2}, \frac{n+1}{2})} p^{\frac{n-1}{2}}(1-p)^{\frac{n-1}{2}}$
Below is a plot of $f_n(p)$ when $n = 9$ and it is compared to the constant value of $1$ that is used to compute the variance of the sample mean.
What the plot shows is that the contribution of the squared quantile function to the variance of the sample statistics (mean/median) is for the median larger in the center and lower at the edges.
Adding outliers versus changing outliers.
When we change outliers, then the quantile function $Q_X(p)$ changes only at the edges where the factor $f_n(p) < 1$ and so the mean is more influenced than the median.
When we add outliers, then the quantile function $Q_X(p)$ is changed in the entire range. So the median might in some particular cases be more influenced than the mean.
Example: Say we have a mixture of two normal distributions with different variances and mixture proportions. Then the change of the quantile function is of a different type when we change the variance in comparison to when we change the proportions.
Below is an example of different quantile functions where we mixed two normal distributions.
The black line is the quantile function for the mixture of $90\%$ a distribution with $\sigma = 1$ and $\phi = 10\%$ a distribution with $\sigma_{outlier} = 2$.
On the left we changed the proportion of outliers $\phi \in \lbrace 20 \%, 30 \%, 40 \% \rbrace$.
On the right we changed the variance of outliers with $ \sigma_{outlier} \in \lbrace 4, 8, 16 \rbrace$.
The quantile function of a mixture is a sum of two components in the horizontal direction. Whether we add more of one component or whether we change the component will have different effects on the sum.
Generalizations
The conditions that the distribution is symmetric and that the distribution is centered at 0 can be lifted. It will make the integrals more complex. $$\begin{array}{rcrr}
Var[mean(X_n)] &=& \frac{1}{n}\int_0^1& 1 \cdot (Q_X(p)-Q_(p_{mean}))^2 \, dp \\
Var[median(X_n)] &=& \frac{1}{n}\int_0^1& f_n(p) \cdot (Q_X(p) - Q_X(p_{median}))^2 \, dp
\end{array}$$ now these 2nd terms in the integrals are different. We have $(Q_X(p)-Q_(p_{mean}))^2$ and $(Q_X(p) - Q_X(p_{median}))^2$. But we still have that the factor in front of it is the constant $1$ versus the factor $f_n(p)$ which goes towards zero at the edges.
The condition that we look at the variance is more difficult to relax. I have made a new question that looks for simple analogous cost functions. But we could imagine with some intuitive handwaving that we could eventually express the cost function as a sum of multiple expressions $$mean: E[S(X_n)] = \sum_{i}g_i(n) \int_0^1 1 \cdot h_{i,n}(Q_X) \, dp \\ median: E[S(X_n)] = \sum_{i}g_i(n) \int_0^1 f_n(p) \cdot h_{i,n}(Q_X) \, dp $$ where we can not solve it with a single term but in each of the terms we still have the $f_n(p)$ factor, which goes towards zero at the edges. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
Mathematical description/proof/viewpoint for special case
There is a short mathematical description/proof in the special case of
Comparing the sensitivity in terms of the variance of the sample stati |
29,809 | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | A helpful concept when considering the sensitivity/robustness of mean vs. median (or other estimators in general) is the breakdown point. This is the proportion of (arbitrarily wrong) outliers that is required for the estimate to become arbitrarily wrong itself.
Using this definition of "robustness", it is easy to see how the median is less sensitive:
At least HALF your samples have to be outliers for the median to break down (meaning it is maximally robust), while a SINGLE sample is enough for the mean to break down. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | A helpful concept when considering the sensitivity/robustness of mean vs. median (or other estimators in general) is the breakdown point. This is the proportion of (arbitrarily wrong) outliers that is | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
A helpful concept when considering the sensitivity/robustness of mean vs. median (or other estimators in general) is the breakdown point. This is the proportion of (arbitrarily wrong) outliers that is required for the estimate to become arbitrarily wrong itself.
Using this definition of "robustness", it is easy to see how the median is less sensitive:
At least HALF your samples have to be outliers for the median to break down (meaning it is maximally robust), while a SINGLE sample is enough for the mean to break down. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
A helpful concept when considering the sensitivity/robustness of mean vs. median (or other estimators in general) is the breakdown point. This is the proportion of (arbitrarily wrong) outliers that is |
29,810 | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | I'm going to say no, there isn't a proof the median is less sensitive than the mean since it's not always true. At least not if you define "less sensitive" as a simple "always changes less under all conditions". I'm told there are various definitions of sensitivity, going along with rules for well-behaved data for which this is true.
Say our data is 5000 ones and 5000 hundreds, and we add an outlier of -100 (or we change one of the hundreds to -100). The median jumps by 50 while the mean barely changes.
That seems like very fake data. So say our data is only multiples of 10, with lots of duplicates. It could even be a proper bell-curve. Then it's possible to choose outliers which consistently change the mean by a small amount (much less than 10), while sometimes changing the median by 10. Or simply changing a value at the median to be an appropriate outlier will do the same.
Or we can abuse the notion of outlier without the need to create artificial peaks. Take the 100 values 1,2 ... 100. Mean and median both 50.5. Then add an "outlier" of -0.1 -- median shifts by exactly 0.5 to 50, mean (5049.9/101) drops by almost 0.5 but not quite. Of course we already have the concepts of "fences" if we want to exclude these barely outlying outliers.
If feels as if we're left claiming the rule is always true for sufficiently "dense" data where the gap between all consecutive values is below some ratio based on the number of data points, and with a sufficiently strong definition of outlier. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | I'm going to say no, there isn't a proof the median is less sensitive than the mean since it's not always true. At least not if you define "less sensitive" as a simple "always changes less under all c | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
I'm going to say no, there isn't a proof the median is less sensitive than the mean since it's not always true. At least not if you define "less sensitive" as a simple "always changes less under all conditions". I'm told there are various definitions of sensitivity, going along with rules for well-behaved data for which this is true.
Say our data is 5000 ones and 5000 hundreds, and we add an outlier of -100 (or we change one of the hundreds to -100). The median jumps by 50 while the mean barely changes.
That seems like very fake data. So say our data is only multiples of 10, with lots of duplicates. It could even be a proper bell-curve. Then it's possible to choose outliers which consistently change the mean by a small amount (much less than 10), while sometimes changing the median by 10. Or simply changing a value at the median to be an appropriate outlier will do the same.
Or we can abuse the notion of outlier without the need to create artificial peaks. Take the 100 values 1,2 ... 100. Mean and median both 50.5. Then add an "outlier" of -0.1 -- median shifts by exactly 0.5 to 50, mean (5049.9/101) drops by almost 0.5 but not quite. Of course we already have the concepts of "fences" if we want to exclude these barely outlying outliers.
If feels as if we're left claiming the rule is always true for sufficiently "dense" data where the gap between all consecutive values is below some ratio based on the number of data points, and with a sufficiently strong definition of outlier. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
I'm going to say no, there isn't a proof the median is less sensitive than the mean since it's not always true. At least not if you define "less sensitive" as a simple "always changes less under all c |
29,811 | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | Actually, there are a large number of illustrated distributions for which the statement can be wrong!
Background for my colleagues, per Wikipedia on Multimodal distributions:
Bimodal distributions have the peculiar property that – unlike the unimodal distributions – the mean may be a more robust sample estimator than the median.[15] This is clearly the case when the distribution is U shaped like the arcsine distribution. It may not be true when the distribution has one or more long tails.
Here is another educational reference (from Douglas College) which is certainly accurate for large data scenarios:
In symmetrical, unimodal datasets, the mean is the most accurate measure of central tendency. For asymmetrical (skewed), unimodal datasets, the median is likely to be more accurate. For bimodal distributions, the only measure that can capture central tendency accurately is the mode.
So, evidently, in the case of said distributions, the statement is incorrect (lacking a specificity to the class of unimodal distributions). | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | Actually, there are a large number of illustrated distributions for which the statement can be wrong!
Background for my colleagues, per Wikipedia on Multimodal distributions:
Bimodal distributions ha | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
Actually, there are a large number of illustrated distributions for which the statement can be wrong!
Background for my colleagues, per Wikipedia on Multimodal distributions:
Bimodal distributions have the peculiar property that – unlike the unimodal distributions – the mean may be a more robust sample estimator than the median.[15] This is clearly the case when the distribution is U shaped like the arcsine distribution. It may not be true when the distribution has one or more long tails.
Here is another educational reference (from Douglas College) which is certainly accurate for large data scenarios:
In symmetrical, unimodal datasets, the mean is the most accurate measure of central tendency. For asymmetrical (skewed), unimodal datasets, the median is likely to be more accurate. For bimodal distributions, the only measure that can capture central tendency accurately is the mode.
So, evidently, in the case of said distributions, the statement is incorrect (lacking a specificity to the class of unimodal distributions). | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
Actually, there are a large number of illustrated distributions for which the statement can be wrong!
Background for my colleagues, per Wikipedia on Multimodal distributions:
Bimodal distributions ha |
29,812 | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | Ironically, you are asking about a generalized truth (i.e., normally true but not always) and wonder about a proof for it. If you want a reason for why outliers TYPICALLY affect mean more so than median, just run a few examples. Your light bulb will turn on in your head after that.
Step 1: Take ANY random sample of 10 real numbers for your example.
Step 2: Identify the outlier with a value that has the greatest absolute value.
Step 3: Add a new item (eleventh item) to your sample set and assign it a positive value number that is 1000 times the magnitude of the absolute value you identified in Step 2.
Step 4: Add a new item (twelfth item) to your sample set and assign it a negative value number that is 1000 times the magnitude of the absolute value you identified in Step 2.
Step 5: Calculate the mean and median of the new data set you have. Compare the results to the initial mean and median. Which one changed more, the mean or the median.
Step 6. Repeat the exercise starting with Step 1, but use different values for the initial ten-item set.
Again, did the median or mean change more? No matter what ten values you choose for your initial data set, the median will not change AT ALL in this exercise! You can use a similar approach for item removal or item replacement, for which the mean does not even change one bit. Clearly, changing the outliers is much more likely to change the mean than the median.
Others with more rigorous proofs might be satisfying your urge for rigor, but the question relates to generalities but allows for exceptions. So, you really don't need all that rigor. There are exceptions to the rule, so why depend on rigorous proofs when the end result is, "Well, 'typically' this rule works but not always...". The example I provided is simple and easy for even a novice to process. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean? | Ironically, you are asking about a generalized truth (i.e., normally true but not always) and wonder about a proof for it. If you want a reason for why outliers TYPICALLY affect mean more so than medi | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
Ironically, you are asking about a generalized truth (i.e., normally true but not always) and wonder about a proof for it. If you want a reason for why outliers TYPICALLY affect mean more so than median, just run a few examples. Your light bulb will turn on in your head after that.
Step 1: Take ANY random sample of 10 real numbers for your example.
Step 2: Identify the outlier with a value that has the greatest absolute value.
Step 3: Add a new item (eleventh item) to your sample set and assign it a positive value number that is 1000 times the magnitude of the absolute value you identified in Step 2.
Step 4: Add a new item (twelfth item) to your sample set and assign it a negative value number that is 1000 times the magnitude of the absolute value you identified in Step 2.
Step 5: Calculate the mean and median of the new data set you have. Compare the results to the initial mean and median. Which one changed more, the mean or the median.
Step 6. Repeat the exercise starting with Step 1, but use different values for the initial ten-item set.
Again, did the median or mean change more? No matter what ten values you choose for your initial data set, the median will not change AT ALL in this exercise! You can use a similar approach for item removal or item replacement, for which the mean does not even change one bit. Clearly, changing the outliers is much more likely to change the mean than the median.
Others with more rigorous proofs might be satisfying your urge for rigor, but the question relates to generalities but allows for exceptions. So, you really don't need all that rigor. There are exceptions to the rule, so why depend on rigorous proofs when the end result is, "Well, 'typically' this rule works but not always...". The example I provided is simple and easy for even a novice to process. | Why is the Median Less Sensitive to Extreme Values Compared to the Mean?
Ironically, you are asking about a generalized truth (i.e., normally true but not always) and wonder about a proof for it. If you want a reason for why outliers TYPICALLY affect mean more so than medi |
29,813 | Is it correct to use 'Ln' instead of 'ln' for natural logarithm? | Why wouldn't it be? As long as it isn't confusing.
However, it is sometimes the case (especially when writing in non-mathematical fields) that there is confusion over base 10 vs. base e, and often people in those fields haven't heard of (or have forgotten about) the difference between ln (or Ln) and log.
If there is possibility of confusion, it is best to specify the base, and do so explicitly: $\log_{10}$ or $\log_\mathrm{e}$ or $\ln$ (base e logarithm) or something similar. | Is it correct to use 'Ln' instead of 'ln' for natural logarithm? | Why wouldn't it be? As long as it isn't confusing.
However, it is sometimes the case (especially when writing in non-mathematical fields) that there is confusion over base 10 vs. base e, and often pe | Is it correct to use 'Ln' instead of 'ln' for natural logarithm?
Why wouldn't it be? As long as it isn't confusing.
However, it is sometimes the case (especially when writing in non-mathematical fields) that there is confusion over base 10 vs. base e, and often people in those fields haven't heard of (or have forgotten about) the difference between ln (or Ln) and log.
If there is possibility of confusion, it is best to specify the base, and do so explicitly: $\log_{10}$ or $\log_\mathrm{e}$ or $\ln$ (base e logarithm) or something similar. | Is it correct to use 'Ln' instead of 'ln' for natural logarithm?
Why wouldn't it be? As long as it isn't confusing.
However, it is sometimes the case (especially when writing in non-mathematical fields) that there is confusion over base 10 vs. base e, and often pe |
29,814 | Is it correct to use 'Ln' instead of 'ln' for natural logarithm? | Be careful, because the notation $\mathrm{Ln}$ is currently used in mathematics. For $z\in\mathbb{C}$, the complex logarithm is the multivalued function defined by
$$
\mathrm{Ln}(z) = \ln(|z|)+i(\arg(z)+2k\pi)
$$
for $k=0,\pm 1,\pm 2, \dots$. Hence, you should check the mentioned papers to verify in which context they use the $\mathrm{Ln}$ notation.
Take a look.
Also, there is some multiplicity of notations. For instance, some people write $\ln(z)$ for the complex logarithm of $z$ and use $\mathrm{Ln}(z)$ to denote its principal value (the value with $k=0$). The notations $\mathrm{Log}(z)$ and $\log(z)$ are also commonly used with the same mixed meanings. | Is it correct to use 'Ln' instead of 'ln' for natural logarithm? | Be careful, because the notation $\mathrm{Ln}$ is currently used in mathematics. For $z\in\mathbb{C}$, the complex logarithm is the multivalued function defined by
$$
\mathrm{Ln}(z) = \ln(|z|)+i(\ar | Is it correct to use 'Ln' instead of 'ln' for natural logarithm?
Be careful, because the notation $\mathrm{Ln}$ is currently used in mathematics. For $z\in\mathbb{C}$, the complex logarithm is the multivalued function defined by
$$
\mathrm{Ln}(z) = \ln(|z|)+i(\arg(z)+2k\pi)
$$
for $k=0,\pm 1,\pm 2, \dots$. Hence, you should check the mentioned papers to verify in which context they use the $\mathrm{Ln}$ notation.
Take a look.
Also, there is some multiplicity of notations. For instance, some people write $\ln(z)$ for the complex logarithm of $z$ and use $\mathrm{Ln}(z)$ to denote its principal value (the value with $k=0$). The notations $\mathrm{Log}(z)$ and $\log(z)$ are also commonly used with the same mixed meanings. | Is it correct to use 'Ln' instead of 'ln' for natural logarithm?
Be careful, because the notation $\mathrm{Ln}$ is currently used in mathematics. For $z\in\mathbb{C}$, the complex logarithm is the multivalued function defined by
$$
\mathrm{Ln}(z) = \ln(|z|)+i(\ar |
29,815 | Is it correct to use 'Ln' instead of 'ln' for natural logarithm? | The forms $\ln$ or $\log_\mathrm{e}$ are standard in all fields I'm familiar with.† Though $\mathrm{Ln}$ might've become a standard, it didn't; & though it's unlikely to cause more than a momentary hesitation on the reader's part, even that is worth taking pains to avert. Moreover, I've noticed that its use is correlated with the commission of graver mathematical solecisms, so you may want to eschew it to avoid making a bad impression among those that know and care about such things.
In business notation is often sloppy, & while you're likely to see $\mathrm{Ln}$ often enough, it doesn't constitute an alternative standard, or necessarily result from a deliberate choice—could well be due to Powerpoint's autocorrect feature.
† Complex analysis isn't one of them—see @Zen's answer. | Is it correct to use 'Ln' instead of 'ln' for natural logarithm? | The forms $\ln$ or $\log_\mathrm{e}$ are standard in all fields I'm familiar with.† Though $\mathrm{Ln}$ might've become a standard, it didn't; & though it's unlikely to cause more than a momentary he | Is it correct to use 'Ln' instead of 'ln' for natural logarithm?
The forms $\ln$ or $\log_\mathrm{e}$ are standard in all fields I'm familiar with.† Though $\mathrm{Ln}$ might've become a standard, it didn't; & though it's unlikely to cause more than a momentary hesitation on the reader's part, even that is worth taking pains to avert. Moreover, I've noticed that its use is correlated with the commission of graver mathematical solecisms, so you may want to eschew it to avoid making a bad impression among those that know and care about such things.
In business notation is often sloppy, & while you're likely to see $\mathrm{Ln}$ often enough, it doesn't constitute an alternative standard, or necessarily result from a deliberate choice—could well be due to Powerpoint's autocorrect feature.
† Complex analysis isn't one of them—see @Zen's answer. | Is it correct to use 'Ln' instead of 'ln' for natural logarithm?
The forms $\ln$ or $\log_\mathrm{e}$ are standard in all fields I'm familiar with.† Though $\mathrm{Ln}$ might've become a standard, it didn't; & though it's unlikely to cause more than a momentary he |
29,816 | Is it correct to use 'Ln' instead of 'ln' for natural logarithm? | My guess is they were worried that in whatever typeface the paper was published in, the ln would look too much like the word In. I saw a typescript (dating myself) where ℓn [that is Latex \ell] was used, which meant changing the type ball of an IBM Selectric. | Is it correct to use 'Ln' instead of 'ln' for natural logarithm? | My guess is they were worried that in whatever typeface the paper was published in, the ln would look too much like the word In. I saw a typescript (dating myself) where ℓn [that is Latex \ell] was us | Is it correct to use 'Ln' instead of 'ln' for natural logarithm?
My guess is they were worried that in whatever typeface the paper was published in, the ln would look too much like the word In. I saw a typescript (dating myself) where ℓn [that is Latex \ell] was used, which meant changing the type ball of an IBM Selectric. | Is it correct to use 'Ln' instead of 'ln' for natural logarithm?
My guess is they were worried that in whatever typeface the paper was published in, the ln would look too much like the word In. I saw a typescript (dating myself) where ℓn [that is Latex \ell] was us |
29,817 | Recommended visualization libraries for standalone applications | The Visualization Tool Kit VTK is pretty impressive for 3D visualizations of numerical data. Unfortunately, it is also pretty low level.
Graphviz is used pretty extensively for visualizing graphs and other tree-like data structures.
igraph can also be used for visualization of tree-like data structures. Contains nice interfaces to scripting languages such as R and Python along with a stand-alone C library.
The NCL (NCAR Command Language) library contains some pretty neat graphing routines- especially if you are looking at spatially distributed, multidimensional data such as wind fields. Which makes sense as NCAR is the National Center for Atmospheric Research.
If you are willing to relax the executable requirement, or try a tool like py2exe, there is the possibility of leveraging some neat Python libraries and applications such as:
MayaVi: A higher level front-end to VTK developed by Enthought.
Chaco: Another Enthought library focused on 2D graphs.
Matplotlib: Another 2D plotting library. Has nice support for TeX-based mathematical annotation.
Basemap: An add-on to Matplotlib for drawing maps and displaying geographic data (sexy examples here).
If we were to bend the concept of "standalone application" even further to include PDF files, there are some neat graphics libraries available to LaTeX users:
Asymptote can generate a variety of graphs, but its crown jewel is definitely the ability to embed 3D graphs into PDF documents that can be manipulated (zoomed, rotated, animated, etc) by anyone using the Adobe Acrobat reader (example).
PGF/TikZ provides a wonderful vector drawing language to TeX documents. The manual is hands-down the most well-written, comprehensive and beautiful piece of documentation I have ever seen in an open source project. PGFPlots provides an abstraction layer for drawing plots. A wondeful showcase can be found at TeXample.
PSTricks served as an inspiration for TikZ and allows users to leverage the power of the PostScript language to create some neat graphics.
And for kicks, there's DISLIN, which has a native interface for Fortran! Not open source or free for commercial use though. | Recommended visualization libraries for standalone applications | The Visualization Tool Kit VTK is pretty impressive for 3D visualizations of numerical data. Unfortunately, it is also pretty low level.
Graphviz is used pretty extensively for visualizing graphs and | Recommended visualization libraries for standalone applications
The Visualization Tool Kit VTK is pretty impressive for 3D visualizations of numerical data. Unfortunately, it is also pretty low level.
Graphviz is used pretty extensively for visualizing graphs and other tree-like data structures.
igraph can also be used for visualization of tree-like data structures. Contains nice interfaces to scripting languages such as R and Python along with a stand-alone C library.
The NCL (NCAR Command Language) library contains some pretty neat graphing routines- especially if you are looking at spatially distributed, multidimensional data such as wind fields. Which makes sense as NCAR is the National Center for Atmospheric Research.
If you are willing to relax the executable requirement, or try a tool like py2exe, there is the possibility of leveraging some neat Python libraries and applications such as:
MayaVi: A higher level front-end to VTK developed by Enthought.
Chaco: Another Enthought library focused on 2D graphs.
Matplotlib: Another 2D plotting library. Has nice support for TeX-based mathematical annotation.
Basemap: An add-on to Matplotlib for drawing maps and displaying geographic data (sexy examples here).
If we were to bend the concept of "standalone application" even further to include PDF files, there are some neat graphics libraries available to LaTeX users:
Asymptote can generate a variety of graphs, but its crown jewel is definitely the ability to embed 3D graphs into PDF documents that can be manipulated (zoomed, rotated, animated, etc) by anyone using the Adobe Acrobat reader (example).
PGF/TikZ provides a wonderful vector drawing language to TeX documents. The manual is hands-down the most well-written, comprehensive and beautiful piece of documentation I have ever seen in an open source project. PGFPlots provides an abstraction layer for drawing plots. A wondeful showcase can be found at TeXample.
PSTricks served as an inspiration for TikZ and allows users to leverage the power of the PostScript language to create some neat graphics.
And for kicks, there's DISLIN, which has a native interface for Fortran! Not open source or free for commercial use though. | Recommended visualization libraries for standalone applications
The Visualization Tool Kit VTK is pretty impressive for 3D visualizations of numerical data. Unfortunately, it is also pretty low level.
Graphviz is used pretty extensively for visualizing graphs and |
29,818 | Recommended visualization libraries for standalone applications | There is always lovely gnuplot:
http://www.gnuplot.info/
Gnuplot is a portable command-line driven graphing utility for linux, OS/2, MS Windows, OSX, VMS, and many other platforms. The source code is copyrighted but freely distributed (i.e., you don't have to pay for it). It was originally created to allow scientists and students to visualize mathematical functions and data interactively, but has grown to support many non-interactive uses such as web scripting. It is also used as a plotting engine by third-party applications like Octave. Gnuplot has been supported and under active development since 1986.
Gnuplot supports many types of plots in either 2D and 3D. It can draw using lines, points, boxes, contours, vector fields, surfaces, and various associated text. It also supports various specialized plot types. | Recommended visualization libraries for standalone applications | There is always lovely gnuplot:
http://www.gnuplot.info/
Gnuplot is a portable command-line driven graphing utility for linux, OS/2, MS Windows, OSX, VMS, and many other platforms. The source code | Recommended visualization libraries for standalone applications
There is always lovely gnuplot:
http://www.gnuplot.info/
Gnuplot is a portable command-line driven graphing utility for linux, OS/2, MS Windows, OSX, VMS, and many other platforms. The source code is copyrighted but freely distributed (i.e., you don't have to pay for it). It was originally created to allow scientists and students to visualize mathematical functions and data interactively, but has grown to support many non-interactive uses such as web scripting. It is also used as a plotting engine by third-party applications like Octave. Gnuplot has been supported and under active development since 1986.
Gnuplot supports many types of plots in either 2D and 3D. It can draw using lines, points, boxes, contours, vector fields, surfaces, and various associated text. It also supports various specialized plot types. | Recommended visualization libraries for standalone applications
There is always lovely gnuplot:
http://www.gnuplot.info/
Gnuplot is a portable command-line driven graphing utility for linux, OS/2, MS Windows, OSX, VMS, and many other platforms. The source code |
29,819 | Recommended visualization libraries for standalone applications | You could have a look at Processing: http://processing.org/ | Recommended visualization libraries for standalone applications | You could have a look at Processing: http://processing.org/ | Recommended visualization libraries for standalone applications
You could have a look at Processing: http://processing.org/ | Recommended visualization libraries for standalone applications
You could have a look at Processing: http://processing.org/ |
29,820 | Recommended visualization libraries for standalone applications | If you can use R try ggplot2. | Recommended visualization libraries for standalone applications | If you can use R try ggplot2. | Recommended visualization libraries for standalone applications
If you can use R try ggplot2. | Recommended visualization libraries for standalone applications
If you can use R try ggplot2. |
29,821 | Recommended visualization libraries for standalone applications | For visualizing graphs in a Java/SWT environment, check out Zest: http://eclipse.org/gef/zest | Recommended visualization libraries for standalone applications | For visualizing graphs in a Java/SWT environment, check out Zest: http://eclipse.org/gef/zest | Recommended visualization libraries for standalone applications
For visualizing graphs in a Java/SWT environment, check out Zest: http://eclipse.org/gef/zest | Recommended visualization libraries for standalone applications
For visualizing graphs in a Java/SWT environment, check out Zest: http://eclipse.org/gef/zest |
29,822 | Recommended visualization libraries for standalone applications | There is also Gephi for plotting social networks.
(p.s: Here is how to connect it with R) | Recommended visualization libraries for standalone applications | There is also Gephi for plotting social networks.
(p.s: Here is how to connect it with R) | Recommended visualization libraries for standalone applications
There is also Gephi for plotting social networks.
(p.s: Here is how to connect it with R) | Recommended visualization libraries for standalone applications
There is also Gephi for plotting social networks.
(p.s: Here is how to connect it with R) |
29,823 | Recommended visualization libraries for standalone applications | For javascript protovis (http://vis.stanford.edu/protovis/) is very nice. | Recommended visualization libraries for standalone applications | For javascript protovis (http://vis.stanford.edu/protovis/) is very nice. | Recommended visualization libraries for standalone applications
For javascript protovis (http://vis.stanford.edu/protovis/) is very nice. | Recommended visualization libraries for standalone applications
For javascript protovis (http://vis.stanford.edu/protovis/) is very nice. |
29,824 | Recommended visualization libraries for standalone applications | Might be a bit narrow in scope, but if you're doing any work in Clojure on the JVM there's the excellent Incanter:
Incanter is a Clojure-based, R-like platform for statistical computing and graphics. | Recommended visualization libraries for standalone applications | Might be a bit narrow in scope, but if you're doing any work in Clojure on the JVM there's the excellent Incanter:
Incanter is a Clojure-based, R-like platform for statistical computing and graphics. | Recommended visualization libraries for standalone applications
Might be a bit narrow in scope, but if you're doing any work in Clojure on the JVM there's the excellent Incanter:
Incanter is a Clojure-based, R-like platform for statistical computing and graphics. | Recommended visualization libraries for standalone applications
Might be a bit narrow in scope, but if you're doing any work in Clojure on the JVM there's the excellent Incanter:
Incanter is a Clojure-based, R-like platform for statistical computing and graphics. |
29,825 | Recommended visualization libraries for standalone applications | I've used ZedGraph for .NET. It's open source, and supports all common 2D chart types. | Recommended visualization libraries for standalone applications | I've used ZedGraph for .NET. It's open source, and supports all common 2D chart types. | Recommended visualization libraries for standalone applications
I've used ZedGraph for .NET. It's open source, and supports all common 2D chart types. | Recommended visualization libraries for standalone applications
I've used ZedGraph for .NET. It's open source, and supports all common 2D chart types. |
29,826 | Recommended visualization libraries for standalone applications | Unfortunately, it only runs on macs, but otherwise a great application (basically Processing in python):
http://nodebox.net/code/index.php/Home
NodeBox is a Mac OS X application that lets you create 2D visuals (static, animated or interactive) using Python programming code and export them as a PDF or a QuickTime movie. NodeBox is free and well-documented. | Recommended visualization libraries for standalone applications | Unfortunately, it only runs on macs, but otherwise a great application (basically Processing in python):
http://nodebox.net/code/index.php/Home
NodeBox is a Mac OS X application that lets you creat | Recommended visualization libraries for standalone applications
Unfortunately, it only runs on macs, but otherwise a great application (basically Processing in python):
http://nodebox.net/code/index.php/Home
NodeBox is a Mac OS X application that lets you create 2D visuals (static, animated or interactive) using Python programming code and export them as a PDF or a QuickTime movie. NodeBox is free and well-documented. | Recommended visualization libraries for standalone applications
Unfortunately, it only runs on macs, but otherwise a great application (basically Processing in python):
http://nodebox.net/code/index.php/Home
NodeBox is a Mac OS X application that lets you creat |
29,827 | Can statistical units measured per thousand inhabitants be bigger than 1000? | This is not a rate per one thousand people, this is the absolute number of people, with one unit equating 1,000 people. So if you see something like 3,258.1, it simply means 3,258,100 people.
This is not very explicit and not well-documented (to say the least), but you can see it in the "Unit of measure: Thousand persons" part of the table. The meaning of this mention itself is not well-documented on the page, but is explained on another page of Eurostat:
Unit of measure
Most results measure number of persons (thousands). Some indicators
are reported as rates (employment, unemployment rates). Some variables
are reported in other units (ages in years, working time in hours,
etc.).
Here is a screenshot of where to find this mention:
Note that Eurostat has a multilingual user support team that you can contact (even by phone, a rarity) in case you have doubts about interpreting their data. | Can statistical units measured per thousand inhabitants be bigger than 1000? | This is not a rate per one thousand people, this is the absolute number of people, with one unit equating 1,000 people. So if you see something like 3,258.1, it simply means 3,258,100 people.
This is | Can statistical units measured per thousand inhabitants be bigger than 1000?
This is not a rate per one thousand people, this is the absolute number of people, with one unit equating 1,000 people. So if you see something like 3,258.1, it simply means 3,258,100 people.
This is not very explicit and not well-documented (to say the least), but you can see it in the "Unit of measure: Thousand persons" part of the table. The meaning of this mention itself is not well-documented on the page, but is explained on another page of Eurostat:
Unit of measure
Most results measure number of persons (thousands). Some indicators
are reported as rates (employment, unemployment rates). Some variables
are reported in other units (ages in years, working time in hours,
etc.).
Here is a screenshot of where to find this mention:
Note that Eurostat has a multilingual user support team that you can contact (even by phone, a rarity) in case you have doubts about interpreting their data. | Can statistical units measured per thousand inhabitants be bigger than 1000?
This is not a rate per one thousand people, this is the absolute number of people, with one unit equating 1,000 people. So if you see something like 3,258.1, it simply means 3,258,100 people.
This is |
29,828 | Can statistical units measured per thousand inhabitants be bigger than 1000? | (THIS IS NO LONGER THE CORRECT ANSWER BUT IS KEPT UP AS AN INTERESTING IDEA. THIS IS THE CORRECT ANSWER.)
I find it plausible that the calculation, while reported as number of self-employed people per $1000$ people (which cannot exceed $1000$), is actually the number of self-employment jobs per $1000$ people. With $2020$ being a major COVID year with a lot of work-from-home, I find it plausible that people took on self-employment side hustles, perhaps in such a large quantity that there were more such side hustles than people.
This could lead to a more than $1000$ per $1000$ people yet not break mathematics. | Can statistical units measured per thousand inhabitants be bigger than 1000? | (THIS IS NO LONGER THE CORRECT ANSWER BUT IS KEPT UP AS AN INTERESTING IDEA. THIS IS THE CORRECT ANSWER.)
I find it plausible that the calculation, while reported as number of self-employed people per | Can statistical units measured per thousand inhabitants be bigger than 1000?
(THIS IS NO LONGER THE CORRECT ANSWER BUT IS KEPT UP AS AN INTERESTING IDEA. THIS IS THE CORRECT ANSWER.)
I find it plausible that the calculation, while reported as number of self-employed people per $1000$ people (which cannot exceed $1000$), is actually the number of self-employment jobs per $1000$ people. With $2020$ being a major COVID year with a lot of work-from-home, I find it plausible that people took on self-employment side hustles, perhaps in such a large quantity that there were more such side hustles than people.
This could lead to a more than $1000$ per $1000$ people yet not break mathematics. | Can statistical units measured per thousand inhabitants be bigger than 1000?
(THIS IS NO LONGER THE CORRECT ANSWER BUT IS KEPT UP AS AN INTERESTING IDEA. THIS IS THE CORRECT ANSWER.)
I find it plausible that the calculation, while reported as number of self-employed people per |
29,829 | Can statistical units measured per thousand inhabitants be bigger than 1000? | The specific question from the body text is answered by J-J-J but the title question can have more explanations
Can statistical units measured per thousand inhabitants be bigger than 1000?
The number can be bigger if the count is not inhabitants per inhabitants. For example the number of shoes per inhabitant is most likely exceeding beyond 2.
But also for a count like people per inhabitants the ratio can exceed 1. For example in a particular city with a large industry, commercial properties and/or tourism the number of workers per inhabitants can exceed 1 if many of the workers live outside the city.
In addition. Figures can exceed 100% when they are measured with some source of error.
In technical applications this can happen for instance when yield is computed and some experiment weighs before and after some treatment. If the process is close to 100% yield then it might sometimes exceed 100% due to measurement errors with weighting or because the process has some residue from a previous experiment (when I put 100 gram beans in my coffee mill then sometimes it produces more than 100 gram coffee grounds).
With demographics this might occur when the ratio is based on two independent estimates/measurements.
Miscalculation or falsified numbers can also be a reason for unphysical values. | Can statistical units measured per thousand inhabitants be bigger than 1000? | The specific question from the body text is answered by J-J-J but the title question can have more explanations
Can statistical units measured per thousand inhabitants be bigger than 1000?
The numb | Can statistical units measured per thousand inhabitants be bigger than 1000?
The specific question from the body text is answered by J-J-J but the title question can have more explanations
Can statistical units measured per thousand inhabitants be bigger than 1000?
The number can be bigger if the count is not inhabitants per inhabitants. For example the number of shoes per inhabitant is most likely exceeding beyond 2.
But also for a count like people per inhabitants the ratio can exceed 1. For example in a particular city with a large industry, commercial properties and/or tourism the number of workers per inhabitants can exceed 1 if many of the workers live outside the city.
In addition. Figures can exceed 100% when they are measured with some source of error.
In technical applications this can happen for instance when yield is computed and some experiment weighs before and after some treatment. If the process is close to 100% yield then it might sometimes exceed 100% due to measurement errors with weighting or because the process has some residue from a previous experiment (when I put 100 gram beans in my coffee mill then sometimes it produces more than 100 gram coffee grounds).
With demographics this might occur when the ratio is based on two independent estimates/measurements.
Miscalculation or falsified numbers can also be a reason for unphysical values. | Can statistical units measured per thousand inhabitants be bigger than 1000?
The specific question from the body text is answered by J-J-J but the title question can have more explanations
Can statistical units measured per thousand inhabitants be bigger than 1000?
The numb |
29,830 | Inverse function of variance | Carefully considering the cases for $r$: if $r=0$ then the distribution is degenerate, but $X$ could have any mean. That is, $\Pr(X=\mu)=1$ and $\Pr(X=c)=0$ for any $c \neq \mu$. So we can find many possible distributions for $X$, but they are indexed by, and completely specified by, $\mu \in \mathbb{R}$.
If $r<0$ , no distribution can be found, since $\mathrm{Var}(X)=\mathbb{E}(X-\mu_X)^2 \geq 0$.
For $r>0$, the answer will depend on what additional information is known about $X$. For example if $X$ is known to have mean $\mu$, then for any $\mu \in \mathbb{R}$ and $r>0$ we can find a distribution with these moments by taking $X \sim N(\mu, r)$. This is not a unique solution to the problem of matching mean and variance, but it is the only normally distributed solution (and of all the possible solutions, this is the one that maximises the entropy, as Daniel points out). If you also wanted to match e.g. the third central moment, or higher, then you would need to consider a broader range of probability distributions.
Suppose instead we had some information about the distribution of $X$ rather than its moments. For example, if we know that $X$ follows a Poisson distribution then the unique solution would be $X \sim \mathrm{Poisson}(r)$. If we know that $X$ follows an exponential distribution, then again there is a unique solution $X \sim \mathrm{Exponential}(\frac{1}{\sqrt{r}})$, where we have found the parameter by solving $\mathrm{Var}(X) = r = \frac{1}{\lambda^2}$.
In other cases we can find an entire family of solutions. If we know that $X$ follows a rectangular (continuous uniform) distribution, then we can find a unique width $w$ for the distribution by solving $\mathrm{Var}(X) = r = \frac{w^2}{12}$. But there will be a whole family of solutions, $X \sim U(a, a+w)$ parametized by $a \in \mathbb{R}$ — the distributions in this set are all translations of each other. Similarly, if $X$ is normal then any distribution $X \sim N(\mu, r)$ would work (so we have a whole set of solutions indexed by $\mu$, which again can be any real number, and again the family are all translations of each other). If $X$ follows a gamma distribution then, using the shape-scale parameterization, we can obtain a whole family of solutions, $X \sim \mathrm{Gamma}(\frac{r}{\theta^2}, \theta)$ parametized by $\theta > 0$. Members of this family are not translations of each other. To help visualize what a "family of solutions" might look like, here are some examples of normal distributions indexed by $\mu$, and then gamma distributions indexed by $\theta$, all with variance equal to four, corresponding to the example $r=4$ in your question.
On the other hand, for some distributions it may or may not be possible to find a solution, depending on the value of $r$. For instance if $X$ must be a Bernoulli variable then for $0 \leq r \lt 0.25$ there are two possible solutions $X \sim \mathrm{Bernoulli}(p)$ because there are two probabilities $p$ which solve the equation $\mathrm{Var}(X) = r = p(1-p)$, and in fact these two probabilities are complementary i.e. $p_1 + p_2 = 1$. For $r=0.25$ there is only the unique solution $p=0.5$, and for $r>0.25$ no Bernoulli distribution has sufficiently high variance.
I feel I should also mention the case $r = \infty$. There are solutions for this case too, for example a Student's $t$ distribution with two degrees of freedom.
R code for plots
require(ggplot2)
x.df <- data.frame(x = rep(seq(from=-8, to=8, length=100), times=5),
mu = rep(c(-4, -2, 0, 2, 4), each=100))
x.df$pdf <- dnorm(mean=x.df$mu, x.df$x)
ggplot(x.df, aes(x=x, y=pdf, group=factor(mu), colour=factor(mu))) + theme_bw() +
geom_line(size=1) + scale_colour_brewer(name=expression(mu), palette="Set1") +
theme(legend.key = element_blank()) + ggtitle("Normal distributions with variance 4")
x.df <- data.frame(x = rep(seq(from=0, to=20, length=1000), times=5),
theta = rep(c(0.25, 0.5, 1, 2, 4), each=1000))
x.df$pdf <- dgamma(x.df$x, shape=4/(x.df$theta)^2, scale=x.df$theta)
ggplot(x.df, aes(x=x, y=pdf, group=factor(theta), colour=factor(theta))) + theme_bw() +
geom_line(size=1) + scale_colour_brewer(name=expression(theta), palette="Set1") +
theme(legend.key = element_blank()) + ggtitle("Gamma distributions with variance 4") +
coord_cartesian(ylim = c(0, 1)) | Inverse function of variance | Carefully considering the cases for $r$: if $r=0$ then the distribution is degenerate, but $X$ could have any mean. That is, $\Pr(X=\mu)=1$ and $\Pr(X=c)=0$ for any $c \neq \mu$. So we can find many | Inverse function of variance
Carefully considering the cases for $r$: if $r=0$ then the distribution is degenerate, but $X$ could have any mean. That is, $\Pr(X=\mu)=1$ and $\Pr(X=c)=0$ for any $c \neq \mu$. So we can find many possible distributions for $X$, but they are indexed by, and completely specified by, $\mu \in \mathbb{R}$.
If $r<0$ , no distribution can be found, since $\mathrm{Var}(X)=\mathbb{E}(X-\mu_X)^2 \geq 0$.
For $r>0$, the answer will depend on what additional information is known about $X$. For example if $X$ is known to have mean $\mu$, then for any $\mu \in \mathbb{R}$ and $r>0$ we can find a distribution with these moments by taking $X \sim N(\mu, r)$. This is not a unique solution to the problem of matching mean and variance, but it is the only normally distributed solution (and of all the possible solutions, this is the one that maximises the entropy, as Daniel points out). If you also wanted to match e.g. the third central moment, or higher, then you would need to consider a broader range of probability distributions.
Suppose instead we had some information about the distribution of $X$ rather than its moments. For example, if we know that $X$ follows a Poisson distribution then the unique solution would be $X \sim \mathrm{Poisson}(r)$. If we know that $X$ follows an exponential distribution, then again there is a unique solution $X \sim \mathrm{Exponential}(\frac{1}{\sqrt{r}})$, where we have found the parameter by solving $\mathrm{Var}(X) = r = \frac{1}{\lambda^2}$.
In other cases we can find an entire family of solutions. If we know that $X$ follows a rectangular (continuous uniform) distribution, then we can find a unique width $w$ for the distribution by solving $\mathrm{Var}(X) = r = \frac{w^2}{12}$. But there will be a whole family of solutions, $X \sim U(a, a+w)$ parametized by $a \in \mathbb{R}$ — the distributions in this set are all translations of each other. Similarly, if $X$ is normal then any distribution $X \sim N(\mu, r)$ would work (so we have a whole set of solutions indexed by $\mu$, which again can be any real number, and again the family are all translations of each other). If $X$ follows a gamma distribution then, using the shape-scale parameterization, we can obtain a whole family of solutions, $X \sim \mathrm{Gamma}(\frac{r}{\theta^2}, \theta)$ parametized by $\theta > 0$. Members of this family are not translations of each other. To help visualize what a "family of solutions" might look like, here are some examples of normal distributions indexed by $\mu$, and then gamma distributions indexed by $\theta$, all with variance equal to four, corresponding to the example $r=4$ in your question.
On the other hand, for some distributions it may or may not be possible to find a solution, depending on the value of $r$. For instance if $X$ must be a Bernoulli variable then for $0 \leq r \lt 0.25$ there are two possible solutions $X \sim \mathrm{Bernoulli}(p)$ because there are two probabilities $p$ which solve the equation $\mathrm{Var}(X) = r = p(1-p)$, and in fact these two probabilities are complementary i.e. $p_1 + p_2 = 1$. For $r=0.25$ there is only the unique solution $p=0.5$, and for $r>0.25$ no Bernoulli distribution has sufficiently high variance.
I feel I should also mention the case $r = \infty$. There are solutions for this case too, for example a Student's $t$ distribution with two degrees of freedom.
R code for plots
require(ggplot2)
x.df <- data.frame(x = rep(seq(from=-8, to=8, length=100), times=5),
mu = rep(c(-4, -2, 0, 2, 4), each=100))
x.df$pdf <- dnorm(mean=x.df$mu, x.df$x)
ggplot(x.df, aes(x=x, y=pdf, group=factor(mu), colour=factor(mu))) + theme_bw() +
geom_line(size=1) + scale_colour_brewer(name=expression(mu), palette="Set1") +
theme(legend.key = element_blank()) + ggtitle("Normal distributions with variance 4")
x.df <- data.frame(x = rep(seq(from=0, to=20, length=1000), times=5),
theta = rep(c(0.25, 0.5, 1, 2, 4), each=1000))
x.df$pdf <- dgamma(x.df$x, shape=4/(x.df$theta)^2, scale=x.df$theta)
ggplot(x.df, aes(x=x, y=pdf, group=factor(theta), colour=factor(theta))) + theme_bw() +
geom_line(size=1) + scale_colour_brewer(name=expression(theta), palette="Set1") +
theme(legend.key = element_blank()) + ggtitle("Gamma distributions with variance 4") +
coord_cartesian(ylim = c(0, 1)) | Inverse function of variance
Carefully considering the cases for $r$: if $r=0$ then the distribution is degenerate, but $X$ could have any mean. That is, $\Pr(X=\mu)=1$ and $\Pr(X=c)=0$ for any $c \neq \mu$. So we can find many |
29,831 | Inverse function of variance | Assuming you mean "is it possible to find a probability distribution for $X$" then the answer is yes, as you have not specified any criteria that $X$ must satisfy. In fact there are an infinite number of possible distributions that would satisfy this condition. Just consider a Normal distribution, $\mathcal{N}(x ; \mu, \sigma^2)$. You can set $\sigma^2 = r$ and $\mu$ can take any value you like - you will then have $Var[X] = r$ as required.
In fact, the Normal distribution is rather special in this regard as it is the maximum entropy probability distribution for a given mean and variance. | Inverse function of variance | Assuming you mean "is it possible to find a probability distribution for $X$" then the answer is yes, as you have not specified any criteria that $X$ must satisfy. In fact there are an infinite number | Inverse function of variance
Assuming you mean "is it possible to find a probability distribution for $X$" then the answer is yes, as you have not specified any criteria that $X$ must satisfy. In fact there are an infinite number of possible distributions that would satisfy this condition. Just consider a Normal distribution, $\mathcal{N}(x ; \mu, \sigma^2)$. You can set $\sigma^2 = r$ and $\mu$ can take any value you like - you will then have $Var[X] = r$ as required.
In fact, the Normal distribution is rather special in this regard as it is the maximum entropy probability distribution for a given mean and variance. | Inverse function of variance
Assuming you mean "is it possible to find a probability distribution for $X$" then the answer is yes, as you have not specified any criteria that $X$ must satisfy. In fact there are an infinite number |
29,832 | Inverse function of variance | This question can be interpreted in a way that makes it interesting and not entirely trivial. Given something $X$ that looks like a random variable, to what extent is it possible to assign probabilities to its values (or shift existing probabilities around) in such a way that its variance equals some prespecified number $r$? The answer is that all possible values $r\ge 0$ are allowable, up to a limit determined by the range of $X$.
The potential interest in such an analysis lies in the idea of changing a probability measure, while keeping a random variable fixed, in order to achieve a particular end. Although this application is simple, it displays some of the ideas underlying the Girsanov theorem, a result fundamental in mathematical finance.
Let's restate this question in a rigorous, unambiguous fashion. Suppose
$$X:(\Omega, \mathfrak{S}) \to \mathbb{R}$$
is a measurable function defined on a measure space $\Omega$ with sigma-algebra $\mathfrak{S}$. For a given real number $r \gt 0$, when is it possible to find a probability measure $\mathbb{P}$ on this space for which $\text{Var}(X) = r$?
I believe the answer is that this is possible when $\sup(X) - \inf(X) \gt 2\sqrt{r}$. (Equality can hold if the supremum and infimum are both attained: that is, they actually are the maximum and minimum of $X$.) When either $\sup(X)=\infty$ or $\inf(X)=-\infty$, this condition imposes no limit on $r$, and then all non-negative values of the variance are possible.
The proof is by construction. Let's begin with a simple version of it, to take care of the details and pin down the basic idea, and then move on to the actual construction.
Let $x$ be in the image of $X$: this means there is an $\omega_x\in\Omega$ for which $X(\omega_x) = x$. Define the set function $\mathbb{P}:\mathfrak{S}\to [0,1]$ to be the indicator of $\omega_x$: that is, $\mathbb{P}(A) = 0$ if $\omega_x\notin A$ and $\mathbb{P}(A) = 1$ when $\omega_x\in A$.
Since $\mathbb{P}(\Omega)=1$, obviously $\mathbb P$ satisfies the first two axioms of probability. It is necessary to show it satisfies the third; namely, that it is sigma-additive. But this is almost as obvious: whenever $\{E_i, i=1, 2, \ldots\}$ is a finite or countably infinite set of mutually exclusive events, then either none of them contain $\omega_x$--in which case $\mathbb{P}(E_i)=0$ for all $i$--or exactly one of them contains $\omega_x$, in which case $\mathbb{P}(E_j)=1$ for some particular $j$ and otherwise $\mathbb{P}(E_i)=0$ for all $i\ne j$. In either case
$$\mathbb{P}\left(\cup_i E_i\right) = \sum_i \mathbb{P}(E_i)$$
because both sides are either both $0$ or both $1$.
Since $\mathbb{P}$ concentrates all the probability on $\omega_x$, the distribution of $X$ is concentrated on $x$ and $X$ must have zero variance.
Let $x_1 \le x_2$ be two values in the range of $X$; that is, $X(\omega_1) = x_1$ and $X(\omega_2) = x_2$. In a manner similar to the previous step, define a measure $\mathbb{P}$ to be a weighted average of the indicators of $\omega_1$ and $\omega_2$. Use non-negative weights $1-p$ and $p$ for $p$ to be determined. Just as before, we find that $\mathbb{P}$--being a convex combination of the indicator measures discussed in (1)--is a probability measure. The distribution of $X$ with respect to this measure is a Bernoulli$(p)$ distribution that has been scaled by $x_2-x_1$ and shifted by $-x_1$. Because the variance of a Bernoulli$(p)$ distribution is $p(1-p)$, the variance of $X$ must be $(x_2-x_1)^2p(1-p)$.
An immediate consequence of (2) is that any $r$ for which there exist $x_1 \le x_2$ in the range of $X$ and $0 \le p \lt 1$ for which
$$r = (x_2-x_1)^2p(1-p)$$
can be the variance of $X$. Since $0 \le p(1-p) \le 1/4$, this implies
$$2\sqrt{r} = \sqrt{4 r} \le \sqrt{\frac{r}{p(1-p)}} = \sqrt{(x_2-x_1)^2} = x_2-x_1 \le \sup(X)-\inf(X),$$
with equality holding if and only if $X$ has a maximum and minimum.
Conversely, if $r$ exceeds this bound of $(\sup(X)-\inf(X))^2/4$, then no solution is possible, since we already know that the variance of any bounded random variable cannot exceed one-quarter the square of its range. | Inverse function of variance | This question can be interpreted in a way that makes it interesting and not entirely trivial. Given something $X$ that looks like a random variable, to what extent is it possible to assign probabilit | Inverse function of variance
This question can be interpreted in a way that makes it interesting and not entirely trivial. Given something $X$ that looks like a random variable, to what extent is it possible to assign probabilities to its values (or shift existing probabilities around) in such a way that its variance equals some prespecified number $r$? The answer is that all possible values $r\ge 0$ are allowable, up to a limit determined by the range of $X$.
The potential interest in such an analysis lies in the idea of changing a probability measure, while keeping a random variable fixed, in order to achieve a particular end. Although this application is simple, it displays some of the ideas underlying the Girsanov theorem, a result fundamental in mathematical finance.
Let's restate this question in a rigorous, unambiguous fashion. Suppose
$$X:(\Omega, \mathfrak{S}) \to \mathbb{R}$$
is a measurable function defined on a measure space $\Omega$ with sigma-algebra $\mathfrak{S}$. For a given real number $r \gt 0$, when is it possible to find a probability measure $\mathbb{P}$ on this space for which $\text{Var}(X) = r$?
I believe the answer is that this is possible when $\sup(X) - \inf(X) \gt 2\sqrt{r}$. (Equality can hold if the supremum and infimum are both attained: that is, they actually are the maximum and minimum of $X$.) When either $\sup(X)=\infty$ or $\inf(X)=-\infty$, this condition imposes no limit on $r$, and then all non-negative values of the variance are possible.
The proof is by construction. Let's begin with a simple version of it, to take care of the details and pin down the basic idea, and then move on to the actual construction.
Let $x$ be in the image of $X$: this means there is an $\omega_x\in\Omega$ for which $X(\omega_x) = x$. Define the set function $\mathbb{P}:\mathfrak{S}\to [0,1]$ to be the indicator of $\omega_x$: that is, $\mathbb{P}(A) = 0$ if $\omega_x\notin A$ and $\mathbb{P}(A) = 1$ when $\omega_x\in A$.
Since $\mathbb{P}(\Omega)=1$, obviously $\mathbb P$ satisfies the first two axioms of probability. It is necessary to show it satisfies the third; namely, that it is sigma-additive. But this is almost as obvious: whenever $\{E_i, i=1, 2, \ldots\}$ is a finite or countably infinite set of mutually exclusive events, then either none of them contain $\omega_x$--in which case $\mathbb{P}(E_i)=0$ for all $i$--or exactly one of them contains $\omega_x$, in which case $\mathbb{P}(E_j)=1$ for some particular $j$ and otherwise $\mathbb{P}(E_i)=0$ for all $i\ne j$. In either case
$$\mathbb{P}\left(\cup_i E_i\right) = \sum_i \mathbb{P}(E_i)$$
because both sides are either both $0$ or both $1$.
Since $\mathbb{P}$ concentrates all the probability on $\omega_x$, the distribution of $X$ is concentrated on $x$ and $X$ must have zero variance.
Let $x_1 \le x_2$ be two values in the range of $X$; that is, $X(\omega_1) = x_1$ and $X(\omega_2) = x_2$. In a manner similar to the previous step, define a measure $\mathbb{P}$ to be a weighted average of the indicators of $\omega_1$ and $\omega_2$. Use non-negative weights $1-p$ and $p$ for $p$ to be determined. Just as before, we find that $\mathbb{P}$--being a convex combination of the indicator measures discussed in (1)--is a probability measure. The distribution of $X$ with respect to this measure is a Bernoulli$(p)$ distribution that has been scaled by $x_2-x_1$ and shifted by $-x_1$. Because the variance of a Bernoulli$(p)$ distribution is $p(1-p)$, the variance of $X$ must be $(x_2-x_1)^2p(1-p)$.
An immediate consequence of (2) is that any $r$ for which there exist $x_1 \le x_2$ in the range of $X$ and $0 \le p \lt 1$ for which
$$r = (x_2-x_1)^2p(1-p)$$
can be the variance of $X$. Since $0 \le p(1-p) \le 1/4$, this implies
$$2\sqrt{r} = \sqrt{4 r} \le \sqrt{\frac{r}{p(1-p)}} = \sqrt{(x_2-x_1)^2} = x_2-x_1 \le \sup(X)-\inf(X),$$
with equality holding if and only if $X$ has a maximum and minimum.
Conversely, if $r$ exceeds this bound of $(\sup(X)-\inf(X))^2/4$, then no solution is possible, since we already know that the variance of any bounded random variable cannot exceed one-quarter the square of its range. | Inverse function of variance
This question can be interpreted in a way that makes it interesting and not entirely trivial. Given something $X$ that looks like a random variable, to what extent is it possible to assign probabilit |
29,833 | Inverse function of variance | Yes, it's possible to find such distribution. In fact you can take any distribution with a finite variance, and scale to match your condition, because $$Var[cX]=c^2Var[X]$$
For instance, a uniform distribution on interval $[0,1]$ has variance: $$\sigma^2=\frac{1}{12}$$
Hence, a uniform distribution in the interval $\left[0,\frac{1}{\sqrt{12r}}\right]$ will have variance $r$.
In fact, this is a common way to add parameters to some distributions, such as Student t. It has only one parameter, $\nu$ - degrees of freedom. When $\nu\to\infty$ the distribution converges to a standard normal. It is bell shaped, and looks a lot like normal, but has fatter tails. That's why it's often used as an alternative to a normal distribution when the tails are fat. The only problem is that Gaussian distribution has two parameters. So, comes the scaled version of Student t, which is sometimes called "t location scale" distribution. This a very simple transformation: $\xi=\frac{t-\mu}{s}$, where $\mu,s$ are location and scale. Now, you can set the scale so that the new variable $\xi$ will have any required variance, and will have a shape of Student t distribution. | Inverse function of variance | Yes, it's possible to find such distribution. In fact you can take any distribution with a finite variance, and scale to match your condition, because $$Var[cX]=c^2Var[X]$$
For instance, a uniform dis | Inverse function of variance
Yes, it's possible to find such distribution. In fact you can take any distribution with a finite variance, and scale to match your condition, because $$Var[cX]=c^2Var[X]$$
For instance, a uniform distribution on interval $[0,1]$ has variance: $$\sigma^2=\frac{1}{12}$$
Hence, a uniform distribution in the interval $\left[0,\frac{1}{\sqrt{12r}}\right]$ will have variance $r$.
In fact, this is a common way to add parameters to some distributions, such as Student t. It has only one parameter, $\nu$ - degrees of freedom. When $\nu\to\infty$ the distribution converges to a standard normal. It is bell shaped, and looks a lot like normal, but has fatter tails. That's why it's often used as an alternative to a normal distribution when the tails are fat. The only problem is that Gaussian distribution has two parameters. So, comes the scaled version of Student t, which is sometimes called "t location scale" distribution. This a very simple transformation: $\xi=\frac{t-\mu}{s}$, where $\mu,s$ are location and scale. Now, you can set the scale so that the new variable $\xi$ will have any required variance, and will have a shape of Student t distribution. | Inverse function of variance
Yes, it's possible to find such distribution. In fact you can take any distribution with a finite variance, and scale to match your condition, because $$Var[cX]=c^2Var[X]$$
For instance, a uniform dis |
29,834 | A linear pattern occurs on my residual plot: what can I do? | Just to help you understand what you are looking at a bit better on your residual plot, your data looks something like this:
Your model is fine until the price gets capped; then you need to determine whether the rest of the model is valid or not. The capped price has to be due to unrecorded data above that price because you would not expect to see data like that in reality for your particular problem. So then you have to think about what the data looks like above that price. It may be that the linear relationship no longer holds once you go above the grey line and this would be a limitation of using a linear model here. The data may curve and flatten off in reality, in which case a logarithmic curve would fit much better, so it would be unwise to predict data above that line with a linear model.
Also, do you care what happens above the grey line, or do you only need the model for the part where the model is valid? If you are only interested in the portion of the model that is valid, then you don't need to worry about the rest. These are some of the things you might want to think about. | A linear pattern occurs on my residual plot: what can I do? | Just to help you understand what you are looking at a bit better on your residual plot, your data looks something like this:
Your model is fine until the price gets capped; then you need to determine | A linear pattern occurs on my residual plot: what can I do?
Just to help you understand what you are looking at a bit better on your residual plot, your data looks something like this:
Your model is fine until the price gets capped; then you need to determine whether the rest of the model is valid or not. The capped price has to be due to unrecorded data above that price because you would not expect to see data like that in reality for your particular problem. So then you have to think about what the data looks like above that price. It may be that the linear relationship no longer holds once you go above the grey line and this would be a limitation of using a linear model here. The data may curve and flatten off in reality, in which case a logarithmic curve would fit much better, so it would be unwise to predict data above that line with a linear model.
Also, do you care what happens above the grey line, or do you only need the model for the part where the model is valid? If you are only interested in the portion of the model that is valid, then you don't need to worry about the rest. These are some of the things you might want to think about. | A linear pattern occurs on my residual plot: what can I do?
Just to help you understand what you are looking at a bit better on your residual plot, your data looks something like this:
Your model is fine until the price gets capped; then you need to determine |
29,835 | A linear pattern occurs on my residual plot: what can I do? | I'm not sure why the linear model, with its many assumptions, was chosen as the default model. Ordinal semiparametric models are very efficient and are invariant to how Y is transformed. They allow for floor and ceiling effects, bimodality, and any other kind of distributional quirks you can throw at them. The most popular semiparametric models are the proportional odds and proportional hazards models.
I would also not want to assume up front that the continuous predictors operate linearly. I'd expand them using regression splines such as restricted cubic splines (aka natural splines). A detailed case study may be found in Chapter 11 of the RMS course notes. | A linear pattern occurs on my residual plot: what can I do? | I'm not sure why the linear model, with its many assumptions, was chosen as the default model. Ordinal semiparametric models are very efficient and are invariant to how Y is transformed. They allow | A linear pattern occurs on my residual plot: what can I do?
I'm not sure why the linear model, with its many assumptions, was chosen as the default model. Ordinal semiparametric models are very efficient and are invariant to how Y is transformed. They allow for floor and ceiling effects, bimodality, and any other kind of distributional quirks you can throw at them. The most popular semiparametric models are the proportional odds and proportional hazards models.
I would also not want to assume up front that the continuous predictors operate linearly. I'd expand them using regression splines such as restricted cubic splines (aka natural splines). A detailed case study may be found in Chapter 11 of the RMS course notes. | A linear pattern occurs on my residual plot: what can I do?
I'm not sure why the linear model, with its many assumptions, was chosen as the default model. Ordinal semiparametric models are very efficient and are invariant to how Y is transformed. They allow |
29,836 | A linear pattern occurs on my residual plot: what can I do? | Residuals following a linear boundary are typically the result of a ceiling effect or a floor effect. If your sample is large enough, the results are biased only slightly (note that linear models are quite robust to normality violations if you are working with a large sample, unlike, for example, homoskedasticity violations ).
Basically, you have two options. You can use a different model (e.g. lognormal regression, Poisson regression, depending on the specific data), or you can ignore the problem and rely on the fact that the results are only slightly biased since you have a large data set. | A linear pattern occurs on my residual plot: what can I do? | Residuals following a linear boundary are typically the result of a ceiling effect or a floor effect. If your sample is large enough, the results are biased only slightly (note that linear models are | A linear pattern occurs on my residual plot: what can I do?
Residuals following a linear boundary are typically the result of a ceiling effect or a floor effect. If your sample is large enough, the results are biased only slightly (note that linear models are quite robust to normality violations if you are working with a large sample, unlike, for example, homoskedasticity violations ).
Basically, you have two options. You can use a different model (e.g. lognormal regression, Poisson regression, depending on the specific data), or you can ignore the problem and rely on the fact that the results are only slightly biased since you have a large data set. | A linear pattern occurs on my residual plot: what can I do?
Residuals following a linear boundary are typically the result of a ceiling effect or a floor effect. If your sample is large enough, the results are biased only slightly (note that linear models are |
29,837 | A linear pattern occurs on my residual plot: what can I do? | Regarding the linear pattern: this happens frequently when your response takes the same value for a number of observations. For those observations, $(y-pred)$ is of course a linear function of $pred$, as $y$ is constant. | A linear pattern occurs on my residual plot: what can I do? | Regarding the linear pattern: this happens frequently when your response takes the same value for a number of observations. For those observations, $(y-pred)$ is of course a linear function of $pred$, | A linear pattern occurs on my residual plot: what can I do?
Regarding the linear pattern: this happens frequently when your response takes the same value for a number of observations. For those observations, $(y-pred)$ is of course a linear function of $pred$, as $y$ is constant. | A linear pattern occurs on my residual plot: what can I do?
Regarding the linear pattern: this happens frequently when your response takes the same value for a number of observations. For those observations, $(y-pred)$ is of course a linear function of $pred$, |
29,838 | How do you know if an insignificant P value is because of chance error or because the sample size of the data is too small? | The question basically asks what the truth is behind the observed p-value. But if we knew the truth we wouldn't need to compute a p-value in the first place!
I leave technical considerations regarding power to the other answers, but here's a bit about significance test logic.
The idea is that there is an underlying data generating process that we cannot observe directly, therefore we can't say what it truly is. We only see the data.
The p-value is a measure computed from the data that measures compatibility of the data with the null hypothesis. (I think that you use the term "chance" to refer to the null hypothesis, which often but not always interprets as something like "only random variation is going on".)
An insignificant p-value means that if the null hypothesis is in fact true, the data look pretty much as they should be expected to look like (regarding the specific test statistic at least; they may look different in other respects). They are compatible with the null hypothesis, they don't deliver evidence against it.
It does not mean that the null hypothesis is true, however. Data generating processes deviating from the null hypothesis may also produce data that look like this. Note also that most statisticians would agree with Box's famous quote that "all models are wrong but some are useful", so actually at best the null hypothesis may be a very good model (i.e. idealised mathematical description) for what's really going on, but never literally true.
The role of the sample size now is this: The larger the sample size, the more information in the data, and the better we can use the data to actually distinguish the null hypothesis from alternative models. If you have a low sample size, the data may not only be compatible with the null hypothesis, but also with models that are really quite different (and in a real context would have a very different interpretation). This means that a large p-value doesn't allow to say that we are at least close to the null hypothesis (meaning "chance variation" in some circumstances). If indeed an alternative model is true, larger sample size will make it more likely to observe a significant p-value (that is called "power" of the test). This implies that with a larger sample size, observing an insignificant p-value, we have some evidence that we're at least close to the null hypothesis.
However, note that if in fact the sample size is very small, we cannot tell these apart, i.e. you cannot say whether the p-value is as it is because we're in fact very close to the null hypothesis, or whether it is only because our sample size is too small and in fact an alternative model is appropriate that with a larger sample size would lead to significance. You can only know this collecting a larger sample! Post hoc power calculations do not address this question! What they tell you is, if you want, the degree of distinctiveness of the sample you have, i.e., how far away from the null you may have been without being able to find it. This doesn't mean that this is indeed the case, as in fact your small sample doesn't allow you to distinguish these cases!
Unfortunately there is a catch in significance test logic, which is that if you collect a very large sample, you will quite likely find a significant p-value even if the truth is, though slightly different from the null hypothesis, so close to it that regarding its meaning in the real situation you'd say that it is not in any relevant manner different from the null hypothesis (like, a true parameter may be 0.02 rather than 0, but you'd think that only parameters larger than 0.5 are worth bothering; obviously this depends on the exact situation, meaning of the data etc.). So indeed large samples may lead to significance often even when this is actually meaningless, which means that you always need to look at estimated effect sizes and possibly confidence intervals to say something more relevant than just whether something is "significant". | How do you know if an insignificant P value is because of chance error or because the sample size of | The question basically asks what the truth is behind the observed p-value. But if we knew the truth we wouldn't need to compute a p-value in the first place!
I leave technical considerations regarding | How do you know if an insignificant P value is because of chance error or because the sample size of the data is too small?
The question basically asks what the truth is behind the observed p-value. But if we knew the truth we wouldn't need to compute a p-value in the first place!
I leave technical considerations regarding power to the other answers, but here's a bit about significance test logic.
The idea is that there is an underlying data generating process that we cannot observe directly, therefore we can't say what it truly is. We only see the data.
The p-value is a measure computed from the data that measures compatibility of the data with the null hypothesis. (I think that you use the term "chance" to refer to the null hypothesis, which often but not always interprets as something like "only random variation is going on".)
An insignificant p-value means that if the null hypothesis is in fact true, the data look pretty much as they should be expected to look like (regarding the specific test statistic at least; they may look different in other respects). They are compatible with the null hypothesis, they don't deliver evidence against it.
It does not mean that the null hypothesis is true, however. Data generating processes deviating from the null hypothesis may also produce data that look like this. Note also that most statisticians would agree with Box's famous quote that "all models are wrong but some are useful", so actually at best the null hypothesis may be a very good model (i.e. idealised mathematical description) for what's really going on, but never literally true.
The role of the sample size now is this: The larger the sample size, the more information in the data, and the better we can use the data to actually distinguish the null hypothesis from alternative models. If you have a low sample size, the data may not only be compatible with the null hypothesis, but also with models that are really quite different (and in a real context would have a very different interpretation). This means that a large p-value doesn't allow to say that we are at least close to the null hypothesis (meaning "chance variation" in some circumstances). If indeed an alternative model is true, larger sample size will make it more likely to observe a significant p-value (that is called "power" of the test). This implies that with a larger sample size, observing an insignificant p-value, we have some evidence that we're at least close to the null hypothesis.
However, note that if in fact the sample size is very small, we cannot tell these apart, i.e. you cannot say whether the p-value is as it is because we're in fact very close to the null hypothesis, or whether it is only because our sample size is too small and in fact an alternative model is appropriate that with a larger sample size would lead to significance. You can only know this collecting a larger sample! Post hoc power calculations do not address this question! What they tell you is, if you want, the degree of distinctiveness of the sample you have, i.e., how far away from the null you may have been without being able to find it. This doesn't mean that this is indeed the case, as in fact your small sample doesn't allow you to distinguish these cases!
Unfortunately there is a catch in significance test logic, which is that if you collect a very large sample, you will quite likely find a significant p-value even if the truth is, though slightly different from the null hypothesis, so close to it that regarding its meaning in the real situation you'd say that it is not in any relevant manner different from the null hypothesis (like, a true parameter may be 0.02 rather than 0, but you'd think that only parameters larger than 0.5 are worth bothering; obviously this depends on the exact situation, meaning of the data etc.). So indeed large samples may lead to significance often even when this is actually meaningless, which means that you always need to look at estimated effect sizes and possibly confidence intervals to say something more relevant than just whether something is "significant". | How do you know if an insignificant P value is because of chance error or because the sample size of
The question basically asks what the truth is behind the observed p-value. But if we knew the truth we wouldn't need to compute a p-value in the first place!
I leave technical considerations regarding |
29,839 | How do you know if an insignificant P value is because of chance error or because the sample size of the data is too small? | Ideally, you would have run a 'power and sample size' procedure
before doing your experiment. Then you you will have known all
along whether you had a good chance of rejecting $H_0$ if an effect of
the desired size leads to rejection.
Of course, when you are working at the 5% level of significance, there is by definition a 5% probability of rejecting a true null hypothesis. So you can never really be absolutely sure you reach
a correct decision.
If you did not do a power and sample size procedure at the design
phase of experimentation, then doing an ad hoc power analysis
is probably better than just wondering. But you need to understand
that an ad hoc power determination cannot be exactly the
same thing as one done at the proper time. Power analyses at the
design phase almost always involve making some guesses, and you
will likely have to make fewer guesses ad hoc---or at least think so.
Perhaps the main reason for avoiding ad hoc power
analyses arises when you fail to reject when you think you are
'entitled' to a rejection. This can tempt some people into
"P-hacking" procedures such as 'suddenly realizing' that you
really intended a one-sided test all along, or dredging through
the data with unwarranted ad hoc tests looking for 'something like'
the 'unfairly withheld' rejection. At any stage of the experimental
procedure, a power analysis is not a guarantee. It is a prudent precaution. If you could figure out whether to reject via a power
analysis, you wouldn't have to do the experiment.
If no effect is found, many of the experimenters (and thier bosses) may be disappointed and intent on finding the reason for no rejection. Somebody (often the project statistician) has to have the guts to say, the real reason no effect was found may be that no effect exists. | How do you know if an insignificant P value is because of chance error or because the sample size of | Ideally, you would have run a 'power and sample size' procedure
before doing your experiment. Then you you will have known all
along whether you had a good chance of rejecting $H_0$ if an effect of
th | How do you know if an insignificant P value is because of chance error or because the sample size of the data is too small?
Ideally, you would have run a 'power and sample size' procedure
before doing your experiment. Then you you will have known all
along whether you had a good chance of rejecting $H_0$ if an effect of
the desired size leads to rejection.
Of course, when you are working at the 5% level of significance, there is by definition a 5% probability of rejecting a true null hypothesis. So you can never really be absolutely sure you reach
a correct decision.
If you did not do a power and sample size procedure at the design
phase of experimentation, then doing an ad hoc power analysis
is probably better than just wondering. But you need to understand
that an ad hoc power determination cannot be exactly the
same thing as one done at the proper time. Power analyses at the
design phase almost always involve making some guesses, and you
will likely have to make fewer guesses ad hoc---or at least think so.
Perhaps the main reason for avoiding ad hoc power
analyses arises when you fail to reject when you think you are
'entitled' to a rejection. This can tempt some people into
"P-hacking" procedures such as 'suddenly realizing' that you
really intended a one-sided test all along, or dredging through
the data with unwarranted ad hoc tests looking for 'something like'
the 'unfairly withheld' rejection. At any stage of the experimental
procedure, a power analysis is not a guarantee. It is a prudent precaution. If you could figure out whether to reject via a power
analysis, you wouldn't have to do the experiment.
If no effect is found, many of the experimenters (and thier bosses) may be disappointed and intent on finding the reason for no rejection. Somebody (often the project statistician) has to have the guts to say, the real reason no effect was found may be that no effect exists. | How do you know if an insignificant P value is because of chance error or because the sample size of
Ideally, you would have run a 'power and sample size' procedure
before doing your experiment. Then you you will have known all
along whether you had a good chance of rejecting $H_0$ if an effect of
th |
29,840 | How do you know if an insignificant P value is because of chance error or because the sample size of the data is too small? | The presenter mentioned how the insignificant P value meant that the sample size of the data was too small
This is very wrong.
The p-value does not indicate whether the sample size was too small.
It is the estimate of the error/deviation in the measured effects that indicates this.
(Along with a relative comparison of the size of that error and the size of the suspected effect that one hoped to be able to measure. The error should be smaller than the effect that you hope to measure.)
What this presenter is saying is presumptive. An insignificant p-value can occur when the sample is too small. But... it can also occur because there is no effect. It sounds like this presenter presupposes the presence of an effect and bases the story of the discussion and conclusion around this
It is also a bit silly to state this as a conclusion. It is a bit like saying 'the experiment failed' while hiding that it already failed before it started because the sample is too small (instead it looks like the presentation makes the 'too small sample' is a discovery). In order to know that the sample is too small you do not need to observe an insignificant p-value. You can already determine beforehand whether a sample is going to be too small to be able to detect a certain magnitude of effect. The only situation when this is not the case is when there is no reasonable a priori estimate of the variance that might be expected on the measurements. But even then, one should not say that the insignificant p-value means that the sample is too small. | How do you know if an insignificant P value is because of chance error or because the sample size of | The presenter mentioned how the insignificant P value meant that the sample size of the data was too small
This is very wrong.
The p-value does not indicate whether the sample size was too small.
I | How do you know if an insignificant P value is because of chance error or because the sample size of the data is too small?
The presenter mentioned how the insignificant P value meant that the sample size of the data was too small
This is very wrong.
The p-value does not indicate whether the sample size was too small.
It is the estimate of the error/deviation in the measured effects that indicates this.
(Along with a relative comparison of the size of that error and the size of the suspected effect that one hoped to be able to measure. The error should be smaller than the effect that you hope to measure.)
What this presenter is saying is presumptive. An insignificant p-value can occur when the sample is too small. But... it can also occur because there is no effect. It sounds like this presenter presupposes the presence of an effect and bases the story of the discussion and conclusion around this
It is also a bit silly to state this as a conclusion. It is a bit like saying 'the experiment failed' while hiding that it already failed before it started because the sample is too small (instead it looks like the presentation makes the 'too small sample' is a discovery). In order to know that the sample is too small you do not need to observe an insignificant p-value. You can already determine beforehand whether a sample is going to be too small to be able to detect a certain magnitude of effect. The only situation when this is not the case is when there is no reasonable a priori estimate of the variance that might be expected on the measurements. But even then, one should not say that the insignificant p-value means that the sample is too small. | How do you know if an insignificant P value is because of chance error or because the sample size of
The presenter mentioned how the insignificant P value meant that the sample size of the data was too small
This is very wrong.
The p-value does not indicate whether the sample size was too small.
I |
29,841 | How do you know if an insignificant P value is because of chance error or because the sample size of the data is too small? | You do a post hoc / a posteriori power analysis. It answers the question: how likely was I going to find an effect given the size of my sample and the observed effect size (roughly speaking). There is a WIDE range of methods to calculate this given your statistical methods. If you find that you had very little chance of finding an effect with your sample size given the data, your sample size may have been too small.
There are plenty of resources on this:
Differences and relation between retrospective power analysis and a posteriori power analysis?
Also look at G* Power, it’s a piece of software often used for this. | How do you know if an insignificant P value is because of chance error or because the sample size of | You do a post hoc / a posteriori power analysis. It answers the question: how likely was I going to find an effect given the size of my sample and the observed effect size (roughly speaking). There is | How do you know if an insignificant P value is because of chance error or because the sample size of the data is too small?
You do a post hoc / a posteriori power analysis. It answers the question: how likely was I going to find an effect given the size of my sample and the observed effect size (roughly speaking). There is a WIDE range of methods to calculate this given your statistical methods. If you find that you had very little chance of finding an effect with your sample size given the data, your sample size may have been too small.
There are plenty of resources on this:
Differences and relation between retrospective power analysis and a posteriori power analysis?
Also look at G* Power, it’s a piece of software often used for this. | How do you know if an insignificant P value is because of chance error or because the sample size of
You do a post hoc / a posteriori power analysis. It answers the question: how likely was I going to find an effect given the size of my sample and the observed effect size (roughly speaking). There is |
29,842 | How do you know if an insignificant P value is because of chance error or because the sample size of the data is too small? | The long answers are mostly correct, but only address your specific question indirectly. The short and direct answer is that you can gather evidence that will help you decide if your sample size is too small or if your data are misleading (due to error or due to natural sampling variation) ONLY by gathering another sample of data.
The reasons that you need another set of data can be had from the longer answers. | How do you know if an insignificant P value is because of chance error or because the sample size of | The long answers are mostly correct, but only address your specific question indirectly. The short and direct answer is that you can gather evidence that will help you decide if your sample size is to | How do you know if an insignificant P value is because of chance error or because the sample size of the data is too small?
The long answers are mostly correct, but only address your specific question indirectly. The short and direct answer is that you can gather evidence that will help you decide if your sample size is too small or if your data are misleading (due to error or due to natural sampling variation) ONLY by gathering another sample of data.
The reasons that you need another set of data can be had from the longer answers. | How do you know if an insignificant P value is because of chance error or because the sample size of
The long answers are mostly correct, but only address your specific question indirectly. The short and direct answer is that you can gather evidence that will help you decide if your sample size is to |
29,843 | How do you know if an insignificant P value is because of chance error or because the sample size of the data is too small? | There are two main types of error: Type I error, where we reject the null hypothesis despite it being true, and Type II error, where we fail to reject the null hypothesis even though it is false. The probability of getting a Type I error, conditioned on the null hypothesis being true is called $\alpha$, and $1-\alpha$ is the sensitivity of the test. The probability of getting a Type II error, conditioned on the null hypothesis being false, is called $\beta$, and $1-\beta$ is the specificity or power of the test. Methods to estimate $\beta$ are called "power analysis".
$\alpha$ can be calculated from the null hypothesis; one of the requirements for a proper null hypothesis is that it is precisely stated enough that $\alpha$ is known. Calculating $\beta$, however, requires a precise alternative hypothesis; an alternative hypothesis that consists of merely saying that the null is false is not enough. For instance, if the null hypothesis is $\mu =0$, then we would get different $\beta$ for an alternative hypothesis of $\mu = 1$ versus an alternative hypothesis of $\mu = 2$.
How much a parameter differs from the null hypothesis is the effect size (this is often further qualified as "true effect" to distinguish it from "observed effect", with the former being the difference in the actual parameter, while the latter is the difference in the statistic measured from the sample). The main factors affecting power are sample size and effect size. The larger these factors are, the higher the power. For a small sample sizes, a failure to reject the null can be caused the small sample size, the null being true, or chance. But as the sample gets larger, the probability of failure to reject being due to chance gets smaller and smaller, and it becomes easier to draw conclusions.
Since the actual effect size is unknown, we can't know for certain what the power is. But we can, given bound on the effect size, give bounds on the power. For instance, if a drug killing one in a million people who take it is an acceptable risk, we can ask "Given an effect size of one in a million, what's the probability that a drug trial would find no statistical significant difference in fatality rates of those who took the drug?" | How do you know if an insignificant P value is because of chance error or because the sample size of | There are two main types of error: Type I error, where we reject the null hypothesis despite it being true, and Type II error, where we fail to reject the null hypothesis even though it is false. The | How do you know if an insignificant P value is because of chance error or because the sample size of the data is too small?
There are two main types of error: Type I error, where we reject the null hypothesis despite it being true, and Type II error, where we fail to reject the null hypothesis even though it is false. The probability of getting a Type I error, conditioned on the null hypothesis being true is called $\alpha$, and $1-\alpha$ is the sensitivity of the test. The probability of getting a Type II error, conditioned on the null hypothesis being false, is called $\beta$, and $1-\beta$ is the specificity or power of the test. Methods to estimate $\beta$ are called "power analysis".
$\alpha$ can be calculated from the null hypothesis; one of the requirements for a proper null hypothesis is that it is precisely stated enough that $\alpha$ is known. Calculating $\beta$, however, requires a precise alternative hypothesis; an alternative hypothesis that consists of merely saying that the null is false is not enough. For instance, if the null hypothesis is $\mu =0$, then we would get different $\beta$ for an alternative hypothesis of $\mu = 1$ versus an alternative hypothesis of $\mu = 2$.
How much a parameter differs from the null hypothesis is the effect size (this is often further qualified as "true effect" to distinguish it from "observed effect", with the former being the difference in the actual parameter, while the latter is the difference in the statistic measured from the sample). The main factors affecting power are sample size and effect size. The larger these factors are, the higher the power. For a small sample sizes, a failure to reject the null can be caused the small sample size, the null being true, or chance. But as the sample gets larger, the probability of failure to reject being due to chance gets smaller and smaller, and it becomes easier to draw conclusions.
Since the actual effect size is unknown, we can't know for certain what the power is. But we can, given bound on the effect size, give bounds on the power. For instance, if a drug killing one in a million people who take it is an acceptable risk, we can ask "Given an effect size of one in a million, what's the probability that a drug trial would find no statistical significant difference in fatality rates of those who took the drug?" | How do you know if an insignificant P value is because of chance error or because the sample size of
There are two main types of error: Type I error, where we reject the null hypothesis despite it being true, and Type II error, where we fail to reject the null hypothesis even though it is false. The |
29,844 | Can an irrelevant variable be significant in a regression model? | Here is a good example. Suppose you are interested in modelling the effect of ice cream sales on incidence of shark attacks. Now, clearly there is no association; buying ice cream in no way affects the incidence of shark attacks. However there is a third variable which affects both, namely the temperature outside.
On hot days, people will want ice cream and might also want to go swimming. Hence, hot days see increases in both ice cream sales and shark attacks (by virtue of more people going swimming and hence being at risk for an attack). This is known as confounding.
So clearly, ice cream sales is irrelevant when studying shark attacks but were we to regress shark attack numbers on ice cream sales we would find a significant result. However, that statistical significance is confounded by temperature, and so the result is meaningless.
EDIT: Because this has generated conversation around the interpretation of "irrelevant" I feel the need to make some additional comments and concede I should have said "it depends" (even though I object to the arguments made). If "relevant" is understood to mean "closely connected or appropriate to what is being done or considered" then "irrelevant" should be taken to mean "not closely connected or appropriate...". In this case, ice cream sales could be considered "relevant" since they would be correlated -- but I find interpreting "relevant" in a purely statistical sense to be an extremely narrow (and irregular) way to attach meaning to "relevant". None the less, it is an interpretation one may have.
If, however, you interpret relevance or "closely connected..." in a mechanistic sense -- i.e. how closely connected are ice cream sales and shark attacks in the sense that I could change the former and affect the latter or vice versa -- then ice cream sales would be considered irrelevant and my original comment applies. | Can an irrelevant variable be significant in a regression model? | Here is a good example. Suppose you are interested in modelling the effect of ice cream sales on incidence of shark attacks. Now, clearly there is no association; buying ice cream in no way affects | Can an irrelevant variable be significant in a regression model?
Here is a good example. Suppose you are interested in modelling the effect of ice cream sales on incidence of shark attacks. Now, clearly there is no association; buying ice cream in no way affects the incidence of shark attacks. However there is a third variable which affects both, namely the temperature outside.
On hot days, people will want ice cream and might also want to go swimming. Hence, hot days see increases in both ice cream sales and shark attacks (by virtue of more people going swimming and hence being at risk for an attack). This is known as confounding.
So clearly, ice cream sales is irrelevant when studying shark attacks but were we to regress shark attack numbers on ice cream sales we would find a significant result. However, that statistical significance is confounded by temperature, and so the result is meaningless.
EDIT: Because this has generated conversation around the interpretation of "irrelevant" I feel the need to make some additional comments and concede I should have said "it depends" (even though I object to the arguments made). If "relevant" is understood to mean "closely connected or appropriate to what is being done or considered" then "irrelevant" should be taken to mean "not closely connected or appropriate...". In this case, ice cream sales could be considered "relevant" since they would be correlated -- but I find interpreting "relevant" in a purely statistical sense to be an extremely narrow (and irregular) way to attach meaning to "relevant". None the less, it is an interpretation one may have.
If, however, you interpret relevance or "closely connected..." in a mechanistic sense -- i.e. how closely connected are ice cream sales and shark attacks in the sense that I could change the former and affect the latter or vice versa -- then ice cream sales would be considered irrelevant and my original comment applies. | Can an irrelevant variable be significant in a regression model?
Here is a good example. Suppose you are interested in modelling the effect of ice cream sales on incidence of shark attacks. Now, clearly there is no association; buying ice cream in no way affects |
29,845 | Can an irrelevant variable be significant in a regression model? | "Relevant" and "irrelevant" are not well-defined statistical terms that everyone agrees on.
Case in point: the answer by @Demetri Pananos interprets "relevant" as "causal" and the answer by @Sextus Empiricus interprets "relevant" as "included in the model that we assume is the true — or at least a valid — model for the data". Both interpretations are meaningful but they are not equivalent.
Consider for example a (correctly specified) model for the response to a medical treatment vs placebo that includes gender and age effects: $E(Y) = \beta_a\textrm{age} + \beta_g\textrm{gender} + \beta_t\textrm{treatment}$. The effect of the treatment, $\beta_t$ is causal: it's the difference between the outcome if a patient is given the treatment vs if the patient is given a placebo. However the patient doesn't "cause" the outcome of his/her/their own treatment with personal biological and genetic characteristics. A better term for age and gender in this model is "covariates" or "effect modifiers". They are certainly relevant in order to prescribe each patient the most appropriate treatment.
Another popular attempt to specify what "relevant" means is to make a distinction between "practically significant" and "clinically significant" on one hand and "statistically significant" on the other hand. For example, an effect size might be statistically different from 0 but very small in magnitude (absolute value), so perhaps not particularly useful in understanding phenomenon X, the argument goes.
Practical vs Statistical significance
Is there a colloquial way of saying "small but significant"?
There are subtleties with this interpretation of relevance has as well:
Stop talking about “statistical significance and practical significance”
So one takeaway is: If someone uses the term "(ir)relevant", "(in)significant", etc. to discuss their analysis, ask them "What exactly do you mean when you say your result is [a generic term hinting at importance]?" | Can an irrelevant variable be significant in a regression model? | "Relevant" and "irrelevant" are not well-defined statistical terms that everyone agrees on.
Case in point: the answer by @Demetri Pananos interprets "relevant" as "causal" and the answer by @Sextus Em | Can an irrelevant variable be significant in a regression model?
"Relevant" and "irrelevant" are not well-defined statistical terms that everyone agrees on.
Case in point: the answer by @Demetri Pananos interprets "relevant" as "causal" and the answer by @Sextus Empiricus interprets "relevant" as "included in the model that we assume is the true — or at least a valid — model for the data". Both interpretations are meaningful but they are not equivalent.
Consider for example a (correctly specified) model for the response to a medical treatment vs placebo that includes gender and age effects: $E(Y) = \beta_a\textrm{age} + \beta_g\textrm{gender} + \beta_t\textrm{treatment}$. The effect of the treatment, $\beta_t$ is causal: it's the difference between the outcome if a patient is given the treatment vs if the patient is given a placebo. However the patient doesn't "cause" the outcome of his/her/their own treatment with personal biological and genetic characteristics. A better term for age and gender in this model is "covariates" or "effect modifiers". They are certainly relevant in order to prescribe each patient the most appropriate treatment.
Another popular attempt to specify what "relevant" means is to make a distinction between "practically significant" and "clinically significant" on one hand and "statistically significant" on the other hand. For example, an effect size might be statistically different from 0 but very small in magnitude (absolute value), so perhaps not particularly useful in understanding phenomenon X, the argument goes.
Practical vs Statistical significance
Is there a colloquial way of saying "small but significant"?
There are subtleties with this interpretation of relevance has as well:
Stop talking about “statistical significance and practical significance”
So one takeaway is: If someone uses the term "(ir)relevant", "(in)significant", etc. to discuss their analysis, ask them "What exactly do you mean when you say your result is [a generic term hinting at importance]?" | Can an irrelevant variable be significant in a regression model?
"Relevant" and "irrelevant" are not well-defined statistical terms that everyone agrees on.
Case in point: the answer by @Demetri Pananos interprets "relevant" as "causal" and the answer by @Sextus Em |
29,846 | Can an irrelevant variable be significant in a regression model? | I think a variable can be irrelevant and significant at the same time. But, how do I explain that?
This can be explained by using the concept of type I errors.
Below is an example by repeating a t-test 1000 times where we test whether the random number generator has a mean different from zero. Say that we consider a p-value below 0.05 significant, the we find 41 times that the mean of the number generator is significantly different from zero.
p = rep(0,1000)
for (i in 1:1000) {
set.seed(i)
p[i] = t.test(rnorm(100,0,1))$p.value
}
plot(p, bg = 1 + (p<0.05), col = 1 + (p<0.05), pch = 21, cex = 0.5,
main = "p values in 1000 simulations of a t-test with different seed\n 41 cases of significant p<0.05 level", xlab = "seed number", ylab = "p-value")
lines(c(0,1000),c(0.05,0.05), lty =2)
Significant observations may happen even when there is no true effect (the null hypothesis is true) because sampling is subject to random statistical variations.
The point of 'significance' is to tell whether some observation is extreme and express it in terms of a probability, but an extreme/significant observation does not mean that it is not able to occur when there is not a true (relevant) effect. An extreme/significant observation can happen by chance. (Like in the figure above it happened 41 times out of 1000 experiments)
So that is what significant means from a statistical point of view
an extreme observation that falls outside the range of likely statistical variations that might be expected.
Significance does not directly mean a 'relevant' variable.
This is a bit of a language problem as well. Statistical significance relates to probability of observations. It is not 'significance' as in 'important' as it is used in common language.
Significance is also mostly important when it is absent. Significance is more like a minimal condition for some observation/variable to be important, and it is not like a sufficient condition. | Can an irrelevant variable be significant in a regression model? | I think a variable can be irrelevant and significant at the same time. But, how do I explain that?
This can be explained by using the concept of type I errors.
Below is an example by repeating a t-te | Can an irrelevant variable be significant in a regression model?
I think a variable can be irrelevant and significant at the same time. But, how do I explain that?
This can be explained by using the concept of type I errors.
Below is an example by repeating a t-test 1000 times where we test whether the random number generator has a mean different from zero. Say that we consider a p-value below 0.05 significant, the we find 41 times that the mean of the number generator is significantly different from zero.
p = rep(0,1000)
for (i in 1:1000) {
set.seed(i)
p[i] = t.test(rnorm(100,0,1))$p.value
}
plot(p, bg = 1 + (p<0.05), col = 1 + (p<0.05), pch = 21, cex = 0.5,
main = "p values in 1000 simulations of a t-test with different seed\n 41 cases of significant p<0.05 level", xlab = "seed number", ylab = "p-value")
lines(c(0,1000),c(0.05,0.05), lty =2)
Significant observations may happen even when there is no true effect (the null hypothesis is true) because sampling is subject to random statistical variations.
The point of 'significance' is to tell whether some observation is extreme and express it in terms of a probability, but an extreme/significant observation does not mean that it is not able to occur when there is not a true (relevant) effect. An extreme/significant observation can happen by chance. (Like in the figure above it happened 41 times out of 1000 experiments)
So that is what significant means from a statistical point of view
an extreme observation that falls outside the range of likely statistical variations that might be expected.
Significance does not directly mean a 'relevant' variable.
This is a bit of a language problem as well. Statistical significance relates to probability of observations. It is not 'significance' as in 'important' as it is used in common language.
Significance is also mostly important when it is absent. Significance is more like a minimal condition for some observation/variable to be important, and it is not like a sufficient condition. | Can an irrelevant variable be significant in a regression model?
I think a variable can be irrelevant and significant at the same time. But, how do I explain that?
This can be explained by using the concept of type I errors.
Below is an example by repeating a t-te |
29,847 | Can an irrelevant variable be significant in a regression model? | Complementary to Demetri's nice answer (+1):
Aside (unmeasured) confounding, we might have spurious associations that are not the same an unmeasured confounding. Two variables X and Y might be independent but have with similar covariance matrices that looks indistinguishable to confounding due to network or spatial structures. A reasonable fresh reference on the matter is: Network Dependence Can Lead to Spurious Associations and Invalid Inference (2020) by Lee & Ogborn where the authors refer to this phenomenon as "spurious associations due to dependence". | Can an irrelevant variable be significant in a regression model? | Complementary to Demetri's nice answer (+1):
Aside (unmeasured) confounding, we might have spurious associations that are not the same an unmeasured confounding. Two variables X and Y might be indepen | Can an irrelevant variable be significant in a regression model?
Complementary to Demetri's nice answer (+1):
Aside (unmeasured) confounding, we might have spurious associations that are not the same an unmeasured confounding. Two variables X and Y might be independent but have with similar covariance matrices that looks indistinguishable to confounding due to network or spatial structures. A reasonable fresh reference on the matter is: Network Dependence Can Lead to Spurious Associations and Invalid Inference (2020) by Lee & Ogborn where the authors refer to this phenomenon as "spurious associations due to dependence". | Can an irrelevant variable be significant in a regression model?
Complementary to Demetri's nice answer (+1):
Aside (unmeasured) confounding, we might have spurious associations that are not the same an unmeasured confounding. Two variables X and Y might be indepen |
29,848 | Can an irrelevant variable be significant in a regression model? | The definition of significance is that there is a certain probablility (not more than $\alpha=0.05$) that the wrong conclusion was drawn. The result of a statistical test can be significant, i.e. it can state that whatever the respective test tests for holds with high probability.
For example, the test result can state that there is a high probability that the weight of individual apples follows a Gaussian distribution. Or that there is a high probability that the weight of individual apples does not follow a Gaussian distribution. (Note that one of those two cases is wrong, i.e. the test yielded a wrong result. The probability for a wrong but significant result is not more than $\alpha=0.05$.) Or the test result might state that there is a high probability that ice cream consumption and shark attack frequency are correlated. Or that there is a high probability that ice cream consumption does not cause shark attacks. Or that there is a high probability that shark attacks do not cause higher ice cream consumption. Depends on which statistical test is applied to what data.
However, I don't know what you mean by a variable being "significant". The result of a statistical test can be significant. One variable can play different roles in statistical tests. | Can an irrelevant variable be significant in a regression model? | The definition of significance is that there is a certain probablility (not more than $\alpha=0.05$) that the wrong conclusion was drawn. The result of a statistical test can be significant, i.e. it c | Can an irrelevant variable be significant in a regression model?
The definition of significance is that there is a certain probablility (not more than $\alpha=0.05$) that the wrong conclusion was drawn. The result of a statistical test can be significant, i.e. it can state that whatever the respective test tests for holds with high probability.
For example, the test result can state that there is a high probability that the weight of individual apples follows a Gaussian distribution. Or that there is a high probability that the weight of individual apples does not follow a Gaussian distribution. (Note that one of those two cases is wrong, i.e. the test yielded a wrong result. The probability for a wrong but significant result is not more than $\alpha=0.05$.) Or the test result might state that there is a high probability that ice cream consumption and shark attack frequency are correlated. Or that there is a high probability that ice cream consumption does not cause shark attacks. Or that there is a high probability that shark attacks do not cause higher ice cream consumption. Depends on which statistical test is applied to what data.
However, I don't know what you mean by a variable being "significant". The result of a statistical test can be significant. One variable can play different roles in statistical tests. | Can an irrelevant variable be significant in a regression model?
The definition of significance is that there is a certain probablility (not more than $\alpha=0.05$) that the wrong conclusion was drawn. The result of a statistical test can be significant, i.e. it c |
29,849 | Can predictive models make predictions for individuals or only for groups? [closed] | There is legitimacy to each stance.
Your data science professor is right because it is routine to use a model to make a prediction about an individual. For instance, I am writing this answer on an iPhone that keeps trying to guess which word I will type next.
Your research methods professor is right because there is an entire conditional distribution to consider. While we might call $\hat y_i$ the predicted value, that is just the expected value (or median or some other quantity, depending on what exactly we do) of an entire distribution of plausible values for the individual. This is a standard argument in pop-culture statistics: the statistic means nothing to the individual, and it is true that an individual can wind up above or below average, not right smack on the average. Cross Validated has an interesting question on this very topic that I believe has some relevance to this question.
Then again, this leads to a defense of your data science professor. Yes, $\hat y_i$ is just the expected value of an entire conditional distribution, but if we believe our loss function to quantify what we value, then that is exactly the prediction we should make to minimize the pain we experience from having results that are not perfectly accurate. | Can predictive models make predictions for individuals or only for groups? [closed] | There is legitimacy to each stance.
Your data science professor is right because it is routine to use a model to make a prediction about an individual. For instance, I am writing this answer on an iPh | Can predictive models make predictions for individuals or only for groups? [closed]
There is legitimacy to each stance.
Your data science professor is right because it is routine to use a model to make a prediction about an individual. For instance, I am writing this answer on an iPhone that keeps trying to guess which word I will type next.
Your research methods professor is right because there is an entire conditional distribution to consider. While we might call $\hat y_i$ the predicted value, that is just the expected value (or median or some other quantity, depending on what exactly we do) of an entire distribution of plausible values for the individual. This is a standard argument in pop-culture statistics: the statistic means nothing to the individual, and it is true that an individual can wind up above or below average, not right smack on the average. Cross Validated has an interesting question on this very topic that I believe has some relevance to this question.
Then again, this leads to a defense of your data science professor. Yes, $\hat y_i$ is just the expected value of an entire conditional distribution, but if we believe our loss function to quantify what we value, then that is exactly the prediction we should make to minimize the pain we experience from having results that are not perfectly accurate. | Can predictive models make predictions for individuals or only for groups? [closed]
There is legitimacy to each stance.
Your data science professor is right because it is routine to use a model to make a prediction about an individual. For instance, I am writing this answer on an iPh |
29,850 | Can predictive models make predictions for individuals or only for groups? [closed] | Of course you can use predictive models on individuals. They wouldn't be very useful if you couldn't.
Your statistics professor's position is so bizarre that I wonder if maybe something got lost in communication. For example, if we were to take your reporting of his comments at face value, we would have to conclude that he had never heard of prediction intervals, which seems unlikely for a professor of statistics.
Formally, a statistical model model predicts a probability distribution for the random variable $Y$ that it is modeling. For example, an ordinary least squares model predicts:
$$Y_i \sim \text{Normal}(\alpha + \beta x_i, \sigma),$$
where $\sim$ means "is distributed as". The $\alpha$, $\beta$, and $\sigma$ are all parameters of the model; finding them is what we mean by "fitting" the model. So, it's baked into the definition of the model that we can't predict an individual case with certainty.
When people talk about the model "predicting" $\hat{y}_i$ for a case, they usually mean that $\hat{y}_i$ is the expected value of the predicted distribution. Depending on the circumstances that may or may not be a useful summary of the model's predictions, but it's not the whole story. For example, if you care about individual variation, you might compute a 95% prediction interval as $\hat{y}_i \pm 2\sigma$, which gives an idea of the range of actual events you might commonly encounter. Note, by the way, that this prediction interval will generally be much larger than a "confidence interval" for $\hat{y}_i$. The confidence interval tells you about the uncertainty in the estimate of the expectation value, which is something that is only relevant to populations.
Now, machine learning practitioners often elide all of this and just talk about "the prediction" of the model. Depending on what those are trying to do, this might be a reasonable approach, or it might not. Sometimes you need a system that is going to take its best guess and move on; it all depends on what you are trying to accomplish. I happen to think that ML models should make probabilistic predictions more often than they do, so perhaps some criticism of data science is due there, but a blanket dismissal dramatically overstates the case.
Most of your professor's other criticisms seem like red herrings to me. Obviously a model fit to data from a very limited population is only useful within that population. This comes as a surprise to nobody. And I can't even figure out what he's trying to say with his bridge analogy.
One thing I think we can all agree on is this: it's good to give some thoughts to what your model's predictions actually mean and what their limitations are. It's fair to be skeptical of boiling a prediction down to a single number, as long as you recognize that sometimes that is the right solution for certain problems. The best way to use a statistical model is to think about what question you are trying to model, and consider all of the information returned by the model and how it might be used to answer that question. That last part demands judgement, and developing and exercising good judgement is where data scientists and statisticians alike earn their keep. | Can predictive models make predictions for individuals or only for groups? [closed] | Of course you can use predictive models on individuals. They wouldn't be very useful if you couldn't.
Your statistics professor's position is so bizarre that I wonder if maybe something got lost in co | Can predictive models make predictions for individuals or only for groups? [closed]
Of course you can use predictive models on individuals. They wouldn't be very useful if you couldn't.
Your statistics professor's position is so bizarre that I wonder if maybe something got lost in communication. For example, if we were to take your reporting of his comments at face value, we would have to conclude that he had never heard of prediction intervals, which seems unlikely for a professor of statistics.
Formally, a statistical model model predicts a probability distribution for the random variable $Y$ that it is modeling. For example, an ordinary least squares model predicts:
$$Y_i \sim \text{Normal}(\alpha + \beta x_i, \sigma),$$
where $\sim$ means "is distributed as". The $\alpha$, $\beta$, and $\sigma$ are all parameters of the model; finding them is what we mean by "fitting" the model. So, it's baked into the definition of the model that we can't predict an individual case with certainty.
When people talk about the model "predicting" $\hat{y}_i$ for a case, they usually mean that $\hat{y}_i$ is the expected value of the predicted distribution. Depending on the circumstances that may or may not be a useful summary of the model's predictions, but it's not the whole story. For example, if you care about individual variation, you might compute a 95% prediction interval as $\hat{y}_i \pm 2\sigma$, which gives an idea of the range of actual events you might commonly encounter. Note, by the way, that this prediction interval will generally be much larger than a "confidence interval" for $\hat{y}_i$. The confidence interval tells you about the uncertainty in the estimate of the expectation value, which is something that is only relevant to populations.
Now, machine learning practitioners often elide all of this and just talk about "the prediction" of the model. Depending on what those are trying to do, this might be a reasonable approach, or it might not. Sometimes you need a system that is going to take its best guess and move on; it all depends on what you are trying to accomplish. I happen to think that ML models should make probabilistic predictions more often than they do, so perhaps some criticism of data science is due there, but a blanket dismissal dramatically overstates the case.
Most of your professor's other criticisms seem like red herrings to me. Obviously a model fit to data from a very limited population is only useful within that population. This comes as a surprise to nobody. And I can't even figure out what he's trying to say with his bridge analogy.
One thing I think we can all agree on is this: it's good to give some thoughts to what your model's predictions actually mean and what their limitations are. It's fair to be skeptical of boiling a prediction down to a single number, as long as you recognize that sometimes that is the right solution for certain problems. The best way to use a statistical model is to think about what question you are trying to model, and consider all of the information returned by the model and how it might be used to answer that question. That last part demands judgement, and developing and exercising good judgement is where data scientists and statisticians alike earn their keep. | Can predictive models make predictions for individuals or only for groups? [closed]
Of course you can use predictive models on individuals. They wouldn't be very useful if you couldn't.
Your statistics professor's position is so bizarre that I wonder if maybe something got lost in co |
29,851 | Can predictive models make predictions for individuals or only for groups? [closed] | You've done an excellent job summarizing the key points, and you are to be lauded for readily catching the apparent discrepancy. It's simpler than that: The purpose of statistical models is to summarize and infer stochastic trends. A stochastic trend is one that's true on average. Men are on average stronger than women. Yes, there exists a woman who is stronger than a particular man. However, I can rigorously defend the notion that a randomly sampled man should be stronger than a woman. I use data to infer those choices, and if I have more data - more information specifically - I can refine my choices in scope and precision. "Big data" data science, therefore, is just a special case of statistics, I don't think it deserves special treatment.
When presenting analyses to the FDA for a drug's approval, they are gravely concerned about generalizability. It's expected that the cohort that enrolls to a study is not representative of the general population, and it's known that undetected interactions and reduced compliance will negatively affect the estimated efficacy of treatment. To that end, many analyses are requested, to the tune of hundreds or even thousands of pages of tables, figures, etc. analyzing data at all levels of collection - even drug concentration in the blood, and clearance in liver and kidneys - so that there's a high degree of confidence that even if the trial results are not achieved per se, a favorable result is expected by adopting the drug in the population. Regarding the analysis of the one patient, if you make assumptions, you can in fact conduct tests or estimations of effect using specially tailored analyses. | Can predictive models make predictions for individuals or only for groups? [closed] | You've done an excellent job summarizing the key points, and you are to be lauded for readily catching the apparent discrepancy. It's simpler than that: The purpose of statistical models is to summari | Can predictive models make predictions for individuals or only for groups? [closed]
You've done an excellent job summarizing the key points, and you are to be lauded for readily catching the apparent discrepancy. It's simpler than that: The purpose of statistical models is to summarize and infer stochastic trends. A stochastic trend is one that's true on average. Men are on average stronger than women. Yes, there exists a woman who is stronger than a particular man. However, I can rigorously defend the notion that a randomly sampled man should be stronger than a woman. I use data to infer those choices, and if I have more data - more information specifically - I can refine my choices in scope and precision. "Big data" data science, therefore, is just a special case of statistics, I don't think it deserves special treatment.
When presenting analyses to the FDA for a drug's approval, they are gravely concerned about generalizability. It's expected that the cohort that enrolls to a study is not representative of the general population, and it's known that undetected interactions and reduced compliance will negatively affect the estimated efficacy of treatment. To that end, many analyses are requested, to the tune of hundreds or even thousands of pages of tables, figures, etc. analyzing data at all levels of collection - even drug concentration in the blood, and clearance in liver and kidneys - so that there's a high degree of confidence that even if the trial results are not achieved per se, a favorable result is expected by adopting the drug in the population. Regarding the analysis of the one patient, if you make assumptions, you can in fact conduct tests or estimations of effect using specially tailored analyses. | Can predictive models make predictions for individuals or only for groups? [closed]
You've done an excellent job summarizing the key points, and you are to be lauded for readily catching the apparent discrepancy. It's simpler than that: The purpose of statistical models is to summari |
29,852 | Can predictive models make predictions for individuals or only for groups? [closed] | Wow, professor 1 seems to suffer from a massive reverse Dunning-Kruger effect. In essence, I know a lot about one thing therefore I am an expert in all things. A little humility on his part is required.
The problem of course is that:
He doesn't understand the model building process. Sure, he has examined it. He's been tested on it. He knows a lot about it, but he doesn't understand it. The point he seems to be making having read through your post is that your model, when trained on data that came from a group, will essentially predict something about the group instead of the individual. This is, of course correct. However, he seems to equivocate this with predicting the mean of the group given some covariates. On average, this is correct and what we do when modelling. However, we can predict 95th percentiles, medians, variance, or any other meaningful statistic for the group. We then apply it to the individual. He seems very smug about the fact that we can't know anything about the individual. And the points he makes are valid. Of course, you can train a model on data that comes from a single individual and make inferences based off of that. Economists do it all the time. There is only 1 U.S. economy after all, and you can design statistical methods to make inferences on that one individual. Usually, you are stuck with time-series type models in those cases, but it can be done. However, even if you don't what about conjoint analysis where you give a subject a battery of choices in a survey. With enough choice pairs, you can generate a rigorous enough sample to make inferences on an individuals behavior. Again your professor doesn't seem very familiar with these actual scientific methods that can work on an individual basis. The question isn't can you predict on an individual, the validity of his argument is based on what is the unit of observation, and he just doesn't seem to have much experience with a wide-breadth of different observational units other than individuals. I won't fault him for this lack of experience but I will fault him for spreading disinformation onto unsuspecting students based on his ignorance.
Your professor sneers because the data science isn't "rigorous". What he really means by that isn't that there is no mathematical rigor or that there isn't even empirical rigor, or even statistical rigor. What he means is that the models aren't causal. That seems to be his biggest beef. I'll return to statistical rigor in my next point, but for now let's focus on causality. Causality is hard. And a research method class is all about trying to look for causal relationships. You want to design your experiments so that you can say that A causes B to happen. You don't want to have A and B caused simultaneously by something else, or for B to cause A. You are testing A causes B. That is the point of this class. Never lose sight of that one fact. I think this professor has lost the forest for the trees. He isn't looking at it from that perspective any longer. He's looking at research methods as its own thing that must be protected from encroachment. That's kind of sad, because it means that he has actually given up on scientific curiosity. The root of all scientific curiosity is this question: "What if?". He has closed his mind to the possibilities that these new methods could be useful. What if I could use a random forest in a causal way to do "rigorous" scientific research? What would that take? And thus he has closed entire lines of research into new methods for himself. That's sad.
Statistical rigor. These data science models do not fit neatly into his paradigm of statistics. Therefore, they do not exhibit any statistical rigor at all. However, a model like random forest does fit into this paradigm pretty easily, if instead of using mean squared error, you used a normally distributed, maximum likelihood loss (which is equivalent to mean squared error if you hang some additional assumptions on your model) then it becomes statistically meaningful. Same with binary cross-entropy loss, add a couple of assumptions and it all works out. The problem is the parameters of your model become much less meaningful. And that gets back to the causality, what the hell does your model even mean? He seems to want to get to a point where he can say something. Again that is a noble pursuit, but is a correlation really all that bad? Sure, you can make mistakes with correlation, but if you've got an underlying theory, you might be willing to take those risks in your prediction. Here's an example: I want to predict whether or not someone will buy my product. If I know their income, can I spit out a probability that they will make that purchase? Of course, with enough data I can. Why? Because income/wealth effects are real according to theory. So, do I need to spend all that time and energy in proving that to be the case to use it? Of course not. Just utilize the correlation, it might be slightly off but the broad strokes are likely just fine.
He also seems to equate uncertainty with bad. Surely, this one is a fine point. Except, every time I get in my car there is uncertainty around whether or not something mechanical will break lose and cause me to crash and die. The truth is, you deal with uncertainty with tolerances. This goes back to his bridge analogy. What is your tolerance for failure? If the first bridge spans a 1000 foot drop over spikey rocks, I am with him, I want a bridge that has been rigorously tested. If the bridge is a 2 foot fall over a small stream with rounded pebbles at the bottom of it. I will be annoyed if the bridge falls apart when I cross it, but it didn't cause too much distress. Tolerances are important and drug discovery is a high stakes, low tolerance environment, whereas, say recommending a skirt to a potential customer is a low stakes, high tolerance environment. | Can predictive models make predictions for individuals or only for groups? [closed] | Wow, professor 1 seems to suffer from a massive reverse Dunning-Kruger effect. In essence, I know a lot about one thing therefore I am an expert in all things. A little humility on his part is require | Can predictive models make predictions for individuals or only for groups? [closed]
Wow, professor 1 seems to suffer from a massive reverse Dunning-Kruger effect. In essence, I know a lot about one thing therefore I am an expert in all things. A little humility on his part is required.
The problem of course is that:
He doesn't understand the model building process. Sure, he has examined it. He's been tested on it. He knows a lot about it, but he doesn't understand it. The point he seems to be making having read through your post is that your model, when trained on data that came from a group, will essentially predict something about the group instead of the individual. This is, of course correct. However, he seems to equivocate this with predicting the mean of the group given some covariates. On average, this is correct and what we do when modelling. However, we can predict 95th percentiles, medians, variance, or any other meaningful statistic for the group. We then apply it to the individual. He seems very smug about the fact that we can't know anything about the individual. And the points he makes are valid. Of course, you can train a model on data that comes from a single individual and make inferences based off of that. Economists do it all the time. There is only 1 U.S. economy after all, and you can design statistical methods to make inferences on that one individual. Usually, you are stuck with time-series type models in those cases, but it can be done. However, even if you don't what about conjoint analysis where you give a subject a battery of choices in a survey. With enough choice pairs, you can generate a rigorous enough sample to make inferences on an individuals behavior. Again your professor doesn't seem very familiar with these actual scientific methods that can work on an individual basis. The question isn't can you predict on an individual, the validity of his argument is based on what is the unit of observation, and he just doesn't seem to have much experience with a wide-breadth of different observational units other than individuals. I won't fault him for this lack of experience but I will fault him for spreading disinformation onto unsuspecting students based on his ignorance.
Your professor sneers because the data science isn't "rigorous". What he really means by that isn't that there is no mathematical rigor or that there isn't even empirical rigor, or even statistical rigor. What he means is that the models aren't causal. That seems to be his biggest beef. I'll return to statistical rigor in my next point, but for now let's focus on causality. Causality is hard. And a research method class is all about trying to look for causal relationships. You want to design your experiments so that you can say that A causes B to happen. You don't want to have A and B caused simultaneously by something else, or for B to cause A. You are testing A causes B. That is the point of this class. Never lose sight of that one fact. I think this professor has lost the forest for the trees. He isn't looking at it from that perspective any longer. He's looking at research methods as its own thing that must be protected from encroachment. That's kind of sad, because it means that he has actually given up on scientific curiosity. The root of all scientific curiosity is this question: "What if?". He has closed his mind to the possibilities that these new methods could be useful. What if I could use a random forest in a causal way to do "rigorous" scientific research? What would that take? And thus he has closed entire lines of research into new methods for himself. That's sad.
Statistical rigor. These data science models do not fit neatly into his paradigm of statistics. Therefore, they do not exhibit any statistical rigor at all. However, a model like random forest does fit into this paradigm pretty easily, if instead of using mean squared error, you used a normally distributed, maximum likelihood loss (which is equivalent to mean squared error if you hang some additional assumptions on your model) then it becomes statistically meaningful. Same with binary cross-entropy loss, add a couple of assumptions and it all works out. The problem is the parameters of your model become much less meaningful. And that gets back to the causality, what the hell does your model even mean? He seems to want to get to a point where he can say something. Again that is a noble pursuit, but is a correlation really all that bad? Sure, you can make mistakes with correlation, but if you've got an underlying theory, you might be willing to take those risks in your prediction. Here's an example: I want to predict whether or not someone will buy my product. If I know their income, can I spit out a probability that they will make that purchase? Of course, with enough data I can. Why? Because income/wealth effects are real according to theory. So, do I need to spend all that time and energy in proving that to be the case to use it? Of course not. Just utilize the correlation, it might be slightly off but the broad strokes are likely just fine.
He also seems to equate uncertainty with bad. Surely, this one is a fine point. Except, every time I get in my car there is uncertainty around whether or not something mechanical will break lose and cause me to crash and die. The truth is, you deal with uncertainty with tolerances. This goes back to his bridge analogy. What is your tolerance for failure? If the first bridge spans a 1000 foot drop over spikey rocks, I am with him, I want a bridge that has been rigorously tested. If the bridge is a 2 foot fall over a small stream with rounded pebbles at the bottom of it. I will be annoyed if the bridge falls apart when I cross it, but it didn't cause too much distress. Tolerances are important and drug discovery is a high stakes, low tolerance environment, whereas, say recommending a skirt to a potential customer is a low stakes, high tolerance environment. | Can predictive models make predictions for individuals or only for groups? [closed]
Wow, professor 1 seems to suffer from a massive reverse Dunning-Kruger effect. In essence, I know a lot about one thing therefore I am an expert in all things. A little humility on his part is require |
29,853 | Can predictive models make predictions for individuals or only for groups? [closed] | There are already many great answers, but I would like to provide my two cents.
He mentioned that if a pharmaceutical drug was found to be effective on a cohort of men all having similar age groups, lifestyles, backgrounds and medical histories - the best we can do is say that any man from the general public who fits this cohort profile will likely experience similar effects from this drug : we can not really make any individual prediction apart from this.
How is this not a prediction for an individual? It is for an individual with that age, lifestyle, background, and medical history. The prediction for the individual is made on the basis of their belonging to the group.
If your professor's requirement is that the prediction be bespoke for the individual, I think that is a fairly high standard to have. This would require encoding all information on the individual in a vector to be used in regression. That's a tall order (and a wide design matrix).
He mentioned the field of "Survival Analysis" and told us that statistical models are routinely used to estimate the survival odds and hazard of surviving at the group level and not the individual level - he gave us an example: if you have 1 Male Asian Patient and 99 Male Non-Asian patient, you have no choice but to analyze the average survival rates of MALES ... how can you perform "Asian Specific Analysis" and make inferences about the average Asian when you only have 1 observation!?
I don't think a reasonable person would argue that this could be done.
He closed by mentioning the new and emerging field of "Precision Medicine" in which "accurate molecular taxonomy of diseases that enhances diagnosis and treatment and tailors disease management to the individual characteristics of each patient " (https://www.mdpi.com/2227-9717/10/6/1200/pdf) - i.e. for the first time, medical treatments are being considered for the individual patient's condition, and not for the average profile of this patient (although he mentioned that this is still in its infancy and should be used with great caution).
The extent to which this is being done is often greatly exaggerated. Morse and Kim 1 identify personalized medicine (sometimes used interchangeably with "precision" medicine" as "[an emerging field] with a goal of applying genomic information as a predictor of disease risk as well as individualization of drug therapy". No one person is completely and uniquely described by their genetics, lifestyle, and demographic factors. These are only means of further conditioning the outcome on additional variables which may be relevant to the outcome. It is merely an extension of the approaches your professor seems to be criticizing.
With this, he largely dismissed "Data Science" as a "pseudo science" and said although many "Data Science" models have demonstrated success, the methodology is not mathematically rigorous and can only be considered as an "engineered solution" (e.g. a Random Forest predicting if an individual patient will develop a disease - he said that this should not be done for many reasons, e.g. interpretability, blackbox, lack of odd's ratio and individual prediction).
This seems mostly handwavy to me. What does lack of odds ratios have anything to do with individualized prediction. Furthermore, to criticize machine learning and data science on their inability to provide an individualized prediction is simply begging the question -- we're trying to determine if individualized prediction is even possible.
What I anticipate has happened is that your professor has interpreted the word "personalized" in its literal sense. That this prediction $y_i$ is bespoke for me, like a well tailored suit. In that sense, it seems personalized prediction is not possible, because as I have said no one is completely and uniquely described by their finite set of covariates.
However, that does not preclude us from using those predictions to some success. I do not know if smoking will give me lung cancer or not, but based on data obtained from people who are unlike me in several ways I choose not to smoke. Additionally, as the set of covariates we use to condition on increases, we shrink the group of people for which the prediction applies. Granted, this is not personalization in the way your professor might want, but shit it's the closest we've gotten now isn't it? If you condition the prediction on my behaviour which is so finely measured and so meticulously recored, that is fairly personal. Data science and machine learning -- which I think your professor unduly criticizes -- are really great examples of this. Just open your friends youtube homepage to see just how well predictions can be personalized. | Can predictive models make predictions for individuals or only for groups? [closed] | There are already many great answers, but I would like to provide my two cents.
He mentioned that if a pharmaceutical drug was found to be effective on a cohort of men all having similar age groups, | Can predictive models make predictions for individuals or only for groups? [closed]
There are already many great answers, but I would like to provide my two cents.
He mentioned that if a pharmaceutical drug was found to be effective on a cohort of men all having similar age groups, lifestyles, backgrounds and medical histories - the best we can do is say that any man from the general public who fits this cohort profile will likely experience similar effects from this drug : we can not really make any individual prediction apart from this.
How is this not a prediction for an individual? It is for an individual with that age, lifestyle, background, and medical history. The prediction for the individual is made on the basis of their belonging to the group.
If your professor's requirement is that the prediction be bespoke for the individual, I think that is a fairly high standard to have. This would require encoding all information on the individual in a vector to be used in regression. That's a tall order (and a wide design matrix).
He mentioned the field of "Survival Analysis" and told us that statistical models are routinely used to estimate the survival odds and hazard of surviving at the group level and not the individual level - he gave us an example: if you have 1 Male Asian Patient and 99 Male Non-Asian patient, you have no choice but to analyze the average survival rates of MALES ... how can you perform "Asian Specific Analysis" and make inferences about the average Asian when you only have 1 observation!?
I don't think a reasonable person would argue that this could be done.
He closed by mentioning the new and emerging field of "Precision Medicine" in which "accurate molecular taxonomy of diseases that enhances diagnosis and treatment and tailors disease management to the individual characteristics of each patient " (https://www.mdpi.com/2227-9717/10/6/1200/pdf) - i.e. for the first time, medical treatments are being considered for the individual patient's condition, and not for the average profile of this patient (although he mentioned that this is still in its infancy and should be used with great caution).
The extent to which this is being done is often greatly exaggerated. Morse and Kim 1 identify personalized medicine (sometimes used interchangeably with "precision" medicine" as "[an emerging field] with a goal of applying genomic information as a predictor of disease risk as well as individualization of drug therapy". No one person is completely and uniquely described by their genetics, lifestyle, and demographic factors. These are only means of further conditioning the outcome on additional variables which may be relevant to the outcome. It is merely an extension of the approaches your professor seems to be criticizing.
With this, he largely dismissed "Data Science" as a "pseudo science" and said although many "Data Science" models have demonstrated success, the methodology is not mathematically rigorous and can only be considered as an "engineered solution" (e.g. a Random Forest predicting if an individual patient will develop a disease - he said that this should not be done for many reasons, e.g. interpretability, blackbox, lack of odd's ratio and individual prediction).
This seems mostly handwavy to me. What does lack of odds ratios have anything to do with individualized prediction. Furthermore, to criticize machine learning and data science on their inability to provide an individualized prediction is simply begging the question -- we're trying to determine if individualized prediction is even possible.
What I anticipate has happened is that your professor has interpreted the word "personalized" in its literal sense. That this prediction $y_i$ is bespoke for me, like a well tailored suit. In that sense, it seems personalized prediction is not possible, because as I have said no one is completely and uniquely described by their finite set of covariates.
However, that does not preclude us from using those predictions to some success. I do not know if smoking will give me lung cancer or not, but based on data obtained from people who are unlike me in several ways I choose not to smoke. Additionally, as the set of covariates we use to condition on increases, we shrink the group of people for which the prediction applies. Granted, this is not personalization in the way your professor might want, but shit it's the closest we've gotten now isn't it? If you condition the prediction on my behaviour which is so finely measured and so meticulously recored, that is fairly personal. Data science and machine learning -- which I think your professor unduly criticizes -- are really great examples of this. Just open your friends youtube homepage to see just how well predictions can be personalized. | Can predictive models make predictions for individuals or only for groups? [closed]
There are already many great answers, but I would like to provide my two cents.
He mentioned that if a pharmaceutical drug was found to be effective on a cohort of men all having similar age groups, |
29,854 | Can predictive models make predictions for individuals or only for groups? [closed] | I don't think they would be as accurate for individuals. We can look for similarities between an individual and the group but groups will be effected differently and get different results than just one individual because when you have just one individual there is no control group. | Can predictive models make predictions for individuals or only for groups? [closed] | I don't think they would be as accurate for individuals. We can look for similarities between an individual and the group but groups will be effected differently and get different results than just on | Can predictive models make predictions for individuals or only for groups? [closed]
I don't think they would be as accurate for individuals. We can look for similarities between an individual and the group but groups will be effected differently and get different results than just one individual because when you have just one individual there is no control group. | Can predictive models make predictions for individuals or only for groups? [closed]
I don't think they would be as accurate for individuals. We can look for similarities between an individual and the group but groups will be effected differently and get different results than just on |
29,855 | Can predictive models make predictions for individuals or only for groups? [closed] | Yes, they can make predictions for individuals, but there is a higher risk of significant errors. For instance we can predict that walking home was safer than driving after consuming alcohol; that didn't work too well for this poor man. But the prediction does work well better than 99% of the time...
He quipped that the first bridge is Classical Statistics and the second bridge is Data Science.
Warning: I'm always suspicious of argument by analogy.
He told us that perhaps this example is an extreme example, but this is precisely why a drug that has initially shown strong potential for curing a disease must be rigorously studied in both theoretical and empirical settings before it can be released - and in the interim, potentially less effective but better understood drugs must be administered of which we have higher confidence in.
During a previous life I developed medical devices and pharmaceuticals. Imagine that you are dealing with hazards that have high severity. One problem is getting enough test coverage, but what patients do you use for clinical trials? How do you know that you have covered all the unknown unknowns? Of then the best you can do is test with a large number of people, and cover as many possibilites as possible: male/female, young folk/elderly, fat people/slim people, as many ethnic groups as possible. Your statistics professor is right to be cautious. | Can predictive models make predictions for individuals or only for groups? [closed] | Yes, they can make predictions for individuals, but there is a higher risk of significant errors. For instance we can predict that walking home was safer than driving after consuming alcohol; that did | Can predictive models make predictions for individuals or only for groups? [closed]
Yes, they can make predictions for individuals, but there is a higher risk of significant errors. For instance we can predict that walking home was safer than driving after consuming alcohol; that didn't work too well for this poor man. But the prediction does work well better than 99% of the time...
He quipped that the first bridge is Classical Statistics and the second bridge is Data Science.
Warning: I'm always suspicious of argument by analogy.
He told us that perhaps this example is an extreme example, but this is precisely why a drug that has initially shown strong potential for curing a disease must be rigorously studied in both theoretical and empirical settings before it can be released - and in the interim, potentially less effective but better understood drugs must be administered of which we have higher confidence in.
During a previous life I developed medical devices and pharmaceuticals. Imagine that you are dealing with hazards that have high severity. One problem is getting enough test coverage, but what patients do you use for clinical trials? How do you know that you have covered all the unknown unknowns? Of then the best you can do is test with a large number of people, and cover as many possibilites as possible: male/female, young folk/elderly, fat people/slim people, as many ethnic groups as possible. Your statistics professor is right to be cautious. | Can predictive models make predictions for individuals or only for groups? [closed]
Yes, they can make predictions for individuals, but there is a higher risk of significant errors. For instance we can predict that walking home was safer than driving after consuming alcohol; that did |
29,856 | Can predictive models make predictions for individuals or only for groups? [closed] | Broadly no, of course not.
Who doubts that the only useful Question is whether predictive models work?
If you dropped all that detail and looked at the broad Question, would it not be obvious that anything like half-way predicting outcomes for individuals would make you richer than Croesus?
Would it not be equally obvious that the idea of predicting a group outcome would in itself be so powerful, anything to do with individuals would matter only by comparison? | Can predictive models make predictions for individuals or only for groups? [closed] | Broadly no, of course not.
Who doubts that the only useful Question is whether predictive models work?
If you dropped all that detail and looked at the broad Question, would it not be obvious that any | Can predictive models make predictions for individuals or only for groups? [closed]
Broadly no, of course not.
Who doubts that the only useful Question is whether predictive models work?
If you dropped all that detail and looked at the broad Question, would it not be obvious that anything like half-way predicting outcomes for individuals would make you richer than Croesus?
Would it not be equally obvious that the idea of predicting a group outcome would in itself be so powerful, anything to do with individuals would matter only by comparison? | Can predictive models make predictions for individuals or only for groups? [closed]
Broadly no, of course not.
Who doubts that the only useful Question is whether predictive models work?
If you dropped all that detail and looked at the broad Question, would it not be obvious that any |
29,857 | Can predictive models make predictions for individuals or only for groups? [closed] | The problem often lies not with the models themselves, but with how they are applied and with how people make decisions.
Too often I see the same pattern in companies starting with ML/Data Science:
They face a hard technical problem.
Someone high-ish up the management chain figures out it might be solvable by Data Science because everything is these days... Alternatively, they just catch on the hype and do not even have a problem formulation, just "more Data Science more better".
They hire someone, very rarely a full team (or, if you are lucky, they actually outsource the problem).
The new hire is able to come up with a proof-of-concept which performs better than all the old models on a small subset of test data.
They are eager to deploy it.
They want deliverables and start using "common sense" to rationalize how the model works. The added bias tends to downplay failures and emphasize successes - even if the model itself is terrible, it may be hailed as one of the greatest achievements ever by someone on C suite just because it is "AI". And then the issue is that with many statistical models the engineer can reason about the limits of their applicability fairly well. We have a decently developed framework for examining statistical models by now, and while the similar level of rigor is achievable in theory with ML/AI, it is seldom done so in practice. Also, crucially, the cost analysis is often performed poorly or even omitted entirely. That is how you have your tale of two bridges: one could factor in the cost of it failing spectacularly and so on but take a guess what ends up being done in practice? Execs taking over the "undecisive" engineer who is "too dumb" to take advantage of their competence, and the cost-saving measure gets rolled out.
And if we are talking technical execs, many of them are engineers who will try to bridge the explanatory gap using their experience and intuition, neither of which is necessarily applicable to ML. Very basically, their reasoning would go like
This model is smarter than all the old and dull models we have used before.
Old models were well-regularized and you could extrapolate their behavior well.
Ergo, this new and smart model will not freak out when encountering something it has never seen before.
So there you have it - of course, predictive models can predict individual outcomes and even be fairly efficient at that. The problem is that the resulting models are opaque, hard to reason about, and people making decisions often will be incompetent about statistics and ML. A LOT of work data scientists/statisticians/engineers do ends up being communication and ensuring their models are applied properly - and it is just a lot easier to communicate with "classical" models. When something gets done more efficiently, it is not necessarily good, either - if this something was erroneous to begin with (remember Knight Capital?..). | Can predictive models make predictions for individuals or only for groups? [closed] | The problem often lies not with the models themselves, but with how they are applied and with how people make decisions.
Too often I see the same pattern in companies starting with ML/Data Science:
T | Can predictive models make predictions for individuals or only for groups? [closed]
The problem often lies not with the models themselves, but with how they are applied and with how people make decisions.
Too often I see the same pattern in companies starting with ML/Data Science:
They face a hard technical problem.
Someone high-ish up the management chain figures out it might be solvable by Data Science because everything is these days... Alternatively, they just catch on the hype and do not even have a problem formulation, just "more Data Science more better".
They hire someone, very rarely a full team (or, if you are lucky, they actually outsource the problem).
The new hire is able to come up with a proof-of-concept which performs better than all the old models on a small subset of test data.
They are eager to deploy it.
They want deliverables and start using "common sense" to rationalize how the model works. The added bias tends to downplay failures and emphasize successes - even if the model itself is terrible, it may be hailed as one of the greatest achievements ever by someone on C suite just because it is "AI". And then the issue is that with many statistical models the engineer can reason about the limits of their applicability fairly well. We have a decently developed framework for examining statistical models by now, and while the similar level of rigor is achievable in theory with ML/AI, it is seldom done so in practice. Also, crucially, the cost analysis is often performed poorly or even omitted entirely. That is how you have your tale of two bridges: one could factor in the cost of it failing spectacularly and so on but take a guess what ends up being done in practice? Execs taking over the "undecisive" engineer who is "too dumb" to take advantage of their competence, and the cost-saving measure gets rolled out.
And if we are talking technical execs, many of them are engineers who will try to bridge the explanatory gap using their experience and intuition, neither of which is necessarily applicable to ML. Very basically, their reasoning would go like
This model is smarter than all the old and dull models we have used before.
Old models were well-regularized and you could extrapolate their behavior well.
Ergo, this new and smart model will not freak out when encountering something it has never seen before.
So there you have it - of course, predictive models can predict individual outcomes and even be fairly efficient at that. The problem is that the resulting models are opaque, hard to reason about, and people making decisions often will be incompetent about statistics and ML. A LOT of work data scientists/statisticians/engineers do ends up being communication and ensuring their models are applied properly - and it is just a lot easier to communicate with "classical" models. When something gets done more efficiently, it is not necessarily good, either - if this something was erroneous to begin with (remember Knight Capital?..). | Can predictive models make predictions for individuals or only for groups? [closed]
The problem often lies not with the models themselves, but with how they are applied and with how people make decisions.
Too often I see the same pattern in companies starting with ML/Data Science:
T |
29,858 | Monte Carlo simulations for arbitrary functions | Draw $n$ pairs $(x,y)$, iid uniformly distributed in the unit square. Count how many of these pairs satisfy $y<x^2$, let this number be $k$. Then
$$\mathbb P(Y<X^2) = \int_{[0,1]^2} \mathbb I_{y<x^2}\,\text d(x,y) = \int_0^1 x^2\,\text dx\approx\frac{k}{n}.$$
R code:
xx <- seq(0,1,by=.01)
plot(xx,xx^2,type="l",lwd=3)
n_sims <- 1e4
set.seed(1)
sims <- cbind(runif(n_sims),runif(n_sims))
index <- sims[,2]<sims[,1]^2
points(sims,pch=19,cex=0.4,col=c("red","black")[index+1])
sum(index)/length(index)
This is a variation of a well-known exercise about approximating $\pi$ (actually $\frac{\pi}{4}$, by using a quarter-circle in the unit square). | Monte Carlo simulations for arbitrary functions | Draw $n$ pairs $(x,y)$, iid uniformly distributed in the unit square. Count how many of these pairs satisfy $y<x^2$, let this number be $k$. Then
$$\mathbb P(Y<X^2) = \int_{[0,1]^2} \mathbb I_{y<x^2}\ | Monte Carlo simulations for arbitrary functions
Draw $n$ pairs $(x,y)$, iid uniformly distributed in the unit square. Count how many of these pairs satisfy $y<x^2$, let this number be $k$. Then
$$\mathbb P(Y<X^2) = \int_{[0,1]^2} \mathbb I_{y<x^2}\,\text d(x,y) = \int_0^1 x^2\,\text dx\approx\frac{k}{n}.$$
R code:
xx <- seq(0,1,by=.01)
plot(xx,xx^2,type="l",lwd=3)
n_sims <- 1e4
set.seed(1)
sims <- cbind(runif(n_sims),runif(n_sims))
index <- sims[,2]<sims[,1]^2
points(sims,pch=19,cex=0.4,col=c("red","black")[index+1])
sum(index)/length(index)
This is a variation of a well-known exercise about approximating $\pi$ (actually $\frac{\pi}{4}$, by using a quarter-circle in the unit square). | Monte Carlo simulations for arbitrary functions
Draw $n$ pairs $(x,y)$, iid uniformly distributed in the unit square. Count how many of these pairs satisfy $y<x^2$, let this number be $k$. Then
$$\mathbb P(Y<X^2) = \int_{[0,1]^2} \mathbb I_{y<x^2}\ |
29,859 | Monte Carlo simulations for arbitrary functions | The representation of$$\mathfrak I = \int_0^1 x^2\,\text dx$$as an expectation of a random variable is quite open, in that the choice of a Uniform (0,1) variable $U$ such that$$\mathfrak I = \mathbb E[U^2]$$is not the only choice. For any strictly positive probability density $f$ over $(0,1)$, the representation$$\mathfrak I = \int_0^1 x^2\,f^{-1}(x)\,f(x)\,\text dx$$ holds, meaning that $$\mathfrak I = \mathbb E^f[X^2\,f^{-1}(X)]$$can be exploited in a Monte Carlo scheme:
$$\mathfrak I = \lim_{n\to\infty}\frac{1}{n}\sum_{i=1}^n X_i^2\,f^{-1}(X_i)\qquad X_i\sim f(x)$$The (formally) optimal choice of $f$ is the Beta $\mathcal B(2,1)$ density, in that the resulting Monte Carlo approximation has variance zero. | Monte Carlo simulations for arbitrary functions | The representation of$$\mathfrak I = \int_0^1 x^2\,\text dx$$as an expectation of a random variable is quite open, in that the choice of a Uniform (0,1) variable $U$ such that$$\mathfrak I = \mathbb E | Monte Carlo simulations for arbitrary functions
The representation of$$\mathfrak I = \int_0^1 x^2\,\text dx$$as an expectation of a random variable is quite open, in that the choice of a Uniform (0,1) variable $U$ such that$$\mathfrak I = \mathbb E[U^2]$$is not the only choice. For any strictly positive probability density $f$ over $(0,1)$, the representation$$\mathfrak I = \int_0^1 x^2\,f^{-1}(x)\,f(x)\,\text dx$$ holds, meaning that $$\mathfrak I = \mathbb E^f[X^2\,f^{-1}(X)]$$can be exploited in a Monte Carlo scheme:
$$\mathfrak I = \lim_{n\to\infty}\frac{1}{n}\sum_{i=1}^n X_i^2\,f^{-1}(X_i)\qquad X_i\sim f(x)$$The (formally) optimal choice of $f$ is the Beta $\mathcal B(2,1)$ density, in that the resulting Monte Carlo approximation has variance zero. | Monte Carlo simulations for arbitrary functions
The representation of$$\mathfrak I = \int_0^1 x^2\,\text dx$$as an expectation of a random variable is quite open, in that the choice of a Uniform (0,1) variable $U$ such that$$\mathfrak I = \mathbb E |
29,860 | Monte Carlo simulations for arbitrary functions | My purpose here is to show a Riemann approximation
for $\int_0^1 x^2\, dx = 1/3$ with enough rectangles to approximate the integral.
Then to do a Monte Carlo integration in which
uniformly chosen points in the interval of integration
are substituted for centers of bases of rectangles.
# Riemann approx with m rectangles
m = 1000; a = 0; b = 1
w = (b-a)/m # rectangle widths
d = seq(a+w/2,b-w/2, len=m) # centers
h = d^2 # rectangle heights
sum(w*h) # rectamg;e areas
[1] 0.3333332
# MC emulates Riemann
# with random uniform grid
m = 10^6; a=0; b=1
w = (b-a)/m # "average width"
d = runif(m, a, b)
h = d^2
sum(w*h)
[1] 0.3332943
Addendum 1: per question in comment by @Dave: MC approximation of the density function of $\mathsf{Beta}(2,2)$ to verify it integrates to unity.
# Approx integration: BETA(2,2) density
m = 10^6; a=0; b=1
w = (b-a)/m
d = runif(m, a, b)
h = dbeta(d, 2, 2) # BETA(2,2) PDF
sum(w*h)
[1] 1.000299 # aprx 1
Addendum 2: About extending MC to multiple dimensions.
Suppose we want to verify the probability $0.3413^2 = 0.1165$ in the unit square under a standard bivariate normal distribution. We put points uniformly at
random in the unit square and sum their corresponding densities:
set.seed(1234)
m = 10^4; u1=runif(m); u2 = runif(m)
h = dnorm(u1)*dnorm(u2)
mean(h) # mc aprx
[1] 0.1163528
diff(pnorm(c(0,1)))^2 # exact
[1] 0.1165162
Also, we find the probability $0.0677$ of the standard bivariate normal distribution within the triangle with vertices $(0,0), (0,1), (1.0).$ We put points uniformly at random in the triangle, sum the corresponding values of the density, and multiply by the area $1/2$ of the triangle. [The exact value can be obtained by symmetry, using a 45-degree rotation.]
h.acc = h[u1+u2<=1]
.5*mean(h.acc) # mc aprx
[1] 0.06768097
diff(pnorm(c(sqrt(1/2),0)))^2 # exact
[1] 0.06773003
Perhaps see
this Q&A for additional MC integration methods. | Monte Carlo simulations for arbitrary functions | My purpose here is to show a Riemann approximation
for $\int_0^1 x^2\, dx = 1/3$ with enough rectangles to approximate the integral.
Then to do a Monte Carlo integration in which
uniformly chosen poin | Monte Carlo simulations for arbitrary functions
My purpose here is to show a Riemann approximation
for $\int_0^1 x^2\, dx = 1/3$ with enough rectangles to approximate the integral.
Then to do a Monte Carlo integration in which
uniformly chosen points in the interval of integration
are substituted for centers of bases of rectangles.
# Riemann approx with m rectangles
m = 1000; a = 0; b = 1
w = (b-a)/m # rectangle widths
d = seq(a+w/2,b-w/2, len=m) # centers
h = d^2 # rectangle heights
sum(w*h) # rectamg;e areas
[1] 0.3333332
# MC emulates Riemann
# with random uniform grid
m = 10^6; a=0; b=1
w = (b-a)/m # "average width"
d = runif(m, a, b)
h = d^2
sum(w*h)
[1] 0.3332943
Addendum 1: per question in comment by @Dave: MC approximation of the density function of $\mathsf{Beta}(2,2)$ to verify it integrates to unity.
# Approx integration: BETA(2,2) density
m = 10^6; a=0; b=1
w = (b-a)/m
d = runif(m, a, b)
h = dbeta(d, 2, 2) # BETA(2,2) PDF
sum(w*h)
[1] 1.000299 # aprx 1
Addendum 2: About extending MC to multiple dimensions.
Suppose we want to verify the probability $0.3413^2 = 0.1165$ in the unit square under a standard bivariate normal distribution. We put points uniformly at
random in the unit square and sum their corresponding densities:
set.seed(1234)
m = 10^4; u1=runif(m); u2 = runif(m)
h = dnorm(u1)*dnorm(u2)
mean(h) # mc aprx
[1] 0.1163528
diff(pnorm(c(0,1)))^2 # exact
[1] 0.1165162
Also, we find the probability $0.0677$ of the standard bivariate normal distribution within the triangle with vertices $(0,0), (0,1), (1.0).$ We put points uniformly at random in the triangle, sum the corresponding values of the density, and multiply by the area $1/2$ of the triangle. [The exact value can be obtained by symmetry, using a 45-degree rotation.]
h.acc = h[u1+u2<=1]
.5*mean(h.acc) # mc aprx
[1] 0.06768097
diff(pnorm(c(sqrt(1/2),0)))^2 # exact
[1] 0.06773003
Perhaps see
this Q&A for additional MC integration methods. | Monte Carlo simulations for arbitrary functions
My purpose here is to show a Riemann approximation
for $\int_0^1 x^2\, dx = 1/3$ with enough rectangles to approximate the integral.
Then to do a Monte Carlo integration in which
uniformly chosen poin |
29,861 | Should I trust the $p$-value in statistical tests? | For the purpose of this answer I'm going to assume that excluding those few participants was fully justified, but I agree with Patrick that this is a concern.
There's no meaningful difference between p ~ 0.05 or p = 0.06. The only difference here is that the convention is to treat the former as equivalent to 'true' and the latter as equivalent to 'false'. This convention is terrible and is unjustifiable. The debate between you and your professor amounts to how to form a rule of thumb to deal with the arbitrariness of the p = 0.05 boundary. In a saner world, we would not put quite so much stock into tiny fluctuations of a sample statistic.
Or to put it more colourfully:
...surely, God loves the .06 nearly as much as the .05.
Can there be any doubt that God views the strength of evidence for or
against the null as a fairly continuous function of the magnitude of
p?”
-Rosnow, R.L. & Rosenthal, R. (1989). Statistical procedures and the
justification of knowledge in psychological science. American
Psychologist, 44, 1276-1284.
So go ahead and report that p = 0.06. The number itself is fine, it's how it is subsequently described and interpreted that is important. Keep in mind that 'significant' and 'non-significant' are misleading terms. You will have to go beyond them to describe your results accurately.
Furthermore, I recommend you read the answers to What is the meaning of p values and t values in statistical tests? | Should I trust the $p$-value in statistical tests? | For the purpose of this answer I'm going to assume that excluding those few participants was fully justified, but I agree with Patrick that this is a concern.
There's no meaningful difference between | Should I trust the $p$-value in statistical tests?
For the purpose of this answer I'm going to assume that excluding those few participants was fully justified, but I agree with Patrick that this is a concern.
There's no meaningful difference between p ~ 0.05 or p = 0.06. The only difference here is that the convention is to treat the former as equivalent to 'true' and the latter as equivalent to 'false'. This convention is terrible and is unjustifiable. The debate between you and your professor amounts to how to form a rule of thumb to deal with the arbitrariness of the p = 0.05 boundary. In a saner world, we would not put quite so much stock into tiny fluctuations of a sample statistic.
Or to put it more colourfully:
...surely, God loves the .06 nearly as much as the .05.
Can there be any doubt that God views the strength of evidence for or
against the null as a fairly continuous function of the magnitude of
p?”
-Rosnow, R.L. & Rosenthal, R. (1989). Statistical procedures and the
justification of knowledge in psychological science. American
Psychologist, 44, 1276-1284.
So go ahead and report that p = 0.06. The number itself is fine, it's how it is subsequently described and interpreted that is important. Keep in mind that 'significant' and 'non-significant' are misleading terms. You will have to go beyond them to describe your results accurately.
Furthermore, I recommend you read the answers to What is the meaning of p values and t values in statistical tests? | Should I trust the $p$-value in statistical tests?
For the purpose of this answer I'm going to assume that excluding those few participants was fully justified, but I agree with Patrick that this is a concern.
There's no meaningful difference between |
29,862 | Should I trust the $p$-value in statistical tests? | There are an awful lot of issues raised in your question, so I will try to give answers on each of the issues you raise. To frame some of these issues clearly, it is important to note at the outset that a p-value is a continuous measure of evidence against the null hypothesis (in favour of the stated alternative), but when we compare it to a stipulated significance level to give a conclusion of "statistical significance" we are dichotomising that continuous measure of evidence into a binary measure.
It makes no sense to tell people that the result is not significant in a sample of 71, but it’s significant in a sample of 77.
You need to decide which of those two is actually the appropriate sample ---i.e., is it appropriate to remove six data points from your data. For reasons explained many times on this site (e.g., here and here) it is a bad idea to remove "outliers" that are not due to incorrect recording of observations. So, unless you have reason to believe this is the case, it is probably appropriate to use all 77 data points, in which case it makes no sense to say anything about the cherry-picked subsample of 71 data points.
Note here that the problem is nothing to do with the issue of statistical significance. It makes perfect sense that the outcome of different hypothesis tests (e.g., the same test on different data) could differ, and so there is no reason to regard it as problematic that there would be statistically significant evidence for the alternative hypothesis in one case, but not in the other. This is a natural consequence of having a binary outcome obtained by drawing a line of "significance" in a continuous measure of evidence.
It is important to link the results to the findings in the literature when interpreting a trend. Although we find a weak trend here, this trend aligns with numerous studies in the literature that finds significant correlations in these two variables.
If this is something you want to do, then the appropriate exercise is to do a meta-analysis to take account of all the data in the literature. The mere fact that there is other literature with other data/evidence is not a justification for treating the data in this paper any differently than you otherwise would. Do your data analysis on the data in your own paper. If you are concerned that your own result is an aberration from the literature, then note this other evidence. You can then either do a proper meta-analysis where all the data (yours and the other literature) is taken into account, or you can at least alert your reader to the scope of the available data.
Here is what my supervisor reply: I would argue the other way: If it’s no longer significant in the sample of 71, it’s too weak to be reported. If there is a strong signal, we will see it in the smaller sample, as well. Shall I not report this 'not significant' result?
Choosing not to report data because the statistical results differ from other literature is a terrible, horrible, statistically-bankrupt practice. There is a ton of literature in statistical theory warning of the problem of publication bias that occurs when researchers allow the outcome of their statistical tests to affect their choice to report/publish their data. Indeed, publication bias due to publication decisions being made on the basis of p-values is the bane of the scientific literature. It is probably one of the biggest problems in scientific and academic practice.
Regardless of how "weak" the evidence for the alternative hypothesis, the data you have collected contains information that should be reported/published. It adds 77 data points to the literature, for whatever that is worth. You should report your data and report the p-value for your test. If this does not constitute statistically significant evidence of the effect under study, then so be it. | Should I trust the $p$-value in statistical tests? | There are an awful lot of issues raised in your question, so I will try to give answers on each of the issues you raise. To frame some of these issues clearly, it is important to note at the outset t | Should I trust the $p$-value in statistical tests?
There are an awful lot of issues raised in your question, so I will try to give answers on each of the issues you raise. To frame some of these issues clearly, it is important to note at the outset that a p-value is a continuous measure of evidence against the null hypothesis (in favour of the stated alternative), but when we compare it to a stipulated significance level to give a conclusion of "statistical significance" we are dichotomising that continuous measure of evidence into a binary measure.
It makes no sense to tell people that the result is not significant in a sample of 71, but it’s significant in a sample of 77.
You need to decide which of those two is actually the appropriate sample ---i.e., is it appropriate to remove six data points from your data. For reasons explained many times on this site (e.g., here and here) it is a bad idea to remove "outliers" that are not due to incorrect recording of observations. So, unless you have reason to believe this is the case, it is probably appropriate to use all 77 data points, in which case it makes no sense to say anything about the cherry-picked subsample of 71 data points.
Note here that the problem is nothing to do with the issue of statistical significance. It makes perfect sense that the outcome of different hypothesis tests (e.g., the same test on different data) could differ, and so there is no reason to regard it as problematic that there would be statistically significant evidence for the alternative hypothesis in one case, but not in the other. This is a natural consequence of having a binary outcome obtained by drawing a line of "significance" in a continuous measure of evidence.
It is important to link the results to the findings in the literature when interpreting a trend. Although we find a weak trend here, this trend aligns with numerous studies in the literature that finds significant correlations in these two variables.
If this is something you want to do, then the appropriate exercise is to do a meta-analysis to take account of all the data in the literature. The mere fact that there is other literature with other data/evidence is not a justification for treating the data in this paper any differently than you otherwise would. Do your data analysis on the data in your own paper. If you are concerned that your own result is an aberration from the literature, then note this other evidence. You can then either do a proper meta-analysis where all the data (yours and the other literature) is taken into account, or you can at least alert your reader to the scope of the available data.
Here is what my supervisor reply: I would argue the other way: If it’s no longer significant in the sample of 71, it’s too weak to be reported. If there is a strong signal, we will see it in the smaller sample, as well. Shall I not report this 'not significant' result?
Choosing not to report data because the statistical results differ from other literature is a terrible, horrible, statistically-bankrupt practice. There is a ton of literature in statistical theory warning of the problem of publication bias that occurs when researchers allow the outcome of their statistical tests to affect their choice to report/publish their data. Indeed, publication bias due to publication decisions being made on the basis of p-values is the bane of the scientific literature. It is probably one of the biggest problems in scientific and academic practice.
Regardless of how "weak" the evidence for the alternative hypothesis, the data you have collected contains information that should be reported/published. It adds 77 data points to the literature, for whatever that is worth. You should report your data and report the p-value for your test. If this does not constitute statistically significant evidence of the effect under study, then so be it. | Should I trust the $p$-value in statistical tests?
There are an awful lot of issues raised in your question, so I will try to give answers on each of the issues you raise. To frame some of these issues clearly, it is important to note at the outset t |
29,863 | Should I trust the $p$-value in statistical tests? | In general changing the data that went into a test invalidates the use of hypothesis testing to find significant effects. If you start editing the data and rerunning the test to see what changes you can come up with almost any result that you wish. Imagine what would happen if you removed 6 participants and it made your finding more significant. I would strongly recommend reading this: http://www.stat.columbia.edu/~gelman/research/unpublished/p_hacking.pdf because it has a great discussion of the issues that can arise when analysis decisions are being made after seeing the data and the fact that that invalidates the usual interpretation of p-values.
So my question in this case is as follows: What is the motivation behind removing these participants? Was it purely based on the outcome metric (i.e., those 6 participants had the strongest effect)? Or was there some reason intrinsic to those participants (failed to complete the tasks correctly, didn't meet entry requirements, etc)?
In order to use p-values to discuss significance those decisions should have been made prior to running your statistical test and not after. So I would report the results with the 77 participants as you originally did it and ignore your supervisors comments.
I just want to reiterate here: it is not true that a smaller sample has to show the same effect if you are making the inclusion/exclusion decisions based on seeing the data. | Should I trust the $p$-value in statistical tests? | In general changing the data that went into a test invalidates the use of hypothesis testing to find significant effects. If you start editing the data and rerunning the test to see what changes you c | Should I trust the $p$-value in statistical tests?
In general changing the data that went into a test invalidates the use of hypothesis testing to find significant effects. If you start editing the data and rerunning the test to see what changes you can come up with almost any result that you wish. Imagine what would happen if you removed 6 participants and it made your finding more significant. I would strongly recommend reading this: http://www.stat.columbia.edu/~gelman/research/unpublished/p_hacking.pdf because it has a great discussion of the issues that can arise when analysis decisions are being made after seeing the data and the fact that that invalidates the usual interpretation of p-values.
So my question in this case is as follows: What is the motivation behind removing these participants? Was it purely based on the outcome metric (i.e., those 6 participants had the strongest effect)? Or was there some reason intrinsic to those participants (failed to complete the tasks correctly, didn't meet entry requirements, etc)?
In order to use p-values to discuss significance those decisions should have been made prior to running your statistical test and not after. So I would report the results with the 77 participants as you originally did it and ignore your supervisors comments.
I just want to reiterate here: it is not true that a smaller sample has to show the same effect if you are making the inclusion/exclusion decisions based on seeing the data. | Should I trust the $p$-value in statistical tests?
In general changing the data that went into a test invalidates the use of hypothesis testing to find significant effects. If you start editing the data and rerunning the test to see what changes you c |
29,864 | Should I trust the $p$-value in statistical tests? | No do not trust the p-value.
1 It does not convey whether or not you have an effect.
The main issue should be whether or not the effect (the effect size) that you measure is relevant or not. You say that you measured $\rho = 0.21$ and that this is important in your field. Then you should report it.
The p-value is more to be seen as an indicator of the accuracy of your experiment. If your experiment is not accurate, either due to large noise or due to small sample size, then even in the absence of an effect it might be likely to observe an effect in the noise (the p-value tells how likely).
In your case, the correlation, the p-value is often computed based on a the statistic $$t = \rho \sqrt{\frac{n-2}{1-\rho^2}}$$ Wich is t-distributed with $\nu = n-2$ degrees of freedom when certain assumptions a are right (more on that later).
This means that the p-value is related to the measured correlation and the sample size. Let's see how this looks:
The graph shows how the significance depends on both the measured correlation and the sample size (the lines are contour lines for p-values 0.001, 0.01, 0.02, 0.05, 0.1). Note that: For the same measured effect (e.g. correlation of 0.21) you can have different significance depending on the experiment (the sample size). (thus if significance is 'not good enough' it may depend on the experiment)
It would be wrong to say that there is no effect (while measuring $\rho = 0.21$) just because you did not have significance above some arbitrary level. Instead, you should conclude that there may be an effect, but the significance indicates that your experiment needs to be repeated/refined (improved accuracy) in order to be more sure.
The correlation is just one way to express that there is an effect. It is only limited to linear relationships. You may have a strong (non-linear) relationship between your variables but still a low correlation (and if this plays a role then it makes that you have even more reasons to care less about the p-value)
Make a plot in order to see better what is going on. See more here:
Anscombe's
quartet
2 The underlying assumptions for the computation may be wrong.
The computation of the p-value of a correlation is ambiguous. There are different ways. When you use the earlier mentioned t-statistic then your assumptions are that the two variables are independent uncorrelated normal distributed variables. But you may instead have some other distribution for your data (e.g. some wider tails). In that case a bootstrap method may be better.
Example. Let your data be two identical independent distributed Bernoulli variables (with $p_{succes} = 0.05$). Let's simulate this situation and see how the p-values are distributed (it should be a uniform distribution).
These Bernoulli distributed variable are not something to which one would normally apply a correlation and calculation of p-value. However, it is a simple model for the cases where you have a continous distribution that is multimodal distribution.
You could do similar simulations with different variables. In general the observed p-values are underestimating the true probability (say a p-value below x% will in reality be occuring more often than x% of the cases). So your computed p-value p=0.06, might be underestimating the true p-value (if you use the t-distribution and the assumptions are not right).
Philosophical
In addition the difference between p=0.05 and p=0.06 is not very relevant. But it is a bit difficult to say at which value there is a 'border' between yes/no significant. This is related to Sorites paradox. My point of view is that it is a bit of a false dichotomy to considere that there is some boundary. The concept of p-values and significance is not black and white (and the imposed boundaries, which are unrealistic, will be in practice very arbitrary).
Practice
Power analysis Normally you avoid these issues by computing beforehand what sort of sample you need in order to be able to accurately measure in the range of the expected effect sizes.
Two-one-sided t-tests. Besides testing the null hypothesis (does my data/experiment) correspond with or counter the null hypothesis, you can also consider evaluating whether your data/experiment corresponds with the alternative hypothesis. This is done with the two-one-sided t-tests. You can have the situation that your data is neither (significantly) disagreeing with null-hypothesis (absence of effect) nor with an alternative hypothesis (some minimal level of the effect).
Ideally, you report all your values. And not just the significant ones. (but maybe you mean by 'reporting the value' something like 'discuss the value in the text') | Should I trust the $p$-value in statistical tests? | No do not trust the p-value.
1 It does not convey whether or not you have an effect.
The main issue should be whether or not the effect (the effect size) that you measure is relevant or not. You say | Should I trust the $p$-value in statistical tests?
No do not trust the p-value.
1 It does not convey whether or not you have an effect.
The main issue should be whether or not the effect (the effect size) that you measure is relevant or not. You say that you measured $\rho = 0.21$ and that this is important in your field. Then you should report it.
The p-value is more to be seen as an indicator of the accuracy of your experiment. If your experiment is not accurate, either due to large noise or due to small sample size, then even in the absence of an effect it might be likely to observe an effect in the noise (the p-value tells how likely).
In your case, the correlation, the p-value is often computed based on a the statistic $$t = \rho \sqrt{\frac{n-2}{1-\rho^2}}$$ Wich is t-distributed with $\nu = n-2$ degrees of freedom when certain assumptions a are right (more on that later).
This means that the p-value is related to the measured correlation and the sample size. Let's see how this looks:
The graph shows how the significance depends on both the measured correlation and the sample size (the lines are contour lines for p-values 0.001, 0.01, 0.02, 0.05, 0.1). Note that: For the same measured effect (e.g. correlation of 0.21) you can have different significance depending on the experiment (the sample size). (thus if significance is 'not good enough' it may depend on the experiment)
It would be wrong to say that there is no effect (while measuring $\rho = 0.21$) just because you did not have significance above some arbitrary level. Instead, you should conclude that there may be an effect, but the significance indicates that your experiment needs to be repeated/refined (improved accuracy) in order to be more sure.
The correlation is just one way to express that there is an effect. It is only limited to linear relationships. You may have a strong (non-linear) relationship between your variables but still a low correlation (and if this plays a role then it makes that you have even more reasons to care less about the p-value)
Make a plot in order to see better what is going on. See more here:
Anscombe's
quartet
2 The underlying assumptions for the computation may be wrong.
The computation of the p-value of a correlation is ambiguous. There are different ways. When you use the earlier mentioned t-statistic then your assumptions are that the two variables are independent uncorrelated normal distributed variables. But you may instead have some other distribution for your data (e.g. some wider tails). In that case a bootstrap method may be better.
Example. Let your data be two identical independent distributed Bernoulli variables (with $p_{succes} = 0.05$). Let's simulate this situation and see how the p-values are distributed (it should be a uniform distribution).
These Bernoulli distributed variable are not something to which one would normally apply a correlation and calculation of p-value. However, it is a simple model for the cases where you have a continous distribution that is multimodal distribution.
You could do similar simulations with different variables. In general the observed p-values are underestimating the true probability (say a p-value below x% will in reality be occuring more often than x% of the cases). So your computed p-value p=0.06, might be underestimating the true p-value (if you use the t-distribution and the assumptions are not right).
Philosophical
In addition the difference between p=0.05 and p=0.06 is not very relevant. But it is a bit difficult to say at which value there is a 'border' between yes/no significant. This is related to Sorites paradox. My point of view is that it is a bit of a false dichotomy to considere that there is some boundary. The concept of p-values and significance is not black and white (and the imposed boundaries, which are unrealistic, will be in practice very arbitrary).
Practice
Power analysis Normally you avoid these issues by computing beforehand what sort of sample you need in order to be able to accurately measure in the range of the expected effect sizes.
Two-one-sided t-tests. Besides testing the null hypothesis (does my data/experiment) correspond with or counter the null hypothesis, you can also consider evaluating whether your data/experiment corresponds with the alternative hypothesis. This is done with the two-one-sided t-tests. You can have the situation that your data is neither (significantly) disagreeing with null-hypothesis (absence of effect) nor with an alternative hypothesis (some minimal level of the effect).
Ideally, you report all your values. And not just the significant ones. (but maybe you mean by 'reporting the value' something like 'discuss the value in the text') | Should I trust the $p$-value in statistical tests?
No do not trust the p-value.
1 It does not convey whether or not you have an effect.
The main issue should be whether or not the effect (the effect size) that you measure is relevant or not. You say |
29,865 | Should I trust the $p$-value in statistical tests? | In general, you should not choose to report results on the basis of significance or agreement with your goals.
I agree with you that a p-value of .06 isn't much different from .04 (as others stated, a p-value is a continuous summary of how the observed data are "compatible" with the specific null hypothesis and smaller p-value means lower compatibility). Therefore, they (.04 vs .06) both convey mild (very mild in a typical observational study) evidence contradicting the null hypothesis and the alpha threshold is not a magical number.
Second, your advisor is unequivocally incorrect in the interpretation of "... 'you should report there are no correlations between these two variables, the p-value is not significant.'" This is a mistake to interpret lack of significance as 'no relationship/correlation'. Please see Point # 6, at a minimum. This is a rudimentary logical fallacy that is generalized as "absence of evidence equals evidence of absence", which we know is false for various reasons, one of which is the problem of induction.
Your advisor is best served to read the below reference.
https://link.springer.com/article/10.1007/s10654-016-0149-3#Sec2 | Should I trust the $p$-value in statistical tests? | In general, you should not choose to report results on the basis of significance or agreement with your goals.
I agree with you that a p-value of .06 isn't much different from .04 (as others stated, a | Should I trust the $p$-value in statistical tests?
In general, you should not choose to report results on the basis of significance or agreement with your goals.
I agree with you that a p-value of .06 isn't much different from .04 (as others stated, a p-value is a continuous summary of how the observed data are "compatible" with the specific null hypothesis and smaller p-value means lower compatibility). Therefore, they (.04 vs .06) both convey mild (very mild in a typical observational study) evidence contradicting the null hypothesis and the alpha threshold is not a magical number.
Second, your advisor is unequivocally incorrect in the interpretation of "... 'you should report there are no correlations between these two variables, the p-value is not significant.'" This is a mistake to interpret lack of significance as 'no relationship/correlation'. Please see Point # 6, at a minimum. This is a rudimentary logical fallacy that is generalized as "absence of evidence equals evidence of absence", which we know is false for various reasons, one of which is the problem of induction.
Your advisor is best served to read the below reference.
https://link.springer.com/article/10.1007/s10654-016-0149-3#Sec2 | Should I trust the $p$-value in statistical tests?
In general, you should not choose to report results on the basis of significance or agreement with your goals.
I agree with you that a p-value of .06 isn't much different from .04 (as others stated, a |
29,866 | Should I trust the $p$-value in statistical tests? | EDIT: This answer assumes that, as written, this was an example of a data sleuthing exercise. However, comments reveal a much different scenario plays out here.
This is an example of Munchausen's Statistical Grid in reverse. The question then becomes: how many subjects do I have to remove before the result is no longer statistically significant? And the answer is (if I can deliberately remove high influence/high leverage observations) not that many! This is at it should be, an ideal study is powered commensurately with its effect size. For instance, if I want 90% power to reject the null hypothesis at the 0.05 level, I should be plenty pleased with my sample size calculation if after conducting my trial I reject the null only just at that level. Any sample fewer and I fail to reject the null. Any sample in excess and I have spent too much money or time on my study.
Removing observations reduces power. This is not interesting.
I would respond that deletion diagnostics are useful for identifying high leverage and high influence observations HOWEVER without a preplanned analysis to remove those observations, the results of doing so are meaningless. | Should I trust the $p$-value in statistical tests? | EDIT: This answer assumes that, as written, this was an example of a data sleuthing exercise. However, comments reveal a much different scenario plays out here.
This is an example of Munchausen's Stat | Should I trust the $p$-value in statistical tests?
EDIT: This answer assumes that, as written, this was an example of a data sleuthing exercise. However, comments reveal a much different scenario plays out here.
This is an example of Munchausen's Statistical Grid in reverse. The question then becomes: how many subjects do I have to remove before the result is no longer statistically significant? And the answer is (if I can deliberately remove high influence/high leverage observations) not that many! This is at it should be, an ideal study is powered commensurately with its effect size. For instance, if I want 90% power to reject the null hypothesis at the 0.05 level, I should be plenty pleased with my sample size calculation if after conducting my trial I reject the null only just at that level. Any sample fewer and I fail to reject the null. Any sample in excess and I have spent too much money or time on my study.
Removing observations reduces power. This is not interesting.
I would respond that deletion diagnostics are useful for identifying high leverage and high influence observations HOWEVER without a preplanned analysis to remove those observations, the results of doing so are meaningless. | Should I trust the $p$-value in statistical tests?
EDIT: This answer assumes that, as written, this was an example of a data sleuthing exercise. However, comments reveal a much different scenario plays out here.
This is an example of Munchausen's Stat |
29,867 | Should I trust the $p$-value in statistical tests? | May I rephrase your question as "Should I report the p-value when estimating correlation"? I would answer this question with "no": report a confidence interval for your measured correlation instead!
This will make it clear whether your results are compatible with the results reported in the literature (just check whether these results fall into your confidence interval). On the other hand, if your p-value of the hypothesis $H_0:\,r=0$ is 0.06 and those of other studies is less than 0.05, this does not mean that your result contradicts the other studies.
Concerning the remark of your superviser: the correlation in your case is so small (0.21) that you need a large sample size for obtaining a confidence interval not including zero. You can always make the tiniest correlation "statistically significant" simply by increasing the sample size, the smaller the correlation is, the larger, however, must the sample size be to make it "significant". That's why I would not report the p-value, but the measured value with a confidence interval. It seems to me that your results are in agreement with the other studies, if they also report a merely weak positive correlation.
Acknowledgements: I am not the first to make this recommendation ;-) | Should I trust the $p$-value in statistical tests? | May I rephrase your question as "Should I report the p-value when estimating correlation"? I would answer this question with "no": report a confidence interval for your measured correlation instead!
T | Should I trust the $p$-value in statistical tests?
May I rephrase your question as "Should I report the p-value when estimating correlation"? I would answer this question with "no": report a confidence interval for your measured correlation instead!
This will make it clear whether your results are compatible with the results reported in the literature (just check whether these results fall into your confidence interval). On the other hand, if your p-value of the hypothesis $H_0:\,r=0$ is 0.06 and those of other studies is less than 0.05, this does not mean that your result contradicts the other studies.
Concerning the remark of your superviser: the correlation in your case is so small (0.21) that you need a large sample size for obtaining a confidence interval not including zero. You can always make the tiniest correlation "statistically significant" simply by increasing the sample size, the smaller the correlation is, the larger, however, must the sample size be to make it "significant". That's why I would not report the p-value, but the measured value with a confidence interval. It seems to me that your results are in agreement with the other studies, if they also report a merely weak positive correlation.
Acknowledgements: I am not the first to make this recommendation ;-) | Should I trust the $p$-value in statistical tests?
May I rephrase your question as "Should I report the p-value when estimating correlation"? I would answer this question with "no": report a confidence interval for your measured correlation instead!
T |
29,868 | Should I trust the $p$-value in statistical tests? | I partially agree with your advisor. Sometimes, even statistically significant results can be not at all significant to report.
You need to think whether the size of the sample correlation is large enough to make a meaningful statement. As an extreme case, let say the true correlation is in fact 0.01. If you have large enough participants, you can still get a very small p-value (since it is non-zero!). However, depending on the context, 0.01 correlation could mean nothing. In your case, the true correlation can be non-zero but still is too small to be detected by 71 samples. I think a better discussion topic with the advisor is about whether the effect size is large enough to report not about whether the test is statistically significant. | Should I trust the $p$-value in statistical tests? | I partially agree with your advisor. Sometimes, even statistically significant results can be not at all significant to report.
You need to think whether the size of the sample correlation is large en | Should I trust the $p$-value in statistical tests?
I partially agree with your advisor. Sometimes, even statistically significant results can be not at all significant to report.
You need to think whether the size of the sample correlation is large enough to make a meaningful statement. As an extreme case, let say the true correlation is in fact 0.01. If you have large enough participants, you can still get a very small p-value (since it is non-zero!). However, depending on the context, 0.01 correlation could mean nothing. In your case, the true correlation can be non-zero but still is too small to be detected by 71 samples. I think a better discussion topic with the advisor is about whether the effect size is large enough to report not about whether the test is statistically significant. | Should I trust the $p$-value in statistical tests?
I partially agree with your advisor. Sometimes, even statistically significant results can be not at all significant to report.
You need to think whether the size of the sample correlation is large en |
29,869 | Detect if there is actually two populations in a sample | Let's start with terminology. Population in statistics is the "set of entities under study". When designing the study, we define the population of interest and then draw samples from this population. So sample cannot "consist" of multiple populations. More appropriate wording would be to talk about "groups", "clusters", or "subpopulations".
To find clusters in your data, you could use clustering algorithms, that will try to split your data into a predefined number of groups, given such criteria. Usually we are aiming at the samples within each cluster being most similar to each other, while the clusters most dissimilar. Notice the logical problem in here: if you would first group stuff in such way that the groups are dissimilar from each other and then test if they differ, then this gets circular. If your test fails, maybe the clustering algorithm was not good enough, or test not sensitive enough? It opens many ways to "torturing the data until it confesses" and generally is a bad idea.
One approach that can be justified, is to use model-based clustering (i.e. mixture model, as mentioned in the other answer by Stephan Kolassa) with one, or two clusters and then conduct a likelihood-ratio test to compare two models. If the data is more "likely" given the two-cluster model, then you can say that two-cluster solution "fits better" the data, though it doesn't prove that there were actual subpopulations. This approach would need you to be able to define a statistical model that describes the data, so it is more complicated then using "black box" clustering algorithm. | Detect if there is actually two populations in a sample | Let's start with terminology. Population in statistics is the "set of entities under study". When designing the study, we define the population of interest and then draw samples from this population. | Detect if there is actually two populations in a sample
Let's start with terminology. Population in statistics is the "set of entities under study". When designing the study, we define the population of interest and then draw samples from this population. So sample cannot "consist" of multiple populations. More appropriate wording would be to talk about "groups", "clusters", or "subpopulations".
To find clusters in your data, you could use clustering algorithms, that will try to split your data into a predefined number of groups, given such criteria. Usually we are aiming at the samples within each cluster being most similar to each other, while the clusters most dissimilar. Notice the logical problem in here: if you would first group stuff in such way that the groups are dissimilar from each other and then test if they differ, then this gets circular. If your test fails, maybe the clustering algorithm was not good enough, or test not sensitive enough? It opens many ways to "torturing the data until it confesses" and generally is a bad idea.
One approach that can be justified, is to use model-based clustering (i.e. mixture model, as mentioned in the other answer by Stephan Kolassa) with one, or two clusters and then conduct a likelihood-ratio test to compare two models. If the data is more "likely" given the two-cluster model, then you can say that two-cluster solution "fits better" the data, though it doesn't prove that there were actual subpopulations. This approach would need you to be able to define a statistical model that describes the data, so it is more complicated then using "black box" clustering algorithm. | Detect if there is actually two populations in a sample
Let's start with terminology. Population in statistics is the "set of entities under study". When designing the study, we define the population of interest and then draw samples from this population. |
29,870 | Detect if there is actually two populations in a sample | There is no way to do this by non-parametric paradigm, just think of it: the sampled distribution is a completely legit one, there is nothing preventing a single-population distribution from having two separate high density zones.
But if you turn to parametric models, you may assume that your sub-populations are gaussian, and gaussian distribution has only one bell-shaped high density region. If you do so, you can run EM clustering to estimate the likelihood of a mixture model of two gaussian clusters, and compare it to the one-population scenario with a likelihood ratio test.
Looking to your data, this test will certainly show high significance. But there are problems:
EM clustering tends to inflate likelihood of multiple sub-populations hypothesis when the real distributions are not quite gaussian
even more importantly, performing a test on a hypothesis formulated after looking at the data gives auto-confirmation bias.
In brief, I recommend you to let it go, and just comment the observed distribution as "likely coming from distinct sub-populations", or something around this line. Any test about it would be biased and unreliable. | Detect if there is actually two populations in a sample | There is no way to do this by non-parametric paradigm, just think of it: the sampled distribution is a completely legit one, there is nothing preventing a single-population distribution from having tw | Detect if there is actually two populations in a sample
There is no way to do this by non-parametric paradigm, just think of it: the sampled distribution is a completely legit one, there is nothing preventing a single-population distribution from having two separate high density zones.
But if you turn to parametric models, you may assume that your sub-populations are gaussian, and gaussian distribution has only one bell-shaped high density region. If you do so, you can run EM clustering to estimate the likelihood of a mixture model of two gaussian clusters, and compare it to the one-population scenario with a likelihood ratio test.
Looking to your data, this test will certainly show high significance. But there are problems:
EM clustering tends to inflate likelihood of multiple sub-populations hypothesis when the real distributions are not quite gaussian
even more importantly, performing a test on a hypothesis formulated after looking at the data gives auto-confirmation bias.
In brief, I recommend you to let it go, and just comment the observed distribution as "likely coming from distinct sub-populations", or something around this line. Any test about it would be biased and unreliable. | Detect if there is actually two populations in a sample
There is no way to do this by non-parametric paradigm, just think of it: the sampled distribution is a completely legit one, there is nothing preventing a single-population distribution from having tw |
29,871 | Detect if there is actually two populations in a sample | In statistical terms, you are wondering whether your data comes from a mixture of two (or more) populations, as against coming from a single population. Looking at the mixture or more specifically the gaussian-mixture tags will be helpful. Number of components for Gaussian mixture model? includes a very good approach for deciding between one or two components based on comparing likelihoods. | Detect if there is actually two populations in a sample | In statistical terms, you are wondering whether your data comes from a mixture of two (or more) populations, as against coming from a single population. Looking at the mixture or more specifically the | Detect if there is actually two populations in a sample
In statistical terms, you are wondering whether your data comes from a mixture of two (or more) populations, as against coming from a single population. Looking at the mixture or more specifically the gaussian-mixture tags will be helpful. Number of components for Gaussian mixture model? includes a very good approach for deciding between one or two components based on comparing likelihoods. | Detect if there is actually two populations in a sample
In statistical terms, you are wondering whether your data comes from a mixture of two (or more) populations, as against coming from a single population. Looking at the mixture or more specifically the |
29,872 | Detect if there is actually two populations in a sample | Other answers have discussed clustering, which is appropriate here. Let me briefly discuss the Wilcoxon-Mann-Whitney test. Basically, the MW test assesses if values in one group tend to be higher than the other (see my answers here or here). That is, if you picked a number from one group and a number from the other group, would the first typically be larger? If you split your data into higher than some cutpoint and lower than the cutpoint, the answer will always be yes by design. The question of whether the MW will be significant is a question of power. If you have at least 4 data in each group, then a MW run over the data will always be significant. In short, the procedure you have in mind will 'work' in the sense of giving you a significant result, but it won't be telling you what you want to know. For an example of Gaussian mixture modeling, tested with the parametric bootstrap cross-fitting method, see my answer here: How to test if my distribution is multimodal? | Detect if there is actually two populations in a sample | Other answers have discussed clustering, which is appropriate here. Let me briefly discuss the Wilcoxon-Mann-Whitney test. Basically, the MW test assesses if values in one group tend to be higher th | Detect if there is actually two populations in a sample
Other answers have discussed clustering, which is appropriate here. Let me briefly discuss the Wilcoxon-Mann-Whitney test. Basically, the MW test assesses if values in one group tend to be higher than the other (see my answers here or here). That is, if you picked a number from one group and a number from the other group, would the first typically be larger? If you split your data into higher than some cutpoint and lower than the cutpoint, the answer will always be yes by design. The question of whether the MW will be significant is a question of power. If you have at least 4 data in each group, then a MW run over the data will always be significant. In short, the procedure you have in mind will 'work' in the sense of giving you a significant result, but it won't be telling you what you want to know. For an example of Gaussian mixture modeling, tested with the parametric bootstrap cross-fitting method, see my answer here: How to test if my distribution is multimodal? | Detect if there is actually two populations in a sample
Other answers have discussed clustering, which is appropriate here. Let me briefly discuss the Wilcoxon-Mann-Whitney test. Basically, the MW test assesses if values in one group tend to be higher th |
29,873 | Proof that variance is always greater than or equal to zero | Go to your definition of variance:
$$
\operatorname{Var}(X) = \int(x-\mu)^2f(x)\,dx
$$
The $(x-\mu)^2$ component is non-negative, and the $f(x)$ component is non-negative, so the integrand, $(x-\mu)^2f(x)$ is non-negative.
When you integrate an integrand that is always at the x-axis or above, the area under that curve will be non-negative.
This might be a bit easier to see if the variance is written as a sum (for a discrete variable):
$$
\operatorname{Var}(X) = \sum_i p(x_i)(x_i -\mu)^2
$$
As before, $p(x_i)\ge 0$ for all $x_i$, and $(x_i - \mu)^2\ge 0$ for all $x_i$, so that is a sum of non-negative values. | Proof that variance is always greater than or equal to zero | Go to your definition of variance:
$$
\operatorname{Var}(X) = \int(x-\mu)^2f(x)\,dx
$$
The $(x-\mu)^2$ component is non-negative, and the $f(x)$ component is non-negative, so the integrand, $(x-\mu)^2 | Proof that variance is always greater than or equal to zero
Go to your definition of variance:
$$
\operatorname{Var}(X) = \int(x-\mu)^2f(x)\,dx
$$
The $(x-\mu)^2$ component is non-negative, and the $f(x)$ component is non-negative, so the integrand, $(x-\mu)^2f(x)$ is non-negative.
When you integrate an integrand that is always at the x-axis or above, the area under that curve will be non-negative.
This might be a bit easier to see if the variance is written as a sum (for a discrete variable):
$$
\operatorname{Var}(X) = \sum_i p(x_i)(x_i -\mu)^2
$$
As before, $p(x_i)\ge 0$ for all $x_i$, and $(x_i - \mu)^2\ge 0$ for all $x_i$, so that is a sum of non-negative values. | Proof that variance is always greater than or equal to zero
Go to your definition of variance:
$$
\operatorname{Var}(X) = \int(x-\mu)^2f(x)\,dx
$$
The $(x-\mu)^2$ component is non-negative, and the $f(x)$ component is non-negative, so the integrand, $(x-\mu)^2 |
29,874 | Proof that variance is always greater than or equal to zero | As for your question regarding complex numbers, the variance is defined as being the expectation of the absolute value, or modulus, squared of the deviation from the mean. If the absolute value is not taken, that is referred to as the "pseudo variance".
See https://en.wikipedia.org/wiki/Complex_random_variable#Variance_and_pseudo-variance | Proof that variance is always greater than or equal to zero | As for your question regarding complex numbers, the variance is defined as being the expectation of the absolute value, or modulus, squared of the deviation from the mean. If the absolute value is not | Proof that variance is always greater than or equal to zero
As for your question regarding complex numbers, the variance is defined as being the expectation of the absolute value, or modulus, squared of the deviation from the mean. If the absolute value is not taken, that is referred to as the "pseudo variance".
See https://en.wikipedia.org/wiki/Complex_random_variable#Variance_and_pseudo-variance | Proof that variance is always greater than or equal to zero
As for your question regarding complex numbers, the variance is defined as being the expectation of the absolute value, or modulus, squared of the deviation from the mean. If the absolute value is not |
29,875 | How can percents not adding up to a hundred be possible? | This kind of results can be due to questionnaire items that allow multiple choices (aka, "Check all that apply.")
Each option then essentially becomes a binary variable, where 1 can represents yes and 0 represents no. Their means will become those statistics you saw in the abstract.
Essentially, out of 257 responses, 69% of 257 of them kept tilapia; 43% of 257 kept ornamental fish, so on so forth. It's possible to see more than one type of animals within a single facility. | How can percents not adding up to a hundred be possible? | This kind of results can be due to questionnaire items that allow multiple choices (aka, "Check all that apply.")
Each option then essentially becomes a binary variable, where 1 can represents yes and | How can percents not adding up to a hundred be possible?
This kind of results can be due to questionnaire items that allow multiple choices (aka, "Check all that apply.")
Each option then essentially becomes a binary variable, where 1 can represents yes and 0 represents no. Their means will become those statistics you saw in the abstract.
Essentially, out of 257 responses, 69% of 257 of them kept tilapia; 43% of 257 kept ornamental fish, so on so forth. It's possible to see more than one type of animals within a single facility. | How can percents not adding up to a hundred be possible?
This kind of results can be due to questionnaire items that allow multiple choices (aka, "Check all that apply.")
Each option then essentially becomes a binary variable, where 1 can represents yes and |
29,876 | Whither bootstrapping - can someone provide a simple explanation to get me started? | The Wikipedia entry on Bootstrapping is actually very good:
http://en.wikipedia.org/wiki/Bootstrapping_%28statistics%29
The most common reason bootstrapping is applied is when the form of the underlying distribution from which a sample is taken is unknown. Traditionally statisticians assume a normal distribution (for very good reasons related to the central limit theorem), but statistics (such as the standard deviation, confidence intervals, power calculations etc) estimated via normal distribution theory are only strictly valid if the underlying population distribution is normal.
By repeatedly re-sampling the sample itself, bootstrapping enables estimates that are distribution independent. Traditionally each "resample" of the original sample randomly selects the same number of observations as in the original sample. However these are selected with replacement. If the sample has N observations, each bootstrap resample will have N observations, with many of the original sample repeated and many excluded.
The parameter of interest (eg. odds ratio etc) can then be estimated from each bootstrapped sample. Repeating the bootstrap say 1000 times allows an estimate of the "median" and 95% confidence interval on the statistic (eg odds ratio) by selecting the 2.5th, 50th and 97.5th percentile. | Whither bootstrapping - can someone provide a simple explanation to get me started? | The Wikipedia entry on Bootstrapping is actually very good:
http://en.wikipedia.org/wiki/Bootstrapping_%28statistics%29
The most common reason bootstrapping is applied is when the form of the underlyi | Whither bootstrapping - can someone provide a simple explanation to get me started?
The Wikipedia entry on Bootstrapping is actually very good:
http://en.wikipedia.org/wiki/Bootstrapping_%28statistics%29
The most common reason bootstrapping is applied is when the form of the underlying distribution from which a sample is taken is unknown. Traditionally statisticians assume a normal distribution (for very good reasons related to the central limit theorem), but statistics (such as the standard deviation, confidence intervals, power calculations etc) estimated via normal distribution theory are only strictly valid if the underlying population distribution is normal.
By repeatedly re-sampling the sample itself, bootstrapping enables estimates that are distribution independent. Traditionally each "resample" of the original sample randomly selects the same number of observations as in the original sample. However these are selected with replacement. If the sample has N observations, each bootstrap resample will have N observations, with many of the original sample repeated and many excluded.
The parameter of interest (eg. odds ratio etc) can then be estimated from each bootstrapped sample. Repeating the bootstrap say 1000 times allows an estimate of the "median" and 95% confidence interval on the statistic (eg odds ratio) by selecting the 2.5th, 50th and 97.5th percentile. | Whither bootstrapping - can someone provide a simple explanation to get me started?
The Wikipedia entry on Bootstrapping is actually very good:
http://en.wikipedia.org/wiki/Bootstrapping_%28statistics%29
The most common reason bootstrapping is applied is when the form of the underlyi |
29,877 | Whither bootstrapping - can someone provide a simple explanation to get me started? | The American Scientist recently had a nice article by Cosma Shalizi on the bootstrap which is fairly easy reading and gives you the essentials to grasp the concept. | Whither bootstrapping - can someone provide a simple explanation to get me started? | The American Scientist recently had a nice article by Cosma Shalizi on the bootstrap which is fairly easy reading and gives you the essentials to grasp the concept. | Whither bootstrapping - can someone provide a simple explanation to get me started?
The American Scientist recently had a nice article by Cosma Shalizi on the bootstrap which is fairly easy reading and gives you the essentials to grasp the concept. | Whither bootstrapping - can someone provide a simple explanation to get me started?
The American Scientist recently had a nice article by Cosma Shalizi on the bootstrap which is fairly easy reading and gives you the essentials to grasp the concept. |
29,878 | Whither bootstrapping - can someone provide a simple explanation to get me started? | Very broadly: the intuition, as well as the origin of the name ("pulling oneself up by the bootstraps"), derive from the observation that in using properties of a sample to draw inferences about a population (the "inverse" problem of statistical inference), we expect to err. To find out the nature of that error, treat the sample itself as a population in its own right and study how your inferential procedure works when you draw samples from it. That's a "forward" problem: you know all about your sample-qua-population and don't have to guess anything about it. Your study will suggest (a) the extent to which your inferential procedure may be biased and (b) the size and nature of the statistical error of your procedure. So, use this information to adjust your original estimates. In many (but definitely not all) situations, the adjusted bias is asymptotically much lower.
One insight provided by this schematic description is that bootstrapping does not require simulation or repeated subsampling: those just happen to be omnibus, computationally tractable ways to study any kind of statistical procedure when the population is known. There exist plenty of bootstrap estimates that can be computed mathematically.
This answer owes much to Peter Hall's book "The Bootstrap and Edgeworth Expansion" (Springer 1992), especially his description of the "Main Principle" of bootstrapping. | Whither bootstrapping - can someone provide a simple explanation to get me started? | Very broadly: the intuition, as well as the origin of the name ("pulling oneself up by the bootstraps"), derive from the observation that in using properties of a sample to draw inferences about a pop | Whither bootstrapping - can someone provide a simple explanation to get me started?
Very broadly: the intuition, as well as the origin of the name ("pulling oneself up by the bootstraps"), derive from the observation that in using properties of a sample to draw inferences about a population (the "inverse" problem of statistical inference), we expect to err. To find out the nature of that error, treat the sample itself as a population in its own right and study how your inferential procedure works when you draw samples from it. That's a "forward" problem: you know all about your sample-qua-population and don't have to guess anything about it. Your study will suggest (a) the extent to which your inferential procedure may be biased and (b) the size and nature of the statistical error of your procedure. So, use this information to adjust your original estimates. In many (but definitely not all) situations, the adjusted bias is asymptotically much lower.
One insight provided by this schematic description is that bootstrapping does not require simulation or repeated subsampling: those just happen to be omnibus, computationally tractable ways to study any kind of statistical procedure when the population is known. There exist plenty of bootstrap estimates that can be computed mathematically.
This answer owes much to Peter Hall's book "The Bootstrap and Edgeworth Expansion" (Springer 1992), especially his description of the "Main Principle" of bootstrapping. | Whither bootstrapping - can someone provide a simple explanation to get me started?
Very broadly: the intuition, as well as the origin of the name ("pulling oneself up by the bootstraps"), derive from the observation that in using properties of a sample to draw inferences about a pop |
29,879 | Whither bootstrapping - can someone provide a simple explanation to get me started? | The wiki on bootstrapping gives the following description:
Bootstrapping allows one to gather many alternative versions of the single statistic that would ordinarily be calculated from one sample. For example, assume we are interested in the height of people worldwide. As we cannot measure all the population, we sample only a small part of it. From that sample only one value of a statistic can be obtained, i.e one mean, or one standard deviation etc., and hence we don't see how much that statistic varies. When using bootstrapping, we randomly extract a new sample of n heights out of the N sampled data, where each person can be selected at most t times. By doing this several times, we create a large number of datasets that we might have seen and compute the statistic for each of these datasets. Thus we get an estimate of the distribution of the statistic. The key to the strategy is to create alternative versions of data that "we might have seen".
I will provide more detail if you can clarify what part of the above description you do not understand. | Whither bootstrapping - can someone provide a simple explanation to get me started? | The wiki on bootstrapping gives the following description:
Bootstrapping allows one to gather many alternative versions of the single statistic that would ordinarily be calculated from one sample. Fo | Whither bootstrapping - can someone provide a simple explanation to get me started?
The wiki on bootstrapping gives the following description:
Bootstrapping allows one to gather many alternative versions of the single statistic that would ordinarily be calculated from one sample. For example, assume we are interested in the height of people worldwide. As we cannot measure all the population, we sample only a small part of it. From that sample only one value of a statistic can be obtained, i.e one mean, or one standard deviation etc., and hence we don't see how much that statistic varies. When using bootstrapping, we randomly extract a new sample of n heights out of the N sampled data, where each person can be selected at most t times. By doing this several times, we create a large number of datasets that we might have seen and compute the statistic for each of these datasets. Thus we get an estimate of the distribution of the statistic. The key to the strategy is to create alternative versions of data that "we might have seen".
I will provide more detail if you can clarify what part of the above description you do not understand. | Whither bootstrapping - can someone provide a simple explanation to get me started?
The wiki on bootstrapping gives the following description:
Bootstrapping allows one to gather many alternative versions of the single statistic that would ordinarily be calculated from one sample. Fo |
29,880 | Whither bootstrapping - can someone provide a simple explanation to get me started? | I like to think of it as follows: If you obtain a random sample data set from a population, then presumably that sample will have characteristics that roughly match that of the source population. So, if you're interested in obtaining confidence intervals on on a particular feature of the distribution, its skewness for example, you can treat the sample as a pseudo-population from which you can obtain many sets of random pseudo-samples, computing the value of the feature of interest in each. The assumption that the original sample roughly matches the population also means that you can obtain the pseudo-samples by sampling from the pseudo-population "with replacement" (eg. you sample a value, record it, then put it back; thus each value has a chance of being observed multiple times.). Sampling with replacement means that the computed value of the feature of interest will vary from pseudo-sample to pseudo-sample, yielding a distribution of values from which you can compute, say, the 2.5th and 97.5th percentiles to obtain the 95% confidence interval for the value of the feature of interest. | Whither bootstrapping - can someone provide a simple explanation to get me started? | I like to think of it as follows: If you obtain a random sample data set from a population, then presumably that sample will have characteristics that roughly match that of the source population. So, | Whither bootstrapping - can someone provide a simple explanation to get me started?
I like to think of it as follows: If you obtain a random sample data set from a population, then presumably that sample will have characteristics that roughly match that of the source population. So, if you're interested in obtaining confidence intervals on on a particular feature of the distribution, its skewness for example, you can treat the sample as a pseudo-population from which you can obtain many sets of random pseudo-samples, computing the value of the feature of interest in each. The assumption that the original sample roughly matches the population also means that you can obtain the pseudo-samples by sampling from the pseudo-population "with replacement" (eg. you sample a value, record it, then put it back; thus each value has a chance of being observed multiple times.). Sampling with replacement means that the computed value of the feature of interest will vary from pseudo-sample to pseudo-sample, yielding a distribution of values from which you can compute, say, the 2.5th and 97.5th percentiles to obtain the 95% confidence interval for the value of the feature of interest. | Whither bootstrapping - can someone provide a simple explanation to get me started?
I like to think of it as follows: If you obtain a random sample data set from a population, then presumably that sample will have characteristics that roughly match that of the source population. So, |
29,881 | Whither bootstrapping - can someone provide a simple explanation to get me started? | Bootstrap is essentially a simulation of repeating experiment; let's say you have a box with balls an want to obtain an average size of a ball -- so you draw some of them, measure and take a mean. Now you want to repeat it to get the distribution, for instance to get a standard deviation -- but you found out that someone stole the box.
What can be done now is to use what you have -- this one series of measurements. The idea is to put the balls to the new box and simulate the original experiment by drawing the same number of balls with replacement -- both to have same sample size and some variability. Now this can be replicated many times to get a series of means which can be finally used to approximate the mean distribution. | Whither bootstrapping - can someone provide a simple explanation to get me started? | Bootstrap is essentially a simulation of repeating experiment; let's say you have a box with balls an want to obtain an average size of a ball -- so you draw some of them, measure and take a mean. Now | Whither bootstrapping - can someone provide a simple explanation to get me started?
Bootstrap is essentially a simulation of repeating experiment; let's say you have a box with balls an want to obtain an average size of a ball -- so you draw some of them, measure and take a mean. Now you want to repeat it to get the distribution, for instance to get a standard deviation -- but you found out that someone stole the box.
What can be done now is to use what you have -- this one series of measurements. The idea is to put the balls to the new box and simulate the original experiment by drawing the same number of balls with replacement -- both to have same sample size and some variability. Now this can be replicated many times to get a series of means which can be finally used to approximate the mean distribution. | Whither bootstrapping - can someone provide a simple explanation to get me started?
Bootstrap is essentially a simulation of repeating experiment; let's say you have a box with balls an want to obtain an average size of a ball -- so you draw some of them, measure and take a mean. Now |
29,882 | Whither bootstrapping - can someone provide a simple explanation to get me started? | This is the essence of bootstrapping:
taking different samples of your data,
getting a statistic for each sample
(e.g., the mean, median, correlation,
regression coefficient, etc.), and
using the variability in the statistic
across samples to indicate something
about the standard error and
confidence intervals for the
statistic.
- Bootstrapping and the boot package in R | Whither bootstrapping - can someone provide a simple explanation to get me started? | This is the essence of bootstrapping:
taking different samples of your data,
getting a statistic for each sample
(e.g., the mean, median, correlation,
regression coefficient, etc.), and
usin | Whither bootstrapping - can someone provide a simple explanation to get me started?
This is the essence of bootstrapping:
taking different samples of your data,
getting a statistic for each sample
(e.g., the mean, median, correlation,
regression coefficient, etc.), and
using the variability in the statistic
across samples to indicate something
about the standard error and
confidence intervals for the
statistic.
- Bootstrapping and the boot package in R | Whither bootstrapping - can someone provide a simple explanation to get me started?
This is the essence of bootstrapping:
taking different samples of your data,
getting a statistic for each sample
(e.g., the mean, median, correlation,
regression coefficient, etc.), and
usin |
29,883 | Graduate Degree Choices for Data Science? | EDIT:
Just try to add some more words.
As a PhD student in Biostatistics, I feel great with what @Frank-Harrell said. And that's quite correct!!! Students from our department have great job placements after graduation.
On the other hand, @StasK cited the article "Aren’t We Data Science?", but titled it as "statisticians are not recognized as data scientists". This is somewhat misleading to me. Statisticians might not be titled as data scientists. But who else can formally claim that? Anyway, what the article states, at least to me, is that statistics has the great potential to contribute to data science. The main issue, if there are, that impede Statistics to promote data science is that people from Statistics are not well trained for large-scale computation and efficient programming. Cited from that article is following.
And to statistics. Statistics has enormous potential to contribute to
data science. There are open research problems requiring that
classical statistical methods in sampling, design, and causal
inference be “scaled up” to be feasible with massive data sets. Few of
the computer scientists and others who dominate the data science
landscape are well-versed in these concepts, and many take an
“algorithmic” view of data analysis. Data science needs statistical
thinking and new foundational frameworks—for example, what is the
“population” when one confronts the Big Data generated by Google?
In fact, many businesses are beginning to collect data prospectively
for internal testing and validation, and there is little appreciation
for the power of design principles. Statisticians could propel major
advances through development of “experimental design for the 21st
century”!
One can arguably say that Computer Sciences are at better position but just lacks the statistics thinking. But to me, I regard the two main component as the "brain" and "hands"! If the experiment design is flawed in the very beginning, or if the inference is
biased at the very end, we will end up with a totally different story about the conclusion and business strategy.
To put it simple for all I wish to convey here, data science practitioners really need both great statistical thinking and programming.
END EDIT:
To decide which degree you are going to pursue, you have to get to know what skill sets that qualify you to work in data science area. Based on what I've known, if you wish to enter the data science field, what "hard" skills you would wish to be equipped are basically twofolds: the strong analytical ability, and good computation and programming skills. You can go to Quora and search like "data science", "data scientist", etc, to get some feelings about what the
field looks like, and what you need to prepare for that area. Here are two questions from Quora you might wish to go through:
What is data science?
How do I become a data scientist?
Some questions like that, you get my point.
(The soft skills, like oral and written communications skills and team-work ability are also very important. And in some circumstances, even more important than your analytical skills to some extend. But certainly the discussion on soft skills is certainly off topic for the sake of your questions.)
Now back to your questions.
What are the graduate degree choices that would get me to where I want to go?
Once you have clear vision and deep thinking about what you need to learn, you should be able to answer this by yourself. My suggestion would be Computer Sciences, Applied mathematics or statistics, Biostatistics, Physics, Engineering, or any other degrees that heavily involve analytics and computation. Essentially, an interdisciplinary degree that help you train both data analysis and programming will definitely win you a great position for working in data science area.
Is there a consensus as to whether a graduate degree in applied mathematics or statistics would put me in a better position to enter the field of data science?
I am not aware of whether there is such consensus formally acknowledged by academic researchers or industrial practitioners, but I can give you some news/reports from websites which show how Statistics will have a great role to play as the "Era of Big Data" evolves. I believe these articles will at least give you confidence that statistics should be a good choice.
For Today’s Graduate, Just One Word: Statistics
How Statistical Science Can Advance Big Data Research Projects?
Discovery with Data: Leveraging Statistics with Computer Science to Transform Science and Society
We Are Data Science
[The Era of Big Data] Must-read articles about Big Data
The last one is from my blog, in which I collected some important articles from media and famous webs, like NYTimes, Forbes, McKinsey, Harvard Business Review, etc. You can find some that outline the future of data science field, and the skills one needs for that field. For example, here is the Quote from NYTimes, the words from Hal Varian.
“I keep saying that the sexy job in the next 10 years will be statisticians,” said Hal Varian, chief economist at Google. “And I’m not kidding.”
What most of the articles elaborate is that as a discipline that studies data -"the science of data", the Statistics field is booming at this historical point. So if there is a consensus, these articles would be the signs of it.
Last, as it might appear to you that I am convincing you to obtain a graduate degree in Statistics or Biostatistics, I don't have that intention, though they are great choices as I indicated previously. Any degrees that fit your interests (like machine learning in Computer Sciences) are good to consider, as long as you know you're preparing your analytical and computation skills. You can even learn those skills by yourself through Open courses on Coursera. | Graduate Degree Choices for Data Science? | EDIT:
Just try to add some more words.
As a PhD student in Biostatistics, I feel great with what @Frank-Harrell said. And that's quite correct!!! Students from our department have great job placements | Graduate Degree Choices for Data Science?
EDIT:
Just try to add some more words.
As a PhD student in Biostatistics, I feel great with what @Frank-Harrell said. And that's quite correct!!! Students from our department have great job placements after graduation.
On the other hand, @StasK cited the article "Aren’t We Data Science?", but titled it as "statisticians are not recognized as data scientists". This is somewhat misleading to me. Statisticians might not be titled as data scientists. But who else can formally claim that? Anyway, what the article states, at least to me, is that statistics has the great potential to contribute to data science. The main issue, if there are, that impede Statistics to promote data science is that people from Statistics are not well trained for large-scale computation and efficient programming. Cited from that article is following.
And to statistics. Statistics has enormous potential to contribute to
data science. There are open research problems requiring that
classical statistical methods in sampling, design, and causal
inference be “scaled up” to be feasible with massive data sets. Few of
the computer scientists and others who dominate the data science
landscape are well-versed in these concepts, and many take an
“algorithmic” view of data analysis. Data science needs statistical
thinking and new foundational frameworks—for example, what is the
“population” when one confronts the Big Data generated by Google?
In fact, many businesses are beginning to collect data prospectively
for internal testing and validation, and there is little appreciation
for the power of design principles. Statisticians could propel major
advances through development of “experimental design for the 21st
century”!
One can arguably say that Computer Sciences are at better position but just lacks the statistics thinking. But to me, I regard the two main component as the "brain" and "hands"! If the experiment design is flawed in the very beginning, or if the inference is
biased at the very end, we will end up with a totally different story about the conclusion and business strategy.
To put it simple for all I wish to convey here, data science practitioners really need both great statistical thinking and programming.
END EDIT:
To decide which degree you are going to pursue, you have to get to know what skill sets that qualify you to work in data science area. Based on what I've known, if you wish to enter the data science field, what "hard" skills you would wish to be equipped are basically twofolds: the strong analytical ability, and good computation and programming skills. You can go to Quora and search like "data science", "data scientist", etc, to get some feelings about what the
field looks like, and what you need to prepare for that area. Here are two questions from Quora you might wish to go through:
What is data science?
How do I become a data scientist?
Some questions like that, you get my point.
(The soft skills, like oral and written communications skills and team-work ability are also very important. And in some circumstances, even more important than your analytical skills to some extend. But certainly the discussion on soft skills is certainly off topic for the sake of your questions.)
Now back to your questions.
What are the graduate degree choices that would get me to where I want to go?
Once you have clear vision and deep thinking about what you need to learn, you should be able to answer this by yourself. My suggestion would be Computer Sciences, Applied mathematics or statistics, Biostatistics, Physics, Engineering, or any other degrees that heavily involve analytics and computation. Essentially, an interdisciplinary degree that help you train both data analysis and programming will definitely win you a great position for working in data science area.
Is there a consensus as to whether a graduate degree in applied mathematics or statistics would put me in a better position to enter the field of data science?
I am not aware of whether there is such consensus formally acknowledged by academic researchers or industrial practitioners, but I can give you some news/reports from websites which show how Statistics will have a great role to play as the "Era of Big Data" evolves. I believe these articles will at least give you confidence that statistics should be a good choice.
For Today’s Graduate, Just One Word: Statistics
How Statistical Science Can Advance Big Data Research Projects?
Discovery with Data: Leveraging Statistics with Computer Science to Transform Science and Society
We Are Data Science
[The Era of Big Data] Must-read articles about Big Data
The last one is from my blog, in which I collected some important articles from media and famous webs, like NYTimes, Forbes, McKinsey, Harvard Business Review, etc. You can find some that outline the future of data science field, and the skills one needs for that field. For example, here is the Quote from NYTimes, the words from Hal Varian.
“I keep saying that the sexy job in the next 10 years will be statisticians,” said Hal Varian, chief economist at Google. “And I’m not kidding.”
What most of the articles elaborate is that as a discipline that studies data -"the science of data", the Statistics field is booming at this historical point. So if there is a consensus, these articles would be the signs of it.
Last, as it might appear to you that I am convincing you to obtain a graduate degree in Statistics or Biostatistics, I don't have that intention, though they are great choices as I indicated previously. Any degrees that fit your interests (like machine learning in Computer Sciences) are good to consider, as long as you know you're preparing your analytical and computation skills. You can even learn those skills by yourself through Open courses on Coursera. | Graduate Degree Choices for Data Science?
EDIT:
Just try to add some more words.
As a PhD student in Biostatistics, I feel great with what @Frank-Harrell said. And that's quite correct!!! Students from our department have great job placements |
29,884 | Graduate Degree Choices for Data Science? | The chilling reality is, statisticians are not recognized as data scientists. So while getting a degree in statistics will definitely equip you well for data science, you may not get as many opportunities as you'd think the name of the major would imply.
I don't have the canned answers for you (and nobody does... except Hal Varian, and you may want to talk to him directly -- if you can't Google his contact info, you should not be considering a career in data science :) ). My two cents for you to consider would be:
A program in computer science, with a minor in statistics. A computing degree per se will not equip you well in data science, in my opinion, as what statisticians see in the "data-science-without-statistics" is that data scientists end up reinventing statistics. Hence you will be better off learning it properly to begin with.
A Professional Science Master program in analytics (Rutgers, NC State -- not that I endorse these, just give you examples). The Professional Science Master's programs combine about 60% of the credit hours from science curriculum with about 40% from the business curriculum. I wish I had an option of taking this degree when I was in grad school. Of course this assumes that you can afford it -- you can go to most Ph.D. programs and get full financial support, but you will have to pay for a Master's degree yourself.
Browse Academia.SE for more pointers as to how you can structure your post-graduate training, and what kind of degree you might or might not want. Interestingly, Data Science.SE is currently (Nov 2014) in a beta status, and it is hardly a happy healthy beta. | Graduate Degree Choices for Data Science? | The chilling reality is, statisticians are not recognized as data scientists. So while getting a degree in statistics will definitely equip you well for data science, you may not get as many opportuni | Graduate Degree Choices for Data Science?
The chilling reality is, statisticians are not recognized as data scientists. So while getting a degree in statistics will definitely equip you well for data science, you may not get as many opportunities as you'd think the name of the major would imply.
I don't have the canned answers for you (and nobody does... except Hal Varian, and you may want to talk to him directly -- if you can't Google his contact info, you should not be considering a career in data science :) ). My two cents for you to consider would be:
A program in computer science, with a minor in statistics. A computing degree per se will not equip you well in data science, in my opinion, as what statisticians see in the "data-science-without-statistics" is that data scientists end up reinventing statistics. Hence you will be better off learning it properly to begin with.
A Professional Science Master program in analytics (Rutgers, NC State -- not that I endorse these, just give you examples). The Professional Science Master's programs combine about 60% of the credit hours from science curriculum with about 40% from the business curriculum. I wish I had an option of taking this degree when I was in grad school. Of course this assumes that you can afford it -- you can go to most Ph.D. programs and get full financial support, but you will have to pay for a Master's degree yourself.
Browse Academia.SE for more pointers as to how you can structure your post-graduate training, and what kind of degree you might or might not want. Interestingly, Data Science.SE is currently (Nov 2014) in a beta status, and it is hardly a happy healthy beta. | Graduate Degree Choices for Data Science?
The chilling reality is, statisticians are not recognized as data scientists. So while getting a degree in statistics will definitely equip you well for data science, you may not get as many opportuni |
29,885 | Graduate Degree Choices for Data Science? | If you get an MS in applied statistics (followed perhaps by PhD) and get a very strong computing background you won't go wrong. An MS or PhD in Biostatistics leads to a great job pipeline, and if you end up not liking biomedical or pharmaceutical research you would still qualify for a non-medical applied statistics-related field. | Graduate Degree Choices for Data Science? | If you get an MS in applied statistics (followed perhaps by PhD) and get a very strong computing background you won't go wrong. An MS or PhD in Biostatistics leads to a great job pipeline, and if you | Graduate Degree Choices for Data Science?
If you get an MS in applied statistics (followed perhaps by PhD) and get a very strong computing background you won't go wrong. An MS or PhD in Biostatistics leads to a great job pipeline, and if you end up not liking biomedical or pharmaceutical research you would still qualify for a non-medical applied statistics-related field. | Graduate Degree Choices for Data Science?
If you get an MS in applied statistics (followed perhaps by PhD) and get a very strong computing background you won't go wrong. An MS or PhD in Biostatistics leads to a great job pipeline, and if you |
29,886 | Graduate Degree Choices for Data Science? | If you already have a BS in mathematics and you want to analyze data in the field, then an MS in statistics will do much more than a second math degree. Only statistics, biostat, and OR (not so sure) teach the underlying statistical assumptions for statistics problems. Statistics already teaches more math than you need for analyzing data, e.g., measure theory and large sample theory.
Also, Statistical Machine Learning is firmly in the statistics field. These are the tools in ML that we use to analyze data. The other tools are for managing data. | Graduate Degree Choices for Data Science? | If you already have a BS in mathematics and you want to analyze data in the field, then an MS in statistics will do much more than a second math degree. Only statistics, biostat, and OR (not so sure) | Graduate Degree Choices for Data Science?
If you already have a BS in mathematics and you want to analyze data in the field, then an MS in statistics will do much more than a second math degree. Only statistics, biostat, and OR (not so sure) teach the underlying statistical assumptions for statistics problems. Statistics already teaches more math than you need for analyzing data, e.g., measure theory and large sample theory.
Also, Statistical Machine Learning is firmly in the statistics field. These are the tools in ML that we use to analyze data. The other tools are for managing data. | Graduate Degree Choices for Data Science?
If you already have a BS in mathematics and you want to analyze data in the field, then an MS in statistics will do much more than a second math degree. Only statistics, biostat, and OR (not so sure) |
29,887 | p-values of Mann-Whitney U test identical for raw and log-transformed data | The Mann-Whitney U test is a rank test. This means it results depend only of the ranks of your data. The Wikipedia Article describes it quite well, but basically it looks whether the ranks of one sample tend to be higher than in the other one.
Since the logarithm is a strictly monotone function it does not change the ranks of your data. | p-values of Mann-Whitney U test identical for raw and log-transformed data | The Mann-Whitney U test is a rank test. This means it results depend only of the ranks of your data. The Wikipedia Article describes it quite well, but basically it looks whether the ranks of one sam | p-values of Mann-Whitney U test identical for raw and log-transformed data
The Mann-Whitney U test is a rank test. This means it results depend only of the ranks of your data. The Wikipedia Article describes it quite well, but basically it looks whether the ranks of one sample tend to be higher than in the other one.
Since the logarithm is a strictly monotone function it does not change the ranks of your data. | p-values of Mann-Whitney U test identical for raw and log-transformed data
The Mann-Whitney U test is a rank test. This means it results depend only of the ranks of your data. The Wikipedia Article describes it quite well, but basically it looks whether the ranks of one sam |
29,888 | p-values of Mann-Whitney U test identical for raw and log-transformed data | The Mann-Whitney is a test based on the ranks (/relative orderings) of the data points -- the value of the test statistic only depends on the order (the ranks) of the observations, not on their individual values.
Taking logs (of positive values), or indeed, any other monotonic transformation of the values (like taking $-1/x$ with positive data values, or cubing a set of values) will not change the order (and hence the ranks assigned to observations), only their relative spacing, so the statistic won't be affected. (Even a monotonic decreasing transformation won't change the p-value of the two-tailed test.) | p-values of Mann-Whitney U test identical for raw and log-transformed data | The Mann-Whitney is a test based on the ranks (/relative orderings) of the data points -- the value of the test statistic only depends on the order (the ranks) of the observations, not on their indivi | p-values of Mann-Whitney U test identical for raw and log-transformed data
The Mann-Whitney is a test based on the ranks (/relative orderings) of the data points -- the value of the test statistic only depends on the order (the ranks) of the observations, not on their individual values.
Taking logs (of positive values), or indeed, any other monotonic transformation of the values (like taking $-1/x$ with positive data values, or cubing a set of values) will not change the order (and hence the ranks assigned to observations), only their relative spacing, so the statistic won't be affected. (Even a monotonic decreasing transformation won't change the p-value of the two-tailed test.) | p-values of Mann-Whitney U test identical for raw and log-transformed data
The Mann-Whitney is a test based on the ranks (/relative orderings) of the data points -- the value of the test statistic only depends on the order (the ranks) of the observations, not on their indivi |
29,889 | Alpha adjustment for multiple testing | @John has a nice answer. I particularly like the discussion about fishing expeditions and how alpha-adjustment may not be necessary. I want to add one additional aspect to this discussion. With hypothesis testing, there are two different kinds of errors to worry about: type I and type II (also called alpha error and beta error). Both kinds are bad, and we want to avoid both of them. When people talk about alpha-adjustment, they are focusing only on the possibility of type I errors (that is, saying there is a difference when there isn't one). However, adjusting alpha to minimize type I errors necessarily decreases power. Thus, it necessarily increases the probability of type II errors (that is, saying there isn't a difference when in fact there is). In addition, it's worth noting that a-priori there is no reason to believe that type I errors are worse than type II errors (despite the fact that everyone seems to assume that this must be so). Rather, which is worse will vary from situation to situation and is a judgment that must be made by the researcher. In other words, deciding on a strategy for testing multiple comparisons (e.g., an alpha-adjustment strategy) one must consider the effect of the strategy on both type I and type II errors and balance these effects relative to: the severity of these errors, how much data you have, and the cost of gathering more.
On a different note, from your description it seems to me that your situation would best be analyzed by using a factorial ANOVA, with sex as factor 1, marital status as factor 2, language as factor 3, and age as factor 4. From the description (and I recognize that it is sparse) I don't see why a cell means approach (i.e., one-way ANOVA) is preferable. If you have no interest in interactions, the main effects from the factorial ANOVA are already orthogonal (at least if the $n$s are the same), and Bonferroni corrections are not relevant. Certainly it would still be possible to have more than 5% type I errors, but I'm a big believer in @John's fourth paragraph; when I'm testing theoretically suggested, a-priori, orthogonal contrasts, I don't use alpha-adjustments. | Alpha adjustment for multiple testing | @John has a nice answer. I particularly like the discussion about fishing expeditions and how alpha-adjustment may not be necessary. I want to add one additional aspect to this discussion. With hyp | Alpha adjustment for multiple testing
@John has a nice answer. I particularly like the discussion about fishing expeditions and how alpha-adjustment may not be necessary. I want to add one additional aspect to this discussion. With hypothesis testing, there are two different kinds of errors to worry about: type I and type II (also called alpha error and beta error). Both kinds are bad, and we want to avoid both of them. When people talk about alpha-adjustment, they are focusing only on the possibility of type I errors (that is, saying there is a difference when there isn't one). However, adjusting alpha to minimize type I errors necessarily decreases power. Thus, it necessarily increases the probability of type II errors (that is, saying there isn't a difference when in fact there is). In addition, it's worth noting that a-priori there is no reason to believe that type I errors are worse than type II errors (despite the fact that everyone seems to assume that this must be so). Rather, which is worse will vary from situation to situation and is a judgment that must be made by the researcher. In other words, deciding on a strategy for testing multiple comparisons (e.g., an alpha-adjustment strategy) one must consider the effect of the strategy on both type I and type II errors and balance these effects relative to: the severity of these errors, how much data you have, and the cost of gathering more.
On a different note, from your description it seems to me that your situation would best be analyzed by using a factorial ANOVA, with sex as factor 1, marital status as factor 2, language as factor 3, and age as factor 4. From the description (and I recognize that it is sparse) I don't see why a cell means approach (i.e., one-way ANOVA) is preferable. If you have no interest in interactions, the main effects from the factorial ANOVA are already orthogonal (at least if the $n$s are the same), and Bonferroni corrections are not relevant. Certainly it would still be possible to have more than 5% type I errors, but I'm a big believer in @John's fourth paragraph; when I'm testing theoretically suggested, a-priori, orthogonal contrasts, I don't use alpha-adjustments. | Alpha adjustment for multiple testing
@John has a nice answer. I particularly like the discussion about fishing expeditions and how alpha-adjustment may not be necessary. I want to add one additional aspect to this discussion. With hyp |
29,890 | Alpha adjustment for multiple testing | Your second number is the correct one. I'm not even sure how you calculate the first one. A pairwise comparison counts as 1. How are you dividing by 2?
Regardless, if you don't take 4 as the number of comparisons you're missing how the Bonferroni works. Each time you make a test there's a chance, at the level of alpha, that you make an error saying there's a real difference when there isn't one. By adjusting alpha down you make up for the fact that that chance is inflated across all of your tests, in your case 1-(1-alpha)^4, or 0.185. That's a better than 1/6 chance of seeing a significant effect by chance. For the Bonferroni adjusted alpha the chance across all 4 tests, using the formula above, is still approximately 0.05.
There are two further things to keep in mind.
Bonferroni is really an adjustment for a fishing expedition. If you have very good reasons to do these separate tests beforehand then don't worry about the correction so much. It's still true that statistically you can increase the odds of the error but that's also true across experiments you do and across years you're a researcher. I'm generally against them.
The other thing to keep in mind is that an alpha cutoff of 0.05 is generally a pretty liberal thing and is bound to have lots of Type I errors anyway. So, if you're asking here to see if you can pick a higher alpha so one of your tests squeaks through then start thinking about the real magnitude of your effect, your confidence intervals, the quality of the data you have, etc. Trying to eke out a significant difference of a test at 0.05 is almost invariably the wrong way to be thinking about things. | Alpha adjustment for multiple testing | Your second number is the correct one. I'm not even sure how you calculate the first one. A pairwise comparison counts as 1. How are you dividing by 2?
Regardless, if you don't take 4 as the number | Alpha adjustment for multiple testing
Your second number is the correct one. I'm not even sure how you calculate the first one. A pairwise comparison counts as 1. How are you dividing by 2?
Regardless, if you don't take 4 as the number of comparisons you're missing how the Bonferroni works. Each time you make a test there's a chance, at the level of alpha, that you make an error saying there's a real difference when there isn't one. By adjusting alpha down you make up for the fact that that chance is inflated across all of your tests, in your case 1-(1-alpha)^4, or 0.185. That's a better than 1/6 chance of seeing a significant effect by chance. For the Bonferroni adjusted alpha the chance across all 4 tests, using the formula above, is still approximately 0.05.
There are two further things to keep in mind.
Bonferroni is really an adjustment for a fishing expedition. If you have very good reasons to do these separate tests beforehand then don't worry about the correction so much. It's still true that statistically you can increase the odds of the error but that's also true across experiments you do and across years you're a researcher. I'm generally against them.
The other thing to keep in mind is that an alpha cutoff of 0.05 is generally a pretty liberal thing and is bound to have lots of Type I errors anyway. So, if you're asking here to see if you can pick a higher alpha so one of your tests squeaks through then start thinking about the real magnitude of your effect, your confidence intervals, the quality of the data you have, etc. Trying to eke out a significant difference of a test at 0.05 is almost invariably the wrong way to be thinking about things. | Alpha adjustment for multiple testing
Your second number is the correct one. I'm not even sure how you calculate the first one. A pairwise comparison counts as 1. How are you dividing by 2?
Regardless, if you don't take 4 as the number |
29,891 | Alpha adjustment for multiple testing | I also like @john 's answer, but I'd add that, rather than significance, you should be more concerned with effect size, especially if you are not doing a fishing expedition. You should also be concerned about other things. Robert Abelson, in his marvelous book: Statistics as Principled Argument says that we should evaluate statistical findings based on the "MAGIC" criteria:
Magnitude - how big is the effect?
Articulation - Does it need a lot of qualifications and exceptions?
Generality - Does it apply to a large area (e.g. lots of types of people, or whatever)
Interestingness - interesting effects are better!
and
Credibility - Can people believe it?
I review the book | Alpha adjustment for multiple testing | I also like @john 's answer, but I'd add that, rather than significance, you should be more concerned with effect size, especially if you are not doing a fishing expedition. You should also be concern | Alpha adjustment for multiple testing
I also like @john 's answer, but I'd add that, rather than significance, you should be more concerned with effect size, especially if you are not doing a fishing expedition. You should also be concerned about other things. Robert Abelson, in his marvelous book: Statistics as Principled Argument says that we should evaluate statistical findings based on the "MAGIC" criteria:
Magnitude - how big is the effect?
Articulation - Does it need a lot of qualifications and exceptions?
Generality - Does it apply to a large area (e.g. lots of types of people, or whatever)
Interestingness - interesting effects are better!
and
Credibility - Can people believe it?
I review the book | Alpha adjustment for multiple testing
I also like @john 's answer, but I'd add that, rather than significance, you should be more concerned with effect size, especially if you are not doing a fishing expedition. You should also be concern |
29,892 | Linear model with constraints | You can do this using contrasts:
options(contrasts=c('contr.sum', 'contr.sum'))
See ?contr.sum for more information.
UPDATE: A little googling reveals a page which might be a little clearer:
Samuel E. Buttrey, Setting and Keeping Contrasts | Linear model with constraints | You can do this using contrasts:
options(contrasts=c('contr.sum', 'contr.sum'))
See ?contr.sum for more information.
UPDATE: A little googling reveals a page which might be a little clearer:
Samuel | Linear model with constraints
You can do this using contrasts:
options(contrasts=c('contr.sum', 'contr.sum'))
See ?contr.sum for more information.
UPDATE: A little googling reveals a page which might be a little clearer:
Samuel E. Buttrey, Setting and Keeping Contrasts | Linear model with constraints
You can do this using contrasts:
options(contrasts=c('contr.sum', 'contr.sum'))
See ?contr.sum for more information.
UPDATE: A little googling reveals a page which might be a little clearer:
Samuel |
29,893 | Linear model with constraints | There is a trick to be had here. For simplicity, suppose you are trying to build a model of the form $$y = b_1 x_1 + b_2 x_2 + b_3 x_3,$$ subject to $b_1 + b_2 + b_3 = 0$. Simply re-express $b_3$ as $b_3 = - b_1 - b_2$, which is to say you are trying to build a model of the form
$$y = b_1 x_1 + b_2 x_2 - (b_1 + b_2) x_3 = b_1 (x_1 - x_3) + b_2 (x_2 - x_3).$$
So create new variables $\tilde{x}_1 = x_1 - x_3,$ and $\tilde{x}_2 = x_2 - x_3$, and perform your regression using these transformed variables as the independent variables.
You should be able to apply this trick independently to the catgories of factor1 and factor2. (I have assumed the data is given as 0/1 indicators of membership in the individual categories.) | Linear model with constraints | There is a trick to be had here. For simplicity, suppose you are trying to build a model of the form $$y = b_1 x_1 + b_2 x_2 + b_3 x_3,$$ subject to $b_1 + b_2 + b_3 = 0$. Simply re-express $b_3$ as $ | Linear model with constraints
There is a trick to be had here. For simplicity, suppose you are trying to build a model of the form $$y = b_1 x_1 + b_2 x_2 + b_3 x_3,$$ subject to $b_1 + b_2 + b_3 = 0$. Simply re-express $b_3$ as $b_3 = - b_1 - b_2$, which is to say you are trying to build a model of the form
$$y = b_1 x_1 + b_2 x_2 - (b_1 + b_2) x_3 = b_1 (x_1 - x_3) + b_2 (x_2 - x_3).$$
So create new variables $\tilde{x}_1 = x_1 - x_3,$ and $\tilde{x}_2 = x_2 - x_3$, and perform your regression using these transformed variables as the independent variables.
You should be able to apply this trick independently to the catgories of factor1 and factor2. (I have assumed the data is given as 0/1 indicators of membership in the individual categories.) | Linear model with constraints
There is a trick to be had here. For simplicity, suppose you are trying to build a model of the form $$y = b_1 x_1 + b_2 x_2 + b_3 x_3,$$ subject to $b_1 + b_2 + b_3 = 0$. Simply re-express $b_3$ as $ |
29,894 | Linear model with constraints | The easiest is to use the appropriate built-in function:
myContrasts <- list(factor1=contr.sum(length(levels(factor1))),
factor2=contr.sum(length(levels(factor2))))
model1 <- lm(Rate ~ factor1 + factor2, data=myData, contrasts=myContrasts) | Linear model with constraints | The easiest is to use the appropriate built-in function:
myContrasts <- list(factor1=contr.sum(length(levels(factor1))),
factor2=contr.sum(length(levels(factor2))))
model1 <- lm(R | Linear model with constraints
The easiest is to use the appropriate built-in function:
myContrasts <- list(factor1=contr.sum(length(levels(factor1))),
factor2=contr.sum(length(levels(factor2))))
model1 <- lm(Rate ~ factor1 + factor2, data=myData, contrasts=myContrasts) | Linear model with constraints
The easiest is to use the appropriate built-in function:
myContrasts <- list(factor1=contr.sum(length(levels(factor1))),
factor2=contr.sum(length(levels(factor2))))
model1 <- lm(R |
29,895 | Linear model with constraints | There are packages for it.
One example is glmc - Generalized Linear Models Subject to Constraints.
See documentation here: http://cran.r-project.org/web/packages/glmc/glmc.pdf
A good overview on optimisation techniques with the use of constraints can be found here:
http://zoonek.free.fr/blosxom/R/2012-06-01_Optimization.html
Example code (from the glmc documentaion):
library(glmc)
#Specify the data.
n <- rbind(c(5903,230),c(5157,350))
mat <- matrix(0,nrow=sum(n),ncol=2)
mat <- rbind(matrix(1,nrow=n[1,1],ncol=1)%*%c(0,0),
matrix(1,nrow=n[1,2],ncol=1)%*%c(0,1),
matrix(1,nrow=n[2,1],ncol=1)%*%c(1,0),
matrix(1,nrow=n[2,2],ncol=1)%*%c(1,1))
#Specifying the population constraints.
gfr <- .06179*matrix(1,nrow=nrow(mat),ncol=1)
g <- matrix(1,nrow=nrow(mat),ncol=1)
amat <- matrix(mat[,2]*g-gfr,ncol=1)
hrh <- data.frame(birth=mat[,2], child=mat[,1], constraints=amat)
gfit <- glmc(birth~child, data=hrh, family="binomial",emplik.method="Owen",
control=glmc.control(maxit.glm=10,maxit.weights=200,
itertrace.weights=TRUE,gradtol.weights=10^(-6)))
summary.glmc(gfit) | Linear model with constraints | There are packages for it.
One example is glmc - Generalized Linear Models Subject to Constraints.
See documentation here: http://cran.r-project.org/web/packages/glmc/glmc.pdf
A good overview on optim | Linear model with constraints
There are packages for it.
One example is glmc - Generalized Linear Models Subject to Constraints.
See documentation here: http://cran.r-project.org/web/packages/glmc/glmc.pdf
A good overview on optimisation techniques with the use of constraints can be found here:
http://zoonek.free.fr/blosxom/R/2012-06-01_Optimization.html
Example code (from the glmc documentaion):
library(glmc)
#Specify the data.
n <- rbind(c(5903,230),c(5157,350))
mat <- matrix(0,nrow=sum(n),ncol=2)
mat <- rbind(matrix(1,nrow=n[1,1],ncol=1)%*%c(0,0),
matrix(1,nrow=n[1,2],ncol=1)%*%c(0,1),
matrix(1,nrow=n[2,1],ncol=1)%*%c(1,0),
matrix(1,nrow=n[2,2],ncol=1)%*%c(1,1))
#Specifying the population constraints.
gfr <- .06179*matrix(1,nrow=nrow(mat),ncol=1)
g <- matrix(1,nrow=nrow(mat),ncol=1)
amat <- matrix(mat[,2]*g-gfr,ncol=1)
hrh <- data.frame(birth=mat[,2], child=mat[,1], constraints=amat)
gfit <- glmc(birth~child, data=hrh, family="binomial",emplik.method="Owen",
control=glmc.control(maxit.glm=10,maxit.weights=200,
itertrace.weights=TRUE,gradtol.weights=10^(-6)))
summary.glmc(gfit) | Linear model with constraints
There are packages for it.
One example is glmc - Generalized Linear Models Subject to Constraints.
See documentation here: http://cran.r-project.org/web/packages/glmc/glmc.pdf
A good overview on optim |
29,896 | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the posterior? | I have posted a related (but broader) question and answer here which may shed some more light on this matter, giving the full context of the model setup for a Bayesian IID model.
You can find a good primer on the Bayesian interpretation of these types of models in Bernardo and Smith (1994), and you can find a more detailed discussion of these particular interpretive issues in O'Neill (2009). A starting point for the operational meaning of the parameter $\theta$ is obtained from the strong law of large numbers, which in this context says that:
$$\mathbb{P} \Bigg( \lim_{n \rightarrow \infty} \frac{1}{n} \sum_{i=1}^n X_i = \theta \Bigg) = 1.$$
This gets us part-way to a full interpretation of the parameter, since it shows almost sure equivalence with the Cesàro limit of the observable sequence. Unfortunately, the Cesàro limit in this probability statement does not always exist (though it exists almost surely within the IID model). Consequently, using the approach set out in O'Neill (2009), you can consider $\theta$ to be the Banach limit of the sequence $X_1,X_2,X_3$, which always exists and is equivalent to the Cesàro limit when the latter exists. So, we have the following useful parameter interpretation as an operationally defined function of the observable sequence.
Definition: The parameter $\theta$ is the Banach limit of the sequence $\mathbf{X} = (X_1,X_2,X_3,...)$.
(Alternative definitions that define the parameter by reference to an underlying sigma-field can also be used; these are essentially just different ways to do the same thing.) This interpretation means that the parameter is a function of the observable sequence, so once that sequence is given the parameter is fixed. Consequently, it is not accurate to say that $\theta$ is "unrealised" --- if the sequence is well-defined then $\theta$ must have a value, albeit one that is unobserved (unless we observe the whole sequence). The sampling probability of interest is then given by the representation theorem of de Finetti.
Representation theorem (adaptation of de Finetti): If $\mathbf{X}$ is an exchangeable sequence of binary values (and with $\theta$ defined as above), it follows that the elements of $\mathbf{X}|\theta$ are independent with sampling distribution $X_i|\theta \sim \text{IID Bern}(\theta)$ so that for all $k \in \mathbb{N}$ we have:
$$\mathbb{P}(\mathbf{X}_k=\mathbf{x}_k | \theta = c) = \prod_{i=1}^k c^{x_i} (1-c)^{1-x_i}.$$
This particular version of the theorem is adapted from O'Neill (2009), which is itself a minor re-framing of de Finetti's famous representation theorem.
Now, within this IID model, the specific probability $\mathbb{P}(X_i=1|\theta=c) = c$ is just the sampling probability of a positive outcome for the value $X_i$. This represents the probability of a single positive indicator conditional on the Banach limit of the sequence of indicator random variables being equal to $c$.
Since this is an area of interest to you, I strongly recommend you read O'Neill (2009) to see the broader approach used here and how it is contrasted with the frequentist approach. That paper asks some similar questions to what you are asking here, so I think it might assist you in understanding how these things can be framed in an operational manner within the Bayesian paradigm.
How do we justify blending two interpretations of probability in Bayes theorem as if they are equivalent?
I presume here that you are referring to the fact that there are certain limiting correspondences analogous to the "frequentist interpretation" of probability at play in this situation. Bayesians generally take an epistemic interpretation of the meaning of probability (what Bernardo and Smith call the "subjective interpretation"). Consequently, all probability statements are interpreted as beliefs about uncertainty on the part of the analyst. Nevertheless, Bayesians also accept that the law-of-large-numbers (LLN) is valid and applies to their models under appropriate conditions, so it may be the case that the epistemic probability of an event is equivalent to the limiting frequency of a sequence.
In the present case, the definition of the parameter $\theta$ is the Banach limit of the sequence of observable values, so it necessarily corresponds to a limiting frequency. Probability statements about $\theta$ are therefore also probability statements about a limiting frequency for the observable sequence of values. There is no contradiction in this. | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the p | I have posted a related (but broader) question and answer here which may shed some more light on this matter, giving the full context of the model setup for a Bayesian IID model.
You can find a good p | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the posterior?
I have posted a related (but broader) question and answer here which may shed some more light on this matter, giving the full context of the model setup for a Bayesian IID model.
You can find a good primer on the Bayesian interpretation of these types of models in Bernardo and Smith (1994), and you can find a more detailed discussion of these particular interpretive issues in O'Neill (2009). A starting point for the operational meaning of the parameter $\theta$ is obtained from the strong law of large numbers, which in this context says that:
$$\mathbb{P} \Bigg( \lim_{n \rightarrow \infty} \frac{1}{n} \sum_{i=1}^n X_i = \theta \Bigg) = 1.$$
This gets us part-way to a full interpretation of the parameter, since it shows almost sure equivalence with the Cesàro limit of the observable sequence. Unfortunately, the Cesàro limit in this probability statement does not always exist (though it exists almost surely within the IID model). Consequently, using the approach set out in O'Neill (2009), you can consider $\theta$ to be the Banach limit of the sequence $X_1,X_2,X_3$, which always exists and is equivalent to the Cesàro limit when the latter exists. So, we have the following useful parameter interpretation as an operationally defined function of the observable sequence.
Definition: The parameter $\theta$ is the Banach limit of the sequence $\mathbf{X} = (X_1,X_2,X_3,...)$.
(Alternative definitions that define the parameter by reference to an underlying sigma-field can also be used; these are essentially just different ways to do the same thing.) This interpretation means that the parameter is a function of the observable sequence, so once that sequence is given the parameter is fixed. Consequently, it is not accurate to say that $\theta$ is "unrealised" --- if the sequence is well-defined then $\theta$ must have a value, albeit one that is unobserved (unless we observe the whole sequence). The sampling probability of interest is then given by the representation theorem of de Finetti.
Representation theorem (adaptation of de Finetti): If $\mathbf{X}$ is an exchangeable sequence of binary values (and with $\theta$ defined as above), it follows that the elements of $\mathbf{X}|\theta$ are independent with sampling distribution $X_i|\theta \sim \text{IID Bern}(\theta)$ so that for all $k \in \mathbb{N}$ we have:
$$\mathbb{P}(\mathbf{X}_k=\mathbf{x}_k | \theta = c) = \prod_{i=1}^k c^{x_i} (1-c)^{1-x_i}.$$
This particular version of the theorem is adapted from O'Neill (2009), which is itself a minor re-framing of de Finetti's famous representation theorem.
Now, within this IID model, the specific probability $\mathbb{P}(X_i=1|\theta=c) = c$ is just the sampling probability of a positive outcome for the value $X_i$. This represents the probability of a single positive indicator conditional on the Banach limit of the sequence of indicator random variables being equal to $c$.
Since this is an area of interest to you, I strongly recommend you read O'Neill (2009) to see the broader approach used here and how it is contrasted with the frequentist approach. That paper asks some similar questions to what you are asking here, so I think it might assist you in understanding how these things can be framed in an operational manner within the Bayesian paradigm.
How do we justify blending two interpretations of probability in Bayes theorem as if they are equivalent?
I presume here that you are referring to the fact that there are certain limiting correspondences analogous to the "frequentist interpretation" of probability at play in this situation. Bayesians generally take an epistemic interpretation of the meaning of probability (what Bernardo and Smith call the "subjective interpretation"). Consequently, all probability statements are interpreted as beliefs about uncertainty on the part of the analyst. Nevertheless, Bayesians also accept that the law-of-large-numbers (LLN) is valid and applies to their models under appropriate conditions, so it may be the case that the epistemic probability of an event is equivalent to the limiting frequency of a sequence.
In the present case, the definition of the parameter $\theta$ is the Banach limit of the sequence of observable values, so it necessarily corresponds to a limiting frequency. Probability statements about $\theta$ are therefore also probability statements about a limiting frequency for the observable sequence of values. There is no contradiction in this. | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the p
I have posted a related (but broader) question and answer here which may shed some more light on this matter, giving the full context of the model setup for a Bayesian IID model.
You can find a good p |
29,897 | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the posterior? | IMO you can find equally hard-to-answer philosophical questions like this about the foundations of any branch of maths, not just Bayesian statistics: what does it really mean, deep down, to say that 1+1=2? Not sure I could answer that satisfactorily, but I still confidently use arithmetic.
But my interpretation is: we don't need to think of $\theta$ as a long-run probability. It's the number with the property that if my utility function is linear, then I should be indifferent to the opportunity to pay $\theta$ for a contract which pays out $1$ if the next flip of the coin is heads and 0 if it is tails. | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the p | IMO you can find equally hard-to-answer philosophical questions like this about the foundations of any branch of maths, not just Bayesian statistics: what does it really mean, deep down, to say that 1 | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the posterior?
IMO you can find equally hard-to-answer philosophical questions like this about the foundations of any branch of maths, not just Bayesian statistics: what does it really mean, deep down, to say that 1+1=2? Not sure I could answer that satisfactorily, but I still confidently use arithmetic.
But my interpretation is: we don't need to think of $\theta$ as a long-run probability. It's the number with the property that if my utility function is linear, then I should be indifferent to the opportunity to pay $\theta$ for a contract which pays out $1$ if the next flip of the coin is heads and 0 if it is tails. | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the p
IMO you can find equally hard-to-answer philosophical questions like this about the foundations of any branch of maths, not just Bayesian statistics: what does it really mean, deep down, to say that 1 |
29,898 | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the posterior? | More generally, how do Bayesians interpret P(X=x|θ=c) or P(X≤x|θ=c) for any probability model and does this interpretation pose any challenges when interpreting P(θ=s|x) or P(θ≤s|x)?
$P(X=x\vert \theta=c)$ is the degree of belief ascribed to the outcome $X=x$ conditioned on the fact that $\theta =c$ under the model represented by $P$.
$P(\theta =s \vert X=x)$ is the degree of belief ascribed to the outcome $\theta=s$ conditioned on the fact that $X=x$ under the model represented by $P$.
$P(\Theta = \theta)$ is the degree of belief ascribed to the outcome $\Theta=\theta$ under the model represented by $P$.
$P(\Theta)$ is the degree of belief ascribed to the outcome $\Theta=\theta$, for each $\theta \in \Theta$, under the model represented by $P$
(and so on...)
"Degree of belief" can be operationalized in terms of betting/preference behavior (as mentioned in other answers). More abstractly, Bayesian probability theory is a formalization of aspects of how people reason under uncertainty (at least some of the time...), so it is, itself, a model for belief.
How do we justify blending two interpretations of probability in Bayes theorem as if they are equivalent? How does Bayes theorem not imply there is only one type of probability? How are we able to apply posterior probability statements to the unknown fixed true θ=c under investigation?
I believe the first two questions miss a key point: more than one category of phenomena can be modeled using the same mathematics. In this case both (an idealization of) belief and (an idealization of) repeatable trials can both be represented by the same mathematical formulation: probability theory. Good/useful/accurate beliefs about repeatable trials will assign "degrees of belief" for an outcome $x$ that are equal to the proportion of occurrences for the outcome $x$ in the ensemble of trials (basically by Dutch Book arguments), so under those circumstances you get a numerical correspondence between these two different aspects of the world.
For the third question, these statements are "the degree of belief ascribed to the outcome...". | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the p | More generally, how do Bayesians interpret P(X=x|θ=c) or P(X≤x|θ=c) for any probability model and does this interpretation pose any challenges when interpreting P(θ=s|x) or P(θ≤s|x)?
$P(X=x\vert \the | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the posterior?
More generally, how do Bayesians interpret P(X=x|θ=c) or P(X≤x|θ=c) for any probability model and does this interpretation pose any challenges when interpreting P(θ=s|x) or P(θ≤s|x)?
$P(X=x\vert \theta=c)$ is the degree of belief ascribed to the outcome $X=x$ conditioned on the fact that $\theta =c$ under the model represented by $P$.
$P(\theta =s \vert X=x)$ is the degree of belief ascribed to the outcome $\theta=s$ conditioned on the fact that $X=x$ under the model represented by $P$.
$P(\Theta = \theta)$ is the degree of belief ascribed to the outcome $\Theta=\theta$ under the model represented by $P$.
$P(\Theta)$ is the degree of belief ascribed to the outcome $\Theta=\theta$, for each $\theta \in \Theta$, under the model represented by $P$
(and so on...)
"Degree of belief" can be operationalized in terms of betting/preference behavior (as mentioned in other answers). More abstractly, Bayesian probability theory is a formalization of aspects of how people reason under uncertainty (at least some of the time...), so it is, itself, a model for belief.
How do we justify blending two interpretations of probability in Bayes theorem as if they are equivalent? How does Bayes theorem not imply there is only one type of probability? How are we able to apply posterior probability statements to the unknown fixed true θ=c under investigation?
I believe the first two questions miss a key point: more than one category of phenomena can be modeled using the same mathematics. In this case both (an idealization of) belief and (an idealization of) repeatable trials can both be represented by the same mathematical formulation: probability theory. Good/useful/accurate beliefs about repeatable trials will assign "degrees of belief" for an outcome $x$ that are equal to the proportion of occurrences for the outcome $x$ in the ensemble of trials (basically by Dutch Book arguments), so under those circumstances you get a numerical correspondence between these two different aspects of the world.
For the third question, these statements are "the degree of belief ascribed to the outcome...". | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the p
More generally, how do Bayesians interpret P(X=x|θ=c) or P(X≤x|θ=c) for any probability model and does this interpretation pose any challenges when interpreting P(θ=s|x) or P(θ≤s|x)?
$P(X=x\vert \the |
29,899 | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the posterior? | I'm going to go in an entirely different direction from the other replies; I hope this comes across as helpful rather than simply contrary.
I suggest that we don't need to interpret conditional probability (or any other probability) in general. In any actual application, the interpretation of the conditional probability will be forced upon us by the context (in fact, we may be presented with many ways to frame the problem, all with different meanings!).
But without a specific application, the question of interpretation is meaningless. The reason your example seems difficult to interpret is because it is critically underspecified - the problem does not give us any real-world scenario that we're trying to reason uncertainly about. It's not surprising, in such a situation, that it's hard to resolve what exactly we mean by uncertain knowledge. | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the p | I'm going to go in an entirely different direction from the other replies; I hope this comes across as helpful rather than simply contrary.
I suggest that we don't need to interpret conditional probab | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the posterior?
I'm going to go in an entirely different direction from the other replies; I hope this comes across as helpful rather than simply contrary.
I suggest that we don't need to interpret conditional probability (or any other probability) in general. In any actual application, the interpretation of the conditional probability will be forced upon us by the context (in fact, we may be presented with many ways to frame the problem, all with different meanings!).
But without a specific application, the question of interpretation is meaningless. The reason your example seems difficult to interpret is because it is critically underspecified - the problem does not give us any real-world scenario that we're trying to reason uncertainly about. It's not surprising, in such a situation, that it's hard to resolve what exactly we mean by uncertain knowledge. | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the p
I'm going to go in an entirely different direction from the other replies; I hope this comes across as helpful rather than simply contrary.
I suggest that we don't need to interpret conditional probab |
29,900 | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the posterior? | I think that the issue here is whether the likelihood that is used to turn a Bayesian prior into a Bayesian posterior has a Bayesian interpretation, or whether it is necessarily a long-run frequency. IF that is the question, then I would say "yes", of course it does.
If we have a Bernoulli likelihood then $f(k;\theta) = \theta^k(1-\theta)^{1-k}$ for $k \in \{0,1\}$, where $\theta$ is a parameter, with unknown "true" probability $c$. Now I would regard $c$ as a "physical probability" (IIRC Good uses that term as well). If we are talking about macroscopic objects, like coins, then there is no such thing as "randomness". Whether a coin comes down heads of tails is entirely deteministic. The only reason we can't know whether it comes down heads or tails is that we don't have perfect knowledge of the initial condtions. So a "physical probability" is basically summarising appearance of randomness that are caused by that lack of knowledge.
It is important to distinguish physical probabilities from either Bayesian probabilities or frequentist ones. It distinct from frequentist probabilities because the long run frequency normally stems directly from the physical probability being (assumed to be) the same for all possible trials. However, they are not directly equivalent. The physical probability is directly the probability that a particular coin flip will come up heads, because it describes the physics that makes that so. A frequentist probability, as a long-run frequency can't be applied to a particular coin flip (as it has no long run frequency, it happens only once). It can only make a probabilistic statement about a (fictitious) population of coin flips, of which this can be considered a particular sample.
Note that something that can only ever happen at most once can have a physical probability of happening, but it can't have a long run frequency.
A physical probability isn't a Bayesian probability either. Bayesian probabilities represent our beliefs (subjective or objective) about the plausibility of different values of that physical probability. The Bayesian is making a probabilistic model of the physics, it isn't the physics itself.
So for me, I would view $f(k;c)$ as neither Bayesian nor frequentist, or perhaps both, but a statement about the physics of the date generating process. It is equally true for single observations, or when looking at a long run of observations.
So in this case, to get our posterior, we would say
$$p(\theta|X=1) = \frac{P(x=1;\theta)p(\theta)}{P(X=1)}$$
Note that $c$ does not appear anywhere in our inference to obtain our posterior belief, which is why I think the question as posed is essentially meaningless.
Of course we could look at our posterior to evaluate $p(c|X=1)$, but this would just give us the point probability of the model parameter, $\theta$, being the same numeric value as the true "physical" probability. As this is evaluating a specific point on a continuous distribution, it is just a density, not an actual probability. Probably not very useful.
At the end of the day, it is a very badly posed question, but that seems to be the most meaningful answer I can give to the most informative intepretation that is reasonably consistent with the question as posed. | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the p | I think that the issue here is whether the likelihood that is used to turn a Bayesian prior into a Bayesian posterior has a Bayesian interpretation, or whether it is necessarily a long-run frequency. | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the posterior?
I think that the issue here is whether the likelihood that is used to turn a Bayesian prior into a Bayesian posterior has a Bayesian interpretation, or whether it is necessarily a long-run frequency. IF that is the question, then I would say "yes", of course it does.
If we have a Bernoulli likelihood then $f(k;\theta) = \theta^k(1-\theta)^{1-k}$ for $k \in \{0,1\}$, where $\theta$ is a parameter, with unknown "true" probability $c$. Now I would regard $c$ as a "physical probability" (IIRC Good uses that term as well). If we are talking about macroscopic objects, like coins, then there is no such thing as "randomness". Whether a coin comes down heads of tails is entirely deteministic. The only reason we can't know whether it comes down heads or tails is that we don't have perfect knowledge of the initial condtions. So a "physical probability" is basically summarising appearance of randomness that are caused by that lack of knowledge.
It is important to distinguish physical probabilities from either Bayesian probabilities or frequentist ones. It distinct from frequentist probabilities because the long run frequency normally stems directly from the physical probability being (assumed to be) the same for all possible trials. However, they are not directly equivalent. The physical probability is directly the probability that a particular coin flip will come up heads, because it describes the physics that makes that so. A frequentist probability, as a long-run frequency can't be applied to a particular coin flip (as it has no long run frequency, it happens only once). It can only make a probabilistic statement about a (fictitious) population of coin flips, of which this can be considered a particular sample.
Note that something that can only ever happen at most once can have a physical probability of happening, but it can't have a long run frequency.
A physical probability isn't a Bayesian probability either. Bayesian probabilities represent our beliefs (subjective or objective) about the plausibility of different values of that physical probability. The Bayesian is making a probabilistic model of the physics, it isn't the physics itself.
So for me, I would view $f(k;c)$ as neither Bayesian nor frequentist, or perhaps both, but a statement about the physics of the date generating process. It is equally true for single observations, or when looking at a long run of observations.
So in this case, to get our posterior, we would say
$$p(\theta|X=1) = \frac{P(x=1;\theta)p(\theta)}{P(X=1)}$$
Note that $c$ does not appear anywhere in our inference to obtain our posterior belief, which is why I think the question as posed is essentially meaningless.
Of course we could look at our posterior to evaluate $p(c|X=1)$, but this would just give us the point probability of the model parameter, $\theta$, being the same numeric value as the true "physical" probability. As this is evaluating a specific point on a continuous distribution, it is just a density, not an actual probability. Probably not very useful.
At the end of the day, it is a very badly posed question, but that seems to be the most meaningful answer I can give to the most informative intepretation that is reasonably consistent with the question as posed. | How do Bayesians interpret $P(X=x|\theta=c)$, and does this pose a challenge when interpreting the p
I think that the issue here is whether the likelihood that is used to turn a Bayesian prior into a Bayesian posterior has a Bayesian interpretation, or whether it is necessarily a long-run frequency. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.