# California Crazy Neighbors - One-Sample Student's T-Test

## Introduction

The living experiences in California has been deteriorated in the past 10 to 15 years. One of the indicators is that you could find crazy neighbors wherever you moved, unless you own a tens-million dollar mansion in the suburban area.

In this blog post, I would like to use my own personal data to statistically test what’s the percentage of crazy neighbors in California and discuss whether it is still a good idea living in California.

## California Crazy Neighbors

I have been living in California since 2019. The apartment and house quality of California have been the worst I have ever seen since I moved to the United States ten years ago. Because of this, the noise could penetrate easily. So far, I have moved three times and lived in four different apartments, two of which could be considered as “luxury”, in California. The last two moves were all due to crazy neighbors who made loud noise day and night.

I have lived in Durham, North Carolina, and Chicago, Illinois, for a couple years before I moved to California. Notice that I have never complained about my neighbors when I lived there and I did not move even once. This is also a strong indicator that California is an extremely poor place to live.

### Data

I would consider the neighbor as the apartment units right next to my unit where the apartment walls are shared, or the apartment unit right above my unit.

I will use 1 to indicate crazy neighbor and 0 to indicate good neighbor.

Based on this, I have got 9 neighbors so far, and the samples, consisting of 9 crazy or good neighbors, are as follows.

$$X = \{0, 1, 1, 0, 1, 0, 0, 1, 1\}$$

### One-Sample Student’s T-Test

Here we use one-sample Student’s T-Test to test our null hypothesis $H_0$, the percentage of crazy neighbors in California is $\mu_0 = 15\%$, which is already an insane value to be tested against.

There are many web applications that can do one-sample Student’s T-Test for us, such as GraphPad and Meta-Calculator. But those tools are only dedicated for two-tail student T-tests as we will discuss below. So we will do Student’s T-Test manually instead.

To do Student’s T-Test, we will have to calculate the T statistics.

$$t = \frac{\overline{X} - \mu_0}{s / \sqrt{n}}$$

where $\overline{X}$ is the sample mean which is the percentage of crazy neighbors in the samples, $s$ is the sample standard deviation and $n$ is the sample size.

So with my data and null hypothesis $H_0$,

$$\overline{X} = \frac{5}{9} \approx 0.555$$

$$\mu_0 = 15\%$$

\begin{align} s &= \sqrt{\frac{1}{9}\left[ \left(1 - \frac{5}{9}\right)^2 \times 5 + \left(0 - \frac{5}{9}\right)^2 \times 4 \right]} \\ &\approx 0.496 \\ \end{align}

$$n = 9$$

Therefore,

\begin{align} t &\approx \frac{0.555 - 0.150}{0.496 / 3} \\ &\approx 2.452 \end{align}

The degrees of freedom used in this test are $d_f = n - 1 = 8$.

If our alternative hypothesis $H_A$ is the percentage of crazy neighbors in California is not $\mu_0 = 15\%$, we should check the two-tail T table.

If our alternative hypothesis $H_A$ is the percentage of crazy neighbors in California is higher than $\mu_0 = 15\%$, we should check the one-tail T table.

Obviously, the latter alternative hypothesis makes more sense, and we will check the one-tail T-table. We could see that for $d_f = 8$, $t_{0.975} = 2.306$ and $t_{0.99} = 2.896$. So the $p$-value is between $0.975$ and $0.99$. To be conservative, we could say the $p$-value in this test is $0.975$.

So the interpretation to this test is “Assuming the percentage of crazy neighbors in California is $\mu_0 = 15\%$, there is only $1 - 0.975 = 0.025 = 2.5\%$ chance that we observed 5 crazy neighbors out of 9 neighbors. It is extremely likely that the the percentage of crazy neighbors in California is higher than $\mu_0 = 15\%$.”

## Conclusion

My Student’s T-Test showed that California is full of crazy neighbors, which makes it an inferior place to live especially when you are not a multi-millionaire.

## References

California Crazy Neighbors - One-Sample Student's T-Test

https://leimao.github.io/blog/One-Sample-Student-T-Test/

Lei Mao

06-19-2022

06-19-2022