lecture 5b practice problems
TRANSCRIPT
1 of 20
Statistics 5b_practice.pdf
Michael Hallstone, Ph.D. [email protected]
Lecture 5b: Practice Problems
Practice
Everything that appears in the lecture notes are fair game for the test. They are the best “study guide” I can provide. It is impossible to provide a “list” that is more comprehensive than the lecture notes above. However, here are a few additional practice exercises or practice concepts.
There are also other “practice problems” embedded in the body of the lecture you should do as well. Basically the answers to my examples in the lecture can and should be used as practice problems.
Manual Frequency Distribution Tables
The purpose of this exercise is to learn to create a frequency distribution table by hand. When you are done with this exercise you should be able to:
• create a frequency distribution table using some "raw" data. You will make a table with 4 columns in it: value, frequency (f), percent (%), and cumulative percent (c%). You will first learn to do these by hand and we won’t use SPSS to do it. We learned to run frequency distributions in Exercise 3. If you use the computer to do it, you will only be cheating yourself.
2 of 20
Describing the data we will use
Below I have an SPSS data set with 10 variables. There are also 8 people in the sample (n=8). List of variables:
age: _____ (in whole years)
gender: 1=male 2=female
ethnicity: 1=Asian 2=Polynesian 3=Portuguese 4=Norwegian
westoahu: Are you a West Oahu student? 1=yes 0=no
income: What is your monthly income? _______
yrsed: How many years of education have you completed?_____(in whole years)
stats: I love stats! 1=disagree 2=neutral 3=agree
manystats: How many stats classes have you taken? _______
weight: How many pounds do you weigh?______
tall: How many inches tall are you?________
SPSS data set with showing value labels (same exact data as below)
3 of 20
SPSS data set showing raw numbers (same exact data as above)
Note that in both data sets, which are identical, the data are placed in an array
(smallest to biggest). This will help you create the frequency distribution tables.
• create a frequency distribution table using some "raw" data. You will make a table with four columns in it: value, frequency (f), percent (%), and cumulative percent (c%). You will first learn to do these by hand and we won’t use SPSS to do it. We learned to run frequency distributions in Exercise 3. If you use the computer to do it, you will only be cheating yourself.
• Use the steps outlined in the lecture to create the numbers for each column of the frequency distribution table. 1. Count each category in the variable. 2. Create frequency counts for each category in the variable. 3. Compute percentages for each category in the variable. 4. Compute cumulative percentages for each category of the variable. Use the empty templates below.
4 of 20
Table 1: Frequency Distribution Table of Age (n=8)
value frequency (f) percent (%) cumulative %
Table 2: _________________ of Gender(n=___)
value frequency (f) percent (%) cumulative %
Table __: _________________ of Ethnicity ( ___=___)
value frequency (f) percent (%) cumulative %
5 of 20
T_____ __: _________________ of Are you West Oahu student? ( ___=___)
value frequency (f) percent (%) cumulative %
_____ __: _________________ of Monthly Income ( ___=___)
value frequency (f) percent (%) cumulative %
_____ __: _________________ of Years of Education Completed ( ___=___)
value frequency (f) percent (%) cumulative %
6 of 20
_____ __: _________________ of responses to “I love stats!” ( ___=___)
value frequency (f) percent (%) cumulative %
_____ __: _________________ of How many ______classes taken ( ___=___)
value frequency (f) percent (%) cumulative %
7 of 20
_____ __: _________________ of Weight ( ___=___)
value frequency (f) percent (%) cumulative %
_____ __: _________________ of Height in Inches ( ___=___)
value frequency (f) percent (%) cumulative %
8 of 20
Answers to Frequency Distribution Tables
Table 1: Frequency Distribution Table of Age (n=8)
Table 2: Frequency Distribution Table of Gender (n=8)
Table 3: Frequency Distribution Table of Ethnicity (n=8)
9 of 20
Table 4: Frequency Distribution Table of Are you West Oahu student?
(n=8)
Table 5: Frequency Distribution Table of Monthly Income (n=8)
Table 6: Frequency Distribution Table of Years of Education Completed (n=8)
10 of 20
Table 7: Frequency Distribution Table of Responses to “I love stats!” (n=8)
Table 8: Frequency Distribution Table of Years of How Many Stats Classes Taken (n=8)
Table 9: Frequency Distribution Table of Weight in Pounds (n=8)
Table 10: Frequency Distribution Table of Height in Inches (n=8)
11 of 20
One more practice problem making a Frequency Distribution Tables by hand
Take the following data and make it into a table. The first few rows are done for you as a guide. You may use a calculator. Complete the following table using the raw data below.
• create a frequency distribution table using some "raw" data. You will make a table with five columns in it: value, frequency (f), percent (%), and cumulative percent (c%). You will first learn to do these by hand and we won’t use SPSS to do it. We learned to run frequency distributions in Exercise 3. If you use the computer to do it, you will only be cheating yourself.
RAW DATA FOR VARIABLE AGE: 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9 (n=20)
Below I start the first few age categories for you. You are to finish the table.
Table 1: Frequency Distribution of Age
value frequency (f) percent (%) cumulative %
1 1 5 5 2 2 10 15
12 of 20
“Answer” for Frequency Distribution Table Exercise
Table 1: Frequency Distribution of Age
value frequency (f) percent (%) cumulative %
1 1 5 5 2 2 10 15 3 3 15 30 4 4 20 50 5 3 15 65 6 2 10 75 7 2 10 85 8 2 10 95 9 1 5 100
Example from SPSS
13 of 20
Creating Bar Graphs or Histograms of each of the ten variables.
Recall our ten variables from above
1. age: _____ (in whole years)
2. gender: 1=male 2=female
3. ethnicity: 1=Asian 2=Polynesian 3=Portuguese 4=Norwegian
4. westoahu: Are you a West Oahu student? 1=yes 0=no
5. income: What is your monthly income? _______
6. yrsed: How many years of education have you completed?_____(in whole
years)
7. stats: I love stats! 1=disagree 2=neutral 3=agree
8. manystats: How many stats classes have you taken? _______
9. weight: How many pounds do you weigh?______
10. tall: How many inches tall are you?________
Exercise 1: Would you make a bar chart or a histogram for each of the variables above? Write it down.
Hint: recall we make bar charts for discrete variables and histograms for continuous variables.
14 of 20
Answers to exercise 1
1. age: _____ (in whole years): “in whole years” tells you it’s discrete. Use a bar chart
2. gender: 1=male 2=female: discrete use bar chart 3. ethnicity: 1=Asian 2=Polynesian 3=Portuguese 4=Norwegian discrete use
bar chart 4. westoahu: Are you a West Oahu student? 1=yes 0=no discrete use bar
chart 5. income: What is your monthly income? _______ discrete use bar chart 6. yrsed: How many years of education have you completed?_____(in whole
years) “in whole years” tells you it’s discrete. Use a bar chart 7. stats: I love stats! 1=disagree 2=neutral 3=agree discrete use bar chart 8. manystats: How many stats classes have you taken? _______ there is no
such thing as “half a class taken” so it’s discrete. Use bar chart. 9. weight: How many pounds do you weigh?______ This is a trick question.
The answer depends upon whether or not you consider this variable continuous or discrete. Obviously here I don’t tell you either way, which I would never do on a test. So make a decision. Use a bar chart if it’s discrete and a histogram if it’s continuous.
10. tall: How many inches tall are you?________ This is a trick question. The answer depends upon whether or not you consider this variable continuous or discrete. Obviously here I don’t tell you either way, which I would never do on a test. So make a decision. Use a bar chart if it’s discrete and a histogram if it’s continuous.
15 of 20
Now draw the bar chart or histogram
Recall the frequency goes on the vertical or y axis. Each category of the variable goes on the x or horizontal axis. See the lecture for more hints.
Answers to draw a bar chart or histogram.
Recall, all except possibly the last two are discrete, so we’d use bar charts for those variables.
Figure 1: Bar Chart of Frequency Distribution of Age (n=8)
Figure 2: Bar Chart of Frequency Distribution of Gender (n=8)
16 of 20
Figure 3: Bar Chart of Frequency Distribution of Ethnicity (n=8)
Figure 4: Bar Chart of Frequency Distribution of “Are you a West Oahu Student?” (n=8)
17 of 20
Figure 5: Bar Chart of Frequency Distribution of Monthly Income (n=8)
Figure 6: Bar Chart of Frequency Distribution of Years of Education Completed (n=8)
18 of 20
Figure 7: Bar Chart of Frequency Distribution of Responses to “I love stats!” (n=8)
Figure 8: Bar Chart of Frequency Distribution of How Many Stats Classes
Taken (n=8)
19 of 20
Figure 9: Bar Chart of Frequency Distribution of Weight in Pounds (n=8)
Note I assumed this was a discrete variable
Figure 10: Histogram of Frequency Distribution of Weight in Pounds (n=8)
Note we are assuming it’s now continuous
20 of 20
Figure 11: Histogram of Frequency Distribution of Height in Inches (n=8)
Assuming this is a continuous variable