JMP Ttest Anova Examples
JMP Ttest Anova Examples
1.1
t-Test
Example
In a study, 15 lobsters were randomly selected from recent catches along a certain region of the Maine shore line. The lobsters were weighed to the nearest ounce, with results: Lobster 1 2 3 4 5 Weight 26 13 24 10 19 Lobster 6 7 8 9 10 Weight 14 22 21 12 16 Lobster 11 12 13 14 15 Weight 18 15 29 31 21
Suppose that for research purposes it is needed that the mean lobsters weight equal to 15 ounces. It is known that lobster weight is normally distributed with both mean and standard deviation unknown.
1.2
Procedure
1. Open JMP. 2. Click on New Data Table icon 3. Type your Data. For this case, you only need to type the Weights. 4. Right-clicking select Column Inf, there you can change your column properties: name, data type, etc. Change the default name for Weight and leave Data Type as Numeric (Figure 1)
Figure 1: Data input on JMP 5. On the main menu click on (or select) Analyze >Distribution. A window shows up (Figure 2).
6. On the left side of that window you read Select Column, from there highlight the column you want to analyze: Weight in this case. Then click on Y,Columns icon. Then click on Ok icon. A new window shows up, with a BoxPlot at the top. 7. On the top of the plot you will nd the word WEIGHT. On its left is a red arrow. Click on that red arrow and select Test Mean option (Figure 3). A window is shown up, where the hypothesized value has to be dened. For this example, remember that that value has to be 15. Type 15 there and then Ok.
Figure 3: The window after clicking on the red arrow 8. Read the output. On t-test part read the p-value and conclude (Figure 4). There is an additional issue that is important to point out: On the output you read three dierent p-values. Each one refers to one of the type of hypothesis you are testing. Basically, there are three types (listed on the same order the p-values appear on the output):
Figure 4: The window after clicking on the red arrow (a) H0 = 0 vs H1 = 0 (b) H0 0 vs H1 > 0 (c) H0 0 vs H1 < 0 Based on your chosen null hypothesis, conclude reading the proper p-value from the output.
2
2.1
An animal scientist is interested in comparing two dierent topical treatments (A, B) against osteoarthritis in the leg joints of horses. Seven horses with the illness are available at the animal clinic. For each horse it is randomly determined which of the front legs receives treatment A and which treatment B. After four weeks of treat., the horses mobility is measured. Assuming that they were two independent samples, we can perform our tests.
2.2
Procedure
1. Assuming that you already know how to introduce data into JMP, it is so important to keep the following in mind. Since we need to identify which column is the one that contains the treatment levels, that very column has to be dened as Character Data Type, just right-clicking on the column, and then column inf, as we did in the step 4, in the example above. 2. You have two columns, one contains the treatment levels and another the response. For this example, the response is the Mobility (this variable is continuous). Go to the main menu and click on Analyze >Fit Y by X. A window shows up (Figure 5)
Figure 5: Fit Y by X window 3. Select Mobility column and click on Y,Response icon to dene this column as your response. On the X, Factor icon, place your Trtmnt column as is shown in Figure 5. Then click on the OK button. 4. The ONE WAY ANALYSIS OF MOBILITY BY TRTMNT plot shows up. On its left side is a red arrow. Click on it and choose Mean/Anova/Pooled t, as in Figure 6. And the output window will show up.
Figure 6: After clicking on the red arrow menu. 5. The output is shown up. Read it on the t test part. You can also based your conclusion on the plot above (Figure 7). Keep in mind that your are testing, as you null hypothesis, that those two treatments have the same mean of the response, under the assumption that your data have equal variance (homocedasticity). 3
Figure 7: After clicking on the red arrow menu, the output. 6. If you want to test for equality of variance before doing your t test, just right-click on the red arrow. There the UnEqual Variance option has to be selected. It tests if your variances are all across treatments equal. Read the output. If all of the tests give p-values larger than 5%, do not reject the null hypothesis that states equality of variances. Otherwise reject the null and go ahead with the test without assuming equal variances. How to do it? Again clicking on the red arrow, choose t test option. It perform the two-sampled t-test without assuming equal variances. Read the output and conclude.
3
3.1
Paired t test
Example
Lets consider the last example. Since treatment A and B were both measured on the same horse. Measurements of mobility are not independent within horses. Then the right way to analyze the data is by Paired t test. Idea: we look at the dierence between the response from trts A and B: Di = YiA YiB
3.2
Procedure
1. To perform this analysis, we need to input the data in two columns. One contains treatment A response and so does the other for treatment B (see Figure 8).
2. Go to the main menu. Hit Analyze >Matched Pairs. A window will show up. Select both columns and place them on the Y, Paired Response cell, by clicking on that very button, as in Figure 9. Hit OK button.
Figure 9: Matched Pairs windows 3. The output comes out (Figure 10). Read p-value and conclude. For this example since the pvalue=.0946, we do not reject the null hypothesis that states that D = 0.
4
4.1
One-way ANOVA
Example
An experiment was conducted to study the growth of plant tissue in the presence of hormone solutions containing various growth inhibiting substances. For each solution, 10 independent tissues cultures were prepared and the growth of the plant tissue was recorded in mm. This experiment has one factor and 5 levels. Each has 10 replications.
4.2
Procedure
1. The data input step has to be done in such a way that your data sheet in JMP should look like in Figure 11.
Figure 11: Data in JMP, for one-way ANOVA It is extremely important that your trt column on the data set be dened as Character Data Type, by right-clicking on the column and selecting Column Inf option. 2. On the main menu, click Analyze >Fit Y by X. A window shows up, as in Figure 12. Select and place your response on the proper place and your trt column on the proper place too, just as it is shown in that same gure.
Figure 12: Fit Model windows for one-way ANOVA Click Ok button. 3. As we did before, click on the red arrow, a list of options displays. Select the one you want. The list is shown in Figure 13.
Figure 13: Fit Model windows for one-way ANOVA On this display you will nd a bunch of options you can use. But the most important for this analysis 6
are the Means/Anova, and Compare Means options. From the latter if you click on a second window will show up and a list of mean comparison procedure will come out. The most commonly used is Tukey HSD. Click on this option and read the output. There is also a UnEqual variances option. It performs a test on variances. If your p-value is small you have dierent variances across treatments. Then try a transformation of you data, as we did in the lecture using SAS.
5
5.1
Two-way ANOVA
Example
An educational researcher was interested in the factors noise and solitude as they aect study conditions. Each subject in an experiment was asked to study an essay on American history for 15 minutes and then was tested on a 25 item quiz, the number of correct items being the score. The subjects diered, however, in the conditions under which they were allowed to study Factor Solitude with 2 levels: Alone and not alone (w/stooge). Factor Noise with 3 levels: no noise, soft background music, and loud rock and roll music. There are 3 replication of each treatment combination.
5.2
Procedure
1. Once your data is in JMP, go to the main menu. Click on Analyze >Fit Model. There your analysis can be performed. Select your response and place it on the Y cell and select your categorical variables (factors) and place them on the construct model eect part, and click Run Model. 2. A window shows up. Again look for red arrows. Click on them and you will nd several options you can use during your data analysis. The same analysis we did on the lecture, using SAS, can be performed with JMP just by clicking on those red arrows. Slice analysis can be performed by means of clicking on the red arrow of the interaction part of the window that shown up before, using the Test Slice option. Using the same logic, just clicking the red arrow, you can also create your interaction plots. Look at your output and conclude.
6
6.1
An experiment was performed to examine the eect of time Aging on the strength of cement. From a large number of mixes three cement mixes were randomly selected and six specimens were produced form each mix. After two days three randomly selected specimens from each mix were tested for strength with a load test and the other three specimens were tested after seven days. This is a two-way classication with factor Cement Mix (three levels) and Time (2 levels) The levels of factor Time were predetermined. The three levels of cement mixes were randomly selected from a large number of mixes, thus Cement Mix factor is Random.
6.2
Procedure
1. Once your data is JMP, Click on Analyze >Fit Model . And place your response and regressor on their proper places, as shown in the Figure 14.
Figure 14: Model Specication when Two-way Anova with one Random Factor, is needed. We also need to dene which factor and interactions are random. Figure 14 shows too how to dene a random factor. Highlight the factor you want to make random, and just click on the attributes and select the Random Eect option. Now, just hit Run Model button. 2. A output window will show up. Conclude according with the data results.
7
7.1
MANOVA
Example
7.2
Procedure
1. Once your data is in JMP, follow the same procedure we got for Two-way Anova. The same window will show up. Figure 15 shows what to do to dene that you want a MANOVA type analysis.
Figure 15: MANOVA denition Place your responses and regressors on proper places. Then click on Personality and select MANOVA. Then Click on Run Model button. Go to your red arrow, punch it and see what is on it. 2. Read your output and draw your conclusions.