How To Graph A Distribution For A T-Test

T-distributions are used in statistics to calculate confidence intervals and to test hypotheses. Also called the student T-distribution, this tool was created in 1908, and it helps to calculate statistics with a small sample, or when the data is limited. The mathematics involved in the graph is very complex, making it virtually impossible to graph the distribution without the use of computers. T-distributions have a parameter called degrees of freedom which alter the graph. For academic purposes, we usually show three or more degrees of freedom superimposed on the graph.

Creating the data table for the T-Distribution

Step 1

Launch Microsoft's Open Office program. Go to cell A1. Enter DOF, which stands for Degrees of Freedom. Write "t" on cell A2, and "Y" on cell B2. Go to cell B1 and write "2", on cell C1 write "4", and "6" on cell D1. Write all these numbers as values.

Step 2

Go to cell A2. Write " -5 " as a value. Go to cell A3 and enter the formula: " = A2 + 0.2 ". Copy the formula (Ctrl + C), and paste it to the next 50 cells.

Step 3

Go to cell B3 and enter the formula for the T-distribution: " =(1/ SQRT( $B$1 PI() ) ) GAMMA( ( $B$1 +1 ) / 2) / GAMMA( $B$1 / 2 ) POWER( 1+( $A3 $A3/ $B$1 );-5*( $B$1 +1 ) ) "

Step 4

Copy the cell B3 and paste it on cell C3 and D3. Go to cell C3 and press " F2 " to edit its contents. Replace any references from " $B$1 " to " $C$1 ". Go to cell D3 and change all the references from " $B$1 " to " $D$1. "

Step 5

Go to cell B3 and select cells B3, D3 and E3. Copy them (Ctrl + C), and paste them in the next 50 cells down.

Creating the Graphs for the Distributions

Step 1

Go to the " Insert " -> "Chart" menu. Choose the " XY Scatter " type of chart with smooth lines. Click on the " NEXT " button.

Step 2

Choose the " Data Series " option. Make sure that there are not data series chosen yet. If you find any, click on it and press the " Remove " button.

Step 3

Click the " Add " button. Click on " X Values " to choose the values for the horizontal axis. Click on the small icon located on the right end of the " X Values " dialog box. Use your mouse to select cells from A3 to A53.

Step 4

Click on " Y Values " to choose the values on the vertical axis. Click on the small icon on the right end of " Y Values ", and use your mouse to select cells B3 to B53.

Step 5

Repeat Step 3 (don't forget to click the " Add " button). Repeat Step 4, but instead of selecting cells B3 to B53, choose C3 to C53. Repeat this one more time, replacing the selection from C3 to C53 using D3 to D53 instead. Click " Finish ". You will have three superimposed graphs that match the different degrees of freedom.

TL;DR (Too Long; Didn't Read)

You can also use Excel to create this graph. The formulas will be the same, just the chart options menu will be a little different. If you just need one T-distribution graph, just click the " Finish " after Step 4. You can change the " Degree of Freedom values " (on Row 1), to any value that you need.

Warning

Check the cell on column A that should contain the value zero, " 0 ". On some computers, the calculation is done by iterations and approximations, therefore some computers will not write " 0 "; instead they will output a very small number, which is no good for your calculations.

Cite This Article

MLA

Olortegui, Luis. "How To Graph A Distribution For A T-Test" sciencing.com, https://www.sciencing.com/graph-distribution-ttest-8523756/. 24 April 2017.

APA

Olortegui, Luis. (2017, April 24). How To Graph A Distribution For A T-Test. sciencing.com. Retrieved from https://www.sciencing.com/graph-distribution-ttest-8523756/

Chicago

Olortegui, Luis. How To Graph A Distribution For A T-Test last modified August 30, 2022. https://www.sciencing.com/graph-distribution-ttest-8523756/

Recommended