Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Introdcution to t test using R Programming

2023-09-17
Agenda :
a. One sample t test

i. two sided

ii. one sided : less than

iii. greater than

b. Two sample t test : Independent samples/paired samples

i. two sided

ii. one sided : less than

iii. greater than


The steps involved

1. Clean the data


2. Explore the data
3. State the hypothesis
4. Set the α
5. chceck the asumptions
6. implement the test
7. Interpret the results
i : using t-stat
ii: using CI levels
iii. using p-values
8. Visualize the t test results using plot() method of webr
package
9. get report using report() function of report package
Please note:

We will start with simulated data and then will use real life data

1. with statistically non significant difference


2. With statistically significnat difference
critical t values

Table 1: Critical values for a two-sided t-test at a 0.05 significance level


for a few common degrees of freedom

Degrees of Freedom (df) Critical Values


(two-tailed t-test at α = 0.05)
5 ±2.571
10 ±2.228
20 ±2.086
30 ±2.042
40 ±2.021
50 ±2.009
100 ±1.984
Infinity (approx.) ±1.960

The critical values get closer to 1.960 as the degrees of


freedom increase significantly.

You might also like