Learning Objectives

By the end of this note, you will recognize paired designs, compute differences $d_{i}$, compute $t=\bar{d}/(s_{d}/\sqrt{n})$ with df $=n-1$, and decide whether a before after or matched gap differs from $0$ with a BS 2081 public administration example.

Why Paired Data Needs Its Own Test

Independent samples compare different people in different groups. Paired data follows the same person, office, or matched unit twice. Weight before and after a program, scores before and after training for the same officers, or left and right measurements on the same ward all create pairing. Pairing removes between unit noise because you analyze the within unit change. Treating paired data as independent ignores that correlation and weakens power.

Grouped Framework: Conditions, Difference Statistics, and $t$

Condition 1: Paired structure. Observe pairs $(x_{1i},x_{2i})$ for $i=1$ to $n$ pairs. Examples: same employee before and after, twins, husband wife, two audits of the same file. Count df by pairs $n$, not by $2n$ observations.

Condition 2: Difference focus. Define

\[d_{i}=x_{1i}-x_{2i}\quad\text{or}\quad x_{\text{after}}-x_{\text{before}} \text{ consistently}\]

Analyze the single sample of differences. Compute

\[\bar{d}=\frac{\sum d_{i}}{n},\quad s_{d}=\sqrt{\frac{\sum(d_{i}-\bar{d})^{2}}{n-1}}=\sqrt{\frac{\sum d_{i}^{2}-(\sum d_{i})^{2}/n}{n-1}}\]

The test concerns mean difference $\mu_{d}$.

Condition 3: Approximate normality of differences. The population of differences should be approximately normal, not the raw scores themselves. Check the $d_{i}$ histogram or quantile plot. With $n\ge 15$ the test tolerates mild skew, with $n\ge 30$ it tolerates more, but strong outliers in $d_{i}$ still distort $t$.

Hypotheses on $\mu_{d}$.

\[H_{0}:\mu_{d}=0\quad\text{vs}\quad H_{1}:\mu_{d}\neq 0\text{ or }\mu_{d}>0\text{ or }\mu_{d}<0\]

Direction follows the definition of $d$. If $d=$ after $-$ before, then $H_{1}:\mu_{d}>0$ means improvement. If $d=$ before $-$ after, the same improvement is $H_{1}:\mu_{d}>0$ because $d$ is larger when before exceeds after. State the definition once and keep it.

Test statistic.

\[t=\frac{\bar{d}-0}{s_{d}/\sqrt{n}},\quad \text{df}=n-1\] \[\text{SE}_{\bar{d}}=s_{d}/\sqrt{n}\]
Compare $ t $ to $t^{*}$ at df $=n-1$ and $\alpha$, or compute $p$. For two tailed use $\pm t_{\alpha/2}$, for one tailed use $+t_{\alpha}$ or $-t_{\alpha}$.

Confidence interval for $\mu_{d}$.

\[\bar{d}\pm t^{*}\frac{s_{d}}{\sqrt{n}}\]

with $t^{*}$ two tailed at chosen confidence. When the interval excludes $0$, the two tailed test rejects at matching $\alpha$.

Power advantage. Paired $t$ controls individual variation through differencing. For the same total observations, paired $t$ uses fewer df but often has smaller SE because $s_{d}$ excludes between unit spread. That raises power when pairing is meaningful.

Worked Example: Training Impact on Service Score in BS 2081

Context. In Jestha 2081, Bagmati Province trains $n=8$ ward officers on the new e filing system. The same officers are scored out of $100$ on a standardized filing task before and after the two week course. Supervisors test whether training improves scores at $\alpha=0.05$ right tailed. Scores and differences $d=$ after $-$ before are:

Officer Before After $d$ $d^{2}$
1 65 72 7 49
2 70 78 8 64
3 55 60 5 25
4 80 85 5 25
5 68 75 7 49
6 72 80 8 64
7 58 65 7 49
8 75 82 7 49
Sum     54 374

Training cost is NPR 180000. A mean gain of $5$ points saves about $30$ minutes per file, so the test must weigh statistical and practical gain.

Step 1: Hypotheses with $d$ definition.

\[H_{0}:\mu_{d}=0\quad\text{vs}\quad H_{1}:\mu_{d}>0\]

with $d=$ after $-$ before, so positive $d$ signals improvement.

Step 2: Mean and SD of differences.

\[\bar{d}=54/8=6.75\] \[s_{d}=\sqrt{\frac{374-(54)^{2}/8}{7}}=\sqrt{\frac{374-364.5}{7}}=\sqrt{9.5/7}\approx 1.165\] \[\text{SE}_{\bar{d}}=1.165/\sqrt{8}\approx 0.412\]

Step 3: $t$ statistic.

\[t=\frac{6.75}{0.412}\approx 16.38,\quad \text{df}=7\]

Step 4: Critical value and decision. Right tailed $\alpha=0.05$, df $7$, $t^{*}=1.895$. Since $16.38>1.895$, reject $H_{0}$. Two tailed $p=2P(T_{7}>16.38)$ is far below $0.001$, so one tailed $p$ is even smaller.

Step 5: Interval and conclusion.

\[95\text{ percent CI: }6.75\pm 2.365(0.412)=6.75\pm 0.97=(5.78,7.72)\]

The interval lies well above $0$. At 5 percent significance, training raises mean score by about $6.8$ points, with $95$ percent confidence between $5.8$ and $7.7$ points. That practical gain justifies the NPR 180000 cost and supports scale up in Shrawan 2081/82. An independent samples $t$ on these data would treat $16$ scores as independent, inflate SE, and understate evidence, which is why the paired method is required here.

Self-check

Try this (calculable): In Asoj 2081, a Palika measures file clearance time in minutes for $n=6$ officers before and after a workflow change. Data: Before $28,32,25,40,35,30$; After $22,28,22,36,30,26$. Define $d=$ Before $-$ After so positive $d$ means time saved. Test $H_{0}:\mu_{d}=0$ vs $H_{1}:\mu_{d}>0$ at $\alpha=0.05$.

(a) Compute $d_{i}$, $\bar{d}$, $s_{d}$, and $\text{SE}=s_{d}/\sqrt{n}$. (b) Compute $t=\bar{d}/\text{SE}$ with df $=5$ and critical $t^{*}=2.015$ right tailed. Decide and give one tailed $p$ range. (c) Give 95 percent CI $\bar{d}\pm 2.571(\text{SE})$ two tailed and interpret minutes saved.

Answer: (a) $d: 6,4,3,4,5,4$, $\sum d=26$, $\sum d^{2}=118$, $\bar{d}=26/6\approx4.333$, $s_{d}=\sqrt{(118-26^{2}/6)/5}=\sqrt{(118-112.667)/5}\approx1.033$, $\text{SE}\approx0.422$. (b) $t=4.333/0.422\approx10.27$, df $=5$, $t^{*}=2.015$, $10.27>2.015$, reject $H_{0}$. One tailed $p<0.001$, very strong evidence of time saved. (c) $95$ percent CI $4.33\pm2.571(0.422)=4.33\pm1.09=(3.24,5.42)$ minutes, which excludes $0$, matching the test. Estimated saving about $4.3$ minutes per file.

Check: explain why $n=6$ pairs gives df $=5$ while an independent $t$ would use df $=10$ and a larger SE, showing the power gain from pairing.

Summary

Handle paired data by reducing it to one sample of differences. Verify pairing, define $d$ consistently, check approximate normality of $d_{i}$, compute $\bar{d}$, $s_{d}$, and $t=\bar{d}/(s_{d}/\sqrt{n})$ with df $=n-1$, compare $ t $ to $t^{}$ or $p$ to $\alpha$, and report the interval $\bar{d}\pm t^{}(s_{d}/\sqrt{n})$. The method controls between unit variation, so it detects real within unit change more efficiently than an independent samples test on the same observations.

Key Takeaways

  • Confirm pairing first: same unit measured twice or matched units, with $n$ pairs and df $=n-1$.
  • Work with $d_{i}=x_{1i}-x_{2i}$: compute $\bar{d}$ and $s_{d}$ and then $t=\bar{d}/(s_{d}/\sqrt{n})$.
  • Check normality of differences, not of raw scores, and watch for outliers in $d_{i}$.
  • Define $d$ direction before stating $H_{1}$: after $-$ before makes $>$ mean improvement, before $-$ after reverses the sign.
  • Pairing raises power when units vary widely, so never split paired data into two independent groups.

Discussion

  • An analyst runs an independent samples $t$ on before and after scores of the same $12$ officers and reports df $=22$. What df error and SE error does this create, and how does paired df $=11$ plus $s_{d}$ correct it?
  • Your difference plot shows one officer with $d=-8$ while others cluster near $+6$. How does that outlier move $\bar{d}$ and $s_{d}$, and what diagnostic step precedes trusting $t$ in BS 2081 reporting?
  • A report says paired $t=1.8$, df $=9$, $p=0.10$ proves no training effect. How would you restate as fail to reject at $0.05$ with the interval and suggest a larger $n$ to raise power?

Exercises

  1. Training $n=8$ as in the main example: recompute $\bar{d}=6.75$, $s_{d}=1.165$, $t=16.38$, df $=7$, critical $1.895$ and $2.365$ two tailed, and the 95 percent CI $(5.78,7.72)$. State practical gain in points.
  2. Weight loss $n=10$, $d=$ Before $-$ After: $5,4,2,5,6,2,4,5,4,4$. Compute $\bar{d}$, $s_{d}$, $t$, df $=9$, critical $1.833$ right tailed, decision at $0.05$, and 95 percent CI.
  3. Workflow times in Try This: verify that an independent $t$ on 12 values would misstate SE and df, and compute why paired $s_{d}=1.03$ is smaller than pooled $s_{p}$ on raw scores.
  4. Job satisfaction before after $n=6$: $d=$ After $-$ Before $2,1,0,2,1,3$. Compute $\bar{d}=1.5$, $s_{d}\approx1.05$, $t\approx3.50$, df $=5$, critical $2.015$, decision, and 95 percent CI.
  5. Explain why testing $\mu_{d}=0$ with differences is exactly a one sample $t$ test on $d_{i}$, and write the correspondence $t=(\bar{d}-0)/(s_{d}/\sqrt{n})$ with df $=n-1$.