 
ttests and Ftest  using R
Test the ratio of sample variances (an Ftest)
Since this test is supposed to precede a ttest, let us deal with it first.
Gives something like this:
F test to compare two variances
data: y1 and y2
F = 7.7881, num df = 4, denom df = 10, pvalue = 0.008108
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
1.74296 68.87739
sample estimates:
ratio of variances
7.788141



2sample ttests
Using R's ttest function
The following code instructs R to perform an unequal variance 2sample ttest.
Gives something like this:
Welch Two Sample ttest
data: y1 and y2
t = 2.3069, df = 4.474, pvalue = 0.07533
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
5.462216 76.007671
sample estimates:
mean of x mean of y
89.00000 53.72727



ttest of weighted means
At the time of writing, the standard t.test function does not perform a ttest of weighted means. The instructions below calculate the required statistics and test them using R's cumulative t and F probability functions.
These are the results we obtained.
For the Ftest:
Precise 2sided Pvalue = 0.5566727>
For the equal variance ttest:
Precise 2sided Pvalue = 0.005211392>


Note:
 Alternatively, we could have obtained the weighted means using a specific function: weighted.mean and performed the variance ratio test using the var.test function.


Paired t test
Using R's t.test function
Gives something like this:
Paired ttest
data: y1 and y2
t = 5.2631, df = 14, pvalue = 0.0001200
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
3.143450 1.323217
sample estimates:
mean of the differences
2.233333



