As one can see, \_. The code for calculating these can be found [here](./code/masturbation_and_attractiveness/load.kg). ### Testing the Hypothesis The NoFap community claims that abstinence from masturbation increases male physical attractiveness for women. This means that cold approach should be more successful after a long period of abstinence from masturbation than after a period of sustained masturbation. This assumption generates three hypotheses: 1. H₀: $\mu_{during} \le \mu_{after}$ 2. H₁: $\mu_{during} = \mu_{after}$ 3. H₂: $\mu_{during} \ge \mu_{after}$ The result implied by the views of the NoFap community would be that H₀ would definitely be rejected, and that it would be very likely that H₁ would also be rejected. Note that these hypothesis are not exclusive, and can all be accepted at the same time. It is merely the case that if a hypothesis gets rejected, the probability that it got rejected although it is true is lower than a given percentage (usually and also in this case 5%). I used a two-sample Student's t-test to test the hypotheses, under the assumption that the distribution of results from cold approach was roughly [normally distributed](https://en.wikipedia.org/wiki/Normal_distribution) and that the [variance](https://en.wikipedia.org/wiki/Variance) of the two sample sets was also roughly equal. As one can see from the figures, this assumption of normal distribution \_. To calculate Student's t-test, let $\{X_{1}, \cdots, X_{m}\}=X_{i}\sim{\cal{N}}(\mu_{X}, \sigma_{X})$ be the first sample, and $\{Y_{1}, \cdots, Y_{n}\}=Y_{i}\sim{\cal{N}}(\mu_{Y}, \sigma_{Y})$ the second sample. Let then $T$ be
$$T:=\sqrt{\frac{n+m-2}{\frac{1}{m}+\frac{1}{n}}}*\frac{\overline{X}-\overline{Y}}{\sqrt{(m-1)*S_{X}^{2}+(n-1)*S_{Y}^{2}}}$$
where $\overline{X}$ and $\overline{Y}$ are the sample mean of the two sample sets, and $S_{X}^{2}$ and $S_{Y}^{2}$ are the sample variances of the two sample sets. Different hypotheses are then tested by comparing $T$ to the [quantile function](https://en.wikipedia.org/wiki/Quantile_function) of [Student's t-distribution](https://en.wikipedia.org/wiki/Student%27s_t-distribution). In this case, our sample sizes are bigger than 30, and so the quantile function of Student's t-distribution can be approximated using the quantile function of the normal distribution. The two-sided Student's t-test can thus be implemented (the full code for different hypothesis testing can be found [here](./code/masturbation_and_attractiveness/hypo.kg): .l("nstat") .l("math") tstt::{t::sqr(((#y)+(#x)-2)%(%#x)+%#y)*(mu(x)-mu(y))%sqr((((#x)-1)*svar(x))+((#y)-1)*svar(y)); :[t>qf(1-z);.p("μ_X≤μ_Y rejected (p≤",($z),")");.p("μ_X≤μ_Y accepted (p≤",($z),")")]; :[(#t)>qf(1-z%2);.p("μ_X=μ_Y rejected (p≤",($z),")");.p("μ_X=μ_Y accepted (p≤",($z),")")]; :[t