The paired sample ttest, is also called as dependent sample ttest, it is a statistical method used to check that the mean difference between two randomly selected samples is zero. This test is performed when the subjects are marked twice so that we get two sets of observations. Examples where the test can be applied is case control and measure control studies. Let's take an example of testing the employee or the workers before and after implementing the programs and therefore can check the variation/ deviation by performing paired t test.
Hypothesis:
Like all the test available Ttest also has two competing for the null hypothesis and the alternative hypothesis. The null hypothesis remains the same for each type of alternative hypothesis. The paired sample ttest hypotheses are formally defined below:
1. Null hypothesis (H0) : mean difference= 0
2. Alternative hypothesis(H1) : mean difference greater or lesser than 0.
3. The alternative hypothesis assumes that the true mean is not equal to 0.
The goal of the testing is to make data more consistent.
ASSUMPTIONS:
The paired sample ttest have many assumptions. We know that Ttest are relatively strong of all the test to measure the variation or degree of deviation from the assumptions to check the quality/reliability of the outputs. The paired Ttest has four foremost assumptions:

All dependent variable should be continuous either interval or ratio.

All the observations should be independent of each other.

The dependent variable should not contain any outliers.

The dependent variable should be normally distributed.
PROCEDURE :
The paired sample ttest is summed up in the following four steps:
The four steps are as follows:
1. Sample mean & sample standard deviation is calculated.
2. The value of the statistic is computed.
3. Probability value is calculated after looking into tables.
This value is calculated by comparing t to a tdistribution with (n − 1) degrees of freedom.
Paired Ttest using SAS:
Performing paired T  test in SAS, we need to compare variables Z1 and Z2 that are measured on the same people, you can first create the difference , and then perform a one sample ttest of:
DT pdt; set original;
d=Z1Z2;
run;
 COMMAND  proc ttest DT=pdt h0=0;
var d;
run;
Hypotheses:
H0: The average difference in cholesterol is 0 from 1952 to 1962
H1: The average difference in cholesterol is not equal to 0 from 1952 to 1962.
Now, let's create the difference in cholesterol  dchl.
data DT; set dixonmasy;
dchl=chl62chl52;
run;
proc ttest data=dm;
Setting a proper suitable title for the table you want to display
title 'Paired ttest, using dchl variable';
var dchl;
run;
Again, we reject the null hypothesis as the p value <0.05 and state that we have significant evidence that cholesterol levels from 1952 to 1962, with 95% confidence limits of (91.6, 48.0).
Alternatively, we can test the null hypothesis using proc means:
proc means data=pdt n mean std t prt clm;
title 'ttest with proc means';
var dchl;
run;
the prt functions gives the associated pvalue.
The clm function produces a 95% confidence interval for the mean.
dchl, the null hypothesis is that the mean difference is zero
proc means DT=dm n mean std t prt clm;
title 'Paired ttest with proc means';
var dchl;
Run;
The third method and the final method is to use the original data with the paired function in proc ttest:
proc ttest data=original;
title 'Paired ttest with proc ttest, paired statement';
paired z1*z2;
run;
The output from proc function is identical to dchl;
Example:
proc ttest data=work.dm;
title 'Paired ttest with proc ttest, paired statement';
paired chl62*chl52;
run;
OUTCOMES
We conducted a paired ttest to determine whether, on average, to check the change cholesterol level from 1952 to 1962.

H0: There is no change, on average, in cholesterol from 1952 to 1962

H1: There is an average change in cholesterol from 1952 to 1962, i.e., H0: μd ≠ 0 .

Level of significance: α=0.05

Cholesterol deteriorated between 1952 and 1962 by an aggregate of 69.8. The 95% confidence interval is (91.6,48.0)

The test statistic value is t = 6.70, with 19 degrees of freedom, and p < 0.0001. As the pvalue <0.05, rejecting the null hypothesis and hence we can say that there is no difference in cholesterol level from 1952 1962
Conclusion: There is significant evidence that cholesterol decreased from 1952 to 1962 (p <0.0001).the cholesterol levels in 1962 was 69.8 mg/dl in 95 % confidence interval (48.0, 91.6) which is lower than the cholesterol levels in 1952.