Index

Hypothesis testing using TI-nspire

TI-nspire calculator gives you the possibility of conducting different tests for hypothesis testing:

χ2 GOF test (chi-squared goodness of fit test)

The χ2 GOF test is used to verify whether certain values are results of random chance or not. This test can help us find out if a game is fair. In our example we'll try to verify if a playing die is fair.

If you want to verify the die, you must enter observed and expected frequencies in your GDC and use the χ2 GOF function.

There are two possible methods to do it:


While on a calculator page (scratchpad), press:

menu
 ► Statistics
   ► Stat Tests
     ► χ2 GOF
Observed List:  {8,9,5,9,10,19}
Expected List:  {10,10,10,10,10,10}
Deg. of Freedom, df:  5

              OK Cancel

A dialog box will open. Enter the observed values in the first box and the expected values in the second box. You must write each list in a curly bracket and values must be separated by a comma.

Enter the degree of freedom: df = n − 1. Degree of freedom is equal to number of values minus one (in our example df = 6 − 1 = 5).

After pressing OK button the calculator will display the results. The most important result is the p-value (PVal, probability value).

The other important result is the χ2 value of the observed data. This value is used when the critical χ2 value is given. The null hypothesis must be rejected, when the χ2 of the data is greater than the critical χ2.

χ2 two-way test (chi-squared test of independence)

The χ2 two-way test (or χ2 test of indepenence) is used to verify whether two random variables are independent. In our example we'll try to verify if movie genre preferences are independent from viewer's sex.

If you want to verify the hypothesis, you must enter the data in your GDC. In this case you must use a special type of a table, called a matrix.

As first, you must enter the matrix in your GDC. Find the TEMPLATES button (to the right of number 9, labeled  Templates button) and select the matrix template Empty matrix. Select the correct number of rows and columns (in our example rows = 4, columns = 2). Now you have an empty matrix:
Empty matrix

Type the given values in the matrix. After completing the matrix, store it in the calculator's memory as a variable: press ctrl sto→ and type the name of the variable, a
Empty matrix

Now press:

menu
 ► Statistics
   ► Stat Tests
     ► χ2 2-way
Observed Matrix:  a

              OK Cancel

A dialog box will open.

Enter the name of the matrix (name of the variable where matrix is stored).

After pressing OK button the calculator will display the results. The most important result is the p-value (PVal, probability value).

The other important result is the χ2 value of the observed data. This value is used when the critical χ2 value is given. The null hypothesis must be rejected, when the χ2 of the data is greater than the critical χ2.

Two-sample t test

The two-sample t test is used to verify whether two populations have the same mean or not. We can select a random sample from each population and calculate its mean. However, the sample means are not equal to the population means. Two-sample t test helps us to find out when we can use sample means to determine the relation between the population means.

First, we must state the null hypothesis: "Both population means are equal: μ1 = μ2."

Then we state the alternate hypothesis. We can do it in different ways.

We'll take a look at the ski jumping example: A certain country introduced a new ski jumping technique. Other teams use older techniques. Here are the achievements of the competitors (in meters).

new technique 180, 185, 165, 178, 190, 188
old technique 173, 180, 178, 160, 169, 173, 181, 163

The null hypothesis is: μ1 = μ2.
We are quite convinced that the new technique is better, so we decide to use the one-tailed test and choose the alternate hypothesis: μ1 > μ2.

If you want to verify it, you must enter the data in your GDC and use the 2-Sample t Test function.

There are two possible methods to do it:


While on a calculator page (scratchpad), press:

menu
 ► Statistics
   ► Stat Tests
     ► 2-Sample t Test

First, a small dialog box will appear asking you about the Data Input Method. Leave the answer "Data" and click OK.

List 1:  {180,185,165,178,190,188}
List 2:  {173,180,178,160,169,173,181,163}
Frequency 1:  1
Frequency 2:  1
Alternate Hyp:  Ha: μ1 > μ2
Pooled:  Yes

              OK Cancel

Now a bigger dialog box will open. Enter the values in boxes at List 1 and List  2. You must write each list in a curly bracket and values must be separated by a comma.

Leave frequencies set to 1.

Select the alternate hypothesis. In our case you must select μ1 > μ2, because you are quite sure that values in the first list represent the population with the larger mean.

Select Pooled: Yes. In IB SL you will always have to select this option. This option means that the variances of both populations are equal (or nearly equal).

After pressing OK button the calculator will display the results. The most important result is the p-value (PVal, probability value).


Index

 Index