# Independence of sample variance and $\sum_{i=1}^n w_i X_i$

I have the following model,

$$X_i \overset{iid}{\sim} \mathrm{Normal}(0,1), i=1, \dots, n.$$

It is known that the sample variance $$\hat{\sigma^2} := \sum_{i=1}^n \frac{(X-\bar{X})^2}{n-1}$$ is independent of sample mean, $$\bar{X} := \frac{\sum_{i=1}^n X_i}{n}$$. But what I wonder is,

Is $$\bar{X}^{w} := \sum_{i=1}^n w_i X_i$$ also independent of $$\hat{\sigma^2}$$, where $$w_i$$'s are given constants such that $$\sum w_i = 0$$?

My try

I'm trying to show $$\bar{X}^{w}$$ is a function of $$\bar{X}$$, but I'm stuck at here.

Let $$n=2$$, and $$w_1 = 1$$ and $$w_2 = -1$$.

It is easy to have $$X_1-\bar X = 0.5X_1 - 0.5X_2$$ and $$X_2 - \bar X = -0.5X_1 + 0.5X_2$$

$$X=\left(\matrix{\bar Y^w\\ Y_1-\bar X\\ Y_2-\bar X }\right) = \left(\matrix{ 1 & -1\\ 0.5 & -0.5 \\ -0.5 & 0.5}\right)\left(\matrix{ Y_1\\Y_2}\right)$$

$$\mathrm{Var}(X) = \left(\matrix{ 1 & -1\\ 0.5 & -0.5 \\ -0.5 & 0.5}\right)\left(\matrix {1 & 0.5 & -0.5\\ -1 &-0.5 & 0.5}\right) = \left(\matrix {2 & 1 & -1\\ -1 & -0.5 & -0.5\\ -1 & -0.5 & 0.5}\right)$$ So $$\bar Y^w$$ is not independent with $$Y_1-\bar X$$ and $$Y_2-\bar X$$. ==> $$\bar Y^w$$ is not independent with $$\hat \sigma^2$$