BreakUp Drinking

Here is the data on alcohol consumption before and after the breakup. There is an assumption that the drinking habit increases post-breakup. Is that true?

BeforeAfter
470408
354439
496321
351437
349335
449344
378318
359492
469531
329417
389358
497391
493398
268394
445508
287399
338345
271341
412326
335467

The null hypothesis, H0: (consumption after – before) = 0.
The alternative hypothesis, HA: (consumption after – before) > 0.

T-Test

\textrm{T-Statistic } = \frac{D - \mu_d}{S_d/\sqrt{n}}

D = Mean difference of the parameter after and before
mud = hypothesised mean difference
Sd = Standard deviation of the difference
n = number of samples

We insert the data in the following command and run the function, t.test.

Before <- c(470, 354, 496, 351, 349, 449, 378, 359, 469, 329, 389, 497, 493, 268, 445, 287, 338, 271, 412, 335)

After  <- c(408, 439, 321, 437, 335, 344, 318, 492, 531, 417, 358, 391, 398, 394, 508, 399, 345, 341, 326, 467)

t.test(Before, After, paired = TRUE, alternative = "greater")
	Paired t-test

data:  Before and After
t = -0.53754, df = 19, p-value = 0.7014
alternative hypothesis: true mean difference is greater than 0
95 percent confidence interval:
 -48.49262       Inf
sample estimates:
mean difference 
          -11.5 

There was a difference of -11.5, yet the p-value (0.7014) is higher than the critical value we chose (0.05). The test shows no evidence supporting the hypothesis.