Stat 2000: Tips for Assignment 2

Published: Sun, 01/25/15

My Midterm Exam Prep Seminar for Stat 2000 is Saturday, February 28.   It costs $40, which you pay at the door.
Midterm Exam Prep Seminar for Stat 2000
$40, pay at the door
Saturday, February 28
9:00 am to 6:00pm
Room 100, St. Paul's College, UM

Click here to register for the seminar (you pay at the door).
Did you read my tips on how to study and learn Stat 2000?  If not, here is a link to those important suggestions:
Did you read my Calculator Tips?  If not, here is a link to those important suggestions:
Did you see my tips for Assignment 1? Click here.
Tips for Assignment 2
Study Lessons 4 and 5 in my study book (if you have it) to learn the concepts involved in Assignment 2.  Remember my advice in the tips above.  Don't start working on the assignment too soon.  Study and learn the lesson first, and use the assignment to test your knowledge.  Of course, always seek out assistance from my book, your course notes, etc. if you ever hit a question you don't understand, but try not to be learning things as you do an assignment.  Learn first, then put your learning to the test.

Exception: Always do any JMP stuff open-book.  Have my tips in front of you, and let me guide you step-by-step through any JMP stuff.  JMP is just "busy" work.  The sooner you get it done and move on to productive things like understanding the concepts and interpreting the JMP outputs, the better off you will be.

Don't have my book or audio lectures?  You can download a free sample of my book and audio lectures containing Lesson 3:
A Warning about StatsPortal
Make sure that you are using Firefox for your browser.  Don't even use Internet Explorer.  It actually also has some glitches in the HTML editor boxes.

Do note that every time you exit a question in StatsPortal, the next time you return to it, the data may very well change.  Do not press the "back-up" button on your browser in a question.  That, too, will change the data.  When you are prepared to actually do a question, open the link, keep it open, and do not close it until you have submitted your answers.  Be sure to press "Save Answers" once you have done any calculations and entered any information to ensure the data does not change and force you to start over again.

After you submit the answer to a question, if you have been marked wrong on any parts, be sure that you write down the correct answers before you exit the screen (or grab a screen shot).  To try a second attempt at the question do not click the link to the question again, that will change the data and you will have to start all over again.  Also, DO NOT click "try again" or make a "second attempt."  That will also reset the data.

Instead, exit back to the home screen where they show the links for all the different questions on the assignment.  Where it shows the tries for a question on the right side of your screen, you should see the "1" grayed out, showing that you have had 1 attempt.  Click the number "2" to get your second attempt with the same data.  That way you can enter the answers you already know are correct and focus on correcting your mistakes.

You should also have already downloaded the JMP statistical software which was provided with either one of the course options for StatsPortal as mentioned in your course outline.

Make sure you have gone through Assignment 0 completely to learn how to use the interface.  I also suggest you print out a copy of question 8 in Assignment 0 (Long Answer Questions - Part 3) so that you have the steps for saving and uploading files into the HTML editor in front of you.
Question 1: Gas Prices
Note that you will be using Table D for this and other questions on this assignment.  Be sure to download it from the resources section in StatsPortal, or here is a link:

It is quite obvious that this is a matched pairs problem.  Very similar to my questions 1 and 2 in Lesson 4

Be sure that, when you enter the P-value in part (e), put the smaller P-value in the left box, and the larger in the right box.  For example, if Table D tells you that your P-value is between .10 and .05, enter .05 in the first box, and .10 in the second. 

Be sure to put the smaller bound in the first box for every P-value in this entire assignment (and all future assignments, for that matter).

Note that the A and B scores in a matched pair are dependent, not independent.  However, each pair is independent of other pairs.

Question 2: Caffeine
This is obviously a two-sample problem like my questions 4 and 5 in Lesson 4.  Be sure you use the Rule of Thumb to decide whether you will use the pooled method or the unpooled method.

NOTE, in part (b), they tell you to do "Pepsi - Coke" which suggests they want you to consider Pepsi (the second set of data scores) as your First Sample, and Coke, (the first set of scores) as your second sample.  Make sure you are doing Pepsi - Coke when computing the confidence interval and when performing your hypothesis test in part (c) as well.  Otherwise, you could get marked wrong.

Note that you are to do parts (a) through (d) by hand using the appropriate formulas and tables.  You will also be able to check your answers to a large extent with the JMP output you produce in part (e).

Make sure you use the values you have been given for the means and standard deviations.  Do not use your stat mode in the calculator.  It will be too precise.

To do the JMP:

The key thing to understand is that you will type all the scores down the first column.  Double-click Column 1 and give it a name that describes the variable both scores are measuring.  Here, that is Caffeine.  Type all the Caffeine scores for Coke down Column 1, and then continue to type all the Caffeine scores down Column 1 for Pepsi.  That means you should have a total of 12 rows when you are done.  Be careful, don't accidentally enter the means or standard deviations as data.

Now double-click the region at the top to the right of Column 1 to create a new column.  Call that column Drink and type Coke repeatedly down column 2 in all 6 rows that have Coke scores in Column 1.  Then type Pepsi in the rest of the rows. I suggest you type your first word, then copy and paste it in all the other relevant cells in Column 2, then type your second word and copy and paste it to ensure there are no typos.

Thus, I would have two columns of data.  The first column shows all the numerical data scores (all the Caffeine scores) and the second column labels the data in the first column telling me which group the scores belong to (Coke or Pepsi).

Right-click Column 1 and select "Column Info" and confirm that its Data Type is Numeric and its Modeling Type is Continuous, changing the settings if necessary.  Right -click Column 2 and select "Column Info" and confirm that its Data Type is Character and its Modeling Type is Nominal, changing the settings if necessary.

Now select "Analyze, Fit Y By X".  Select Caffeine and click "Y, Response" and select Drink and click "X, Factor".  Click OK. 

You will see a graph with dots plotted representing all the scores in two columns.  If you don't see two columns of dots for the two samples, you have not labelled your data correctly!   Close the screen and go back to your data table.  Follow my steps above to right-click each column and select Column Info, and make sure that the Data Type for Caffeine is Numeric and its Modeling Type is Continuous, changing the settings if necessary.  Repeat for Drink, and confirm that its Data Type is Character and its Modeling Type is Nominal, changing the settings if necessary.

Once you have the graph showing the vertical array of dots for your two samples, you are ready to analyze the data.

Click the red triangle and select "Means and Std Dev" to get a summary of the means and standard deviations.   Look at the standard deviations in this output and use your Rule of Thumb to decide if you wish to use the pooled test or conservative (unpooled) test.  Of course, these values for the mean and standard deviations should match what you were given at the start (if rounded accordingly).

Click the red triangle and select "Display Options" and select "Box Plots" if they have requested side-by-side boxplots (not requested for this question). 

Click the red triangle and select "Means/Anova/Pooled t" to get JMP to do the pooled two-sample t test.  Click the red triangle again and select "t-Test" to get JMP to do the generalized two-sample t test (not pooling). You will note that, when JMP does the pooled t-test, it says, under the "t Test" title bar, "Assuming equal variances."  When JMP does the generalized t-test, it says, under the "t Test title bar, "Assuming unequal variances."


Look carefully at the JMP printouts to confirm if it is doing "Pepsi - Coke" like you did earlier in the question.  I  believe it will do so.  If, however, it is doing "Coke - Pepsi", note that that is fine, too.  But that would mean everything is backwards.  The confidence interval limits will have the wrong signs, and be the wrong way around.  The test statistic will have the wrong sign.  Finally, the P-value for an upper-tailed test would now be the P-value for a lower-tailed test.

JMP does not know whether you are doing an upper-tailed, lower-tailed or two-tailed test, so it gives you the P-value for all three.  You have to be clear yourself what the alternative hypothesis is, and therefore which of the three P-values are correct. 

That should be pretty obvious from part (c).
Question 3: Toothpaste
Just like question 2 above.  Obviously, name the columns differently in JMP, following their instructions.  Here, they are at least not doing anything sneaky with which variable is 1 and which is 2.
Question 4: Interpretations
Make sure you press HTML Editor before you type anything in the box.  I teach you how to interpret confidence intervals in Lesson 1 and how to interpret P-values in Lesson 2.  Be careful though, those were interpretations for confidence intervals or P-values for the mean.  Now you are interpreting for the difference between two means or the mean difference in matched pairs, so be careful in your wording.
Question 5: Energy Consumption
Note that you will be using Table E for this and other questions on this assignment.  Be sure to download it from the resources section in StatsPortal, or here is a link:

This is very similar to my questions 3 and 4 in Lesson 5

Again, put the lower of the two bounds for your P-value in the first box for part (c) and put the upper bound in the second box.

Also make sure you read my section about Confidence Intervals in Anova in question 5 of that lesson before you answer part (g).
Question 6: Driving Distances
This is an Anova question. It is very similar to my questions 1 and 2 in Lesson 5

In part (d), when they ask for the values of ni, all they mean is tell them what n1 equals, n2 equals, n3 equals, etc..

This question should be done by hand (i.e. with your calculator, not with JMP ).  You will need to compute the five means and standard deviations first, to compute everything yourself, just as I do in my question 1.  I suggest you round off the answers for the means and standard deviations to four decimal places since you have not been given any other direction.  You do not have to show your work for these calculations, just give them a quick summary of what the five means and five standard deviations are.

Personally, I would not compute the means and standard deviations even with my Stat mode on my calculator.  I would let JMP do it for me (see below).  I am very surprised that they did not already compute the means and standard deviations for you.

Once you know the means and standard deviations, follow my examples to compute the overall mean, SSG, MSG, SSE, SSE, and the F statistic as I illustrate in my questions 1 and 2.

You will then be able to check your answers when you use JMP.  Note that your answers may be slightly different than JMP's since you have used rounded off values for the means and standard deviations.

Make sure you click HTML Editor before you type any of your answers into the box they provide.  When you answer parts (e), (f) and (g), you may want to use the math writing icon, but good luck.  It is awfully clunky and quite slow and frustrating.

Personally, I would just write it in text like this, "SSG = 5(16-30) + 4(12-30) + ..." (I am making up those numbers.)  Then MSG = SSG/DFG = 51/2 = etc.

To summarize the results in your ANOVA table in part (h) , just use the "Tab" key to separate the columns in the table if you want as you type the values into the HTML Editor box.  Or, copy and paste the ANOVA table JMP makes for you (of course, JMP better have come up with the same numbers you did by hand, although there may be some discrepancy due to the rounding off that was done to the given means and standard deviations).

To do ANOVA with JMP:
The key thing to understand is that you will type all the scores down the first column.  Double-click Column 1 and name it Distance.  Then type all the A scores down the column, then all the B scores, then all the C, D, and E scores.  You should have 26 rows when all the scores have been entered in.

Then create Column 2 and name the column Brand.  Type A repeatedly down column 2 in all six rows that have A scores in Column 1.  Then type B for the appropriate cells in column 2 and type C, then D, and finally E for the rest of the rows.

Thus, I would have two columns of data.  The first column shows all the numerical data scores (all the driving distances) and the second column labels the data in the first column telling me which brand the golf balls driven belong to.

Right-click Column 1 and select "Column Info" to confirm that its Data Type is Numeric and its Modeling Type is Continuous, changing the settings if necessary.  Right-click Column 2 and select "Column Info" to confirm that its Data Type is Character and its Modeling Type is Nominal, changing the settings if necessary.

Now select "Analyze, Fit Y By X ".  Select Column 1 and click "Y, Response" and select Column 2 and click "X, Factor".  Click OK.  You will see a graph with dots plotted representing all the distances in five columns, one column of dots for each brand.  If you don't see this graph at all, you did not label your columns properly.  Go back and make sure Column 1 is Numeric and Continuous and Column 2 is Character and Nominal.

Click the red triangle and select "Display Options" and select the "Box Plot " to get the side-by-side boxplots they request. Click Display Options again and deselect Show Points and Grand Mean to remove those things from the graph as they request.

DON'T CLOSE THIS WINDOW SHOWING THE BOXPLOTS EVEN AFTER YOU HAVE UPLOADED THEM.   YOU STILL HAVE MORE JMP WORK TO DO.

Upload the boxplots into the HTML Editor box:

  • If you are using Windows:
  • Press "Alt" on your keyboard or click the thin blue line that is near the top of the window to get the toolbar icons to appear.  Select "File" then "Save As" to get a pop-up window.  Type in whatever name you want the file to have in the "File name" section. Click the "Browse Folders" arrow and select which folder you want to save the file in (I suggest you select "Desktop" so that the file will just appear right on your desktop home screen).  Finally, click the drop down arrow in the "Save as type" section and select "JPEG File".  Click "Save".  You should now have your file ready to upload into the assignment.
  • To upload your file into the text box they provide: Click "HTML editor" below the text box (if you have not already done so) to make a toolbar appear in the text box.  Click the toolbar option called "Link" and select "Image."  In the pop-up window that appears, click the button called "Find/Upload File" (it is at the bottom of the pop-up window, you may have to enlarge the box or scroll down to see it).  Click the "Browse" button and find the histogram file you just saved.  Either double-click that file or select it and click "Open" and you should see the path to that file appear in the Browse box.  Click "Upload File" and its name should appear in the "Uploaded Files" pop-up window.  Select the file in the list of "Uploaded Files" to highlight it and click OK and you should see the file appear in the text box. 

  • If you are using Apple/Mac:
  • You will need to take a screen shot of your output in order to upload it.  To take a screen shot hold down Command+Shift+4 and drag the cross-hairs over the image to capture it.  The image will save a .png file to your desktop by default.
  • To upload your file into the text box they provide: Click "HTML editor" below the text box (if you have not already done so) to make a toolbar appear in the text box.  Click the toolbar option called "Link" and select "Image."  In the pop-up window that appears, click the button called "Find/Upload File" (it is at the bottom of the pop-up window, you may have to enlarge the box or scroll down to see it).  Click the "Browse" button and find the histogram file you just saved.  Either double-click that file or select it and click "Open" and you should see the path to that file appear in the Browse box.  Click "Upload File" and its name should appear in the "Uploaded Files" pop-up window.  Select the file in the list of "Uploaded Files" to highlight it and click OK and you should see the file appear in the text box.

Now, return to your Boxplots window to complete the ANOVA work for part (k).  This will also allow you to check the work you did by hand earlier.

Click the red triangle and select "Means and Std Dev" to get a summary of the means and standard deviations.  Confirm that JMP computed the same means and standard deviations for each city that you were given at the start of the question.  Click the red triangle and select "Means/Anova/Pooled t" to get JMP to do the Anova.  Confirm that JMP's values match your computations (allowing for minor differences due to rounding issues).  When satisfied that no mistakes have been made, upload the ANOVA from JMP following the usual upload steps as listed above.

Note, in part (l), they want the F decision rule based on your F* critical value.