This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1Statistics 13Lab 3Professor: Mahtash EsfandiariThe objective of this lab is to:1) Allow you to construct side by side dotplots, boxplots, histograms, and interpret theresults.2) Make frequency tables (also referred to as contingency tables) of two categoricalvariables and interpret the results.3) Sort a data set by a categorical variable, construct, and compare histograms andboxplots for different levels of the categorical variable.Activity 1 for objective 1For objective 1 we will use the blood pressure dataset. This data set is about 15 patientswho take the same dose of a medication called catorpill and their systolic blood pressurewas measure before and after taking the medicine.Download this data set by typing:Command: infile before after usingwww.stat.ucla.edu/~rgould/datasets/bloodpressure.rawNotice that this data set is in "raw form" and not dta.1.1 Identify the variables of the study and indicate how you would classify them(continuous, discrete, categorical, or ordinal).1.2 Compare the distribution of the before and after drug systolic blood pressure by doinga side by side dotplot and boxplot.Command: dotplot var1 var2 (dotplot before after)graph var1 var2 box (graph before after, box)1.3 Based on the design used and the plots created, can you conclude the catropill is aneffective drug for lowering the blood pressure. Explain.Activity 2 objective 2For this part we will use a data set that was collected from Prof. Gould's Stats M12course in Spring 2000. Students were asked seven questions:1) Gender (m/f)2) Height (inches)3) Weight (pounds)4) Do you smoke? (yes == 1, no == 0)5) Who do you want for President? Bush, Gore, other.6) Rate your math ability: (1,2,3,4,5) 1 is much below average, 3 is average, 5 is muchabove average7) Rate your math anxiety; 1 is much below average, 3 is averageThe variable labels cannot be more than eight letters.2Download this data set from the Web:Command: use http://www.stat.ucla.edu/~rgould/datasets/m12s00.dtaNotice that his dataset is in the dta formWe want to build a frequency table for gender by president. Gender has two levels maleand female and president has three levels including Gore, Busch, and others. You canbuild this table by the following commands and answer the above questions based on thedata found. Notice that the table will also give you the missing data.Command: tabulate president gender, column row cell2.1 Use the resulting frequency table to answer the following questions:2.1.1 What is the proportion of women who will vote for Gore?2.1.2 Are women more likely to vote for Gore or Busch?2.1.3 Are men more likely to vote for Gore or women?2.1.4 Take the cells in the table and represent them as a sample space with anassociate probability distribution.2.2 Run the relevant analysis and answer the following questions:2.2.1 Given that the person is a female, what is the probability that she smokes.2.2.2 Do a tree diagram for the data as it is done on page 171 of the book.2.2.3 Can you conclude that smoking and gender are independent of each other?Explain.Activity 3 part 33.1 How does weight for men compare with weight for women? We will createside by side histograms to answer this question?For objective 3 we will use the same data sets that we used for objective 2. We want toanswer the following question:I order to do so, we need side by side histograms of weight for men and women. We firstneed to sort the data by gender and then create the relevant histograms.Command:sort gendergraph weight, histogram by (gender)You will notice that by default stata will give you a histogram with 5 bins. If you wantedto have 10 bins, you will change the following command as follows:Commands for creating histograms with 10 bins:sort gendergraph weight, histogram by(gender) bin(10)Command for creating the histogram for the whole group and by gender:sort gendergraph weight, histogram by(gender) bin(10) total33.2 How do men and women compare with respect to math anxiety? We will createside by side boxplots to answer this question:Commands:Sort by genderGraph mathanxi, box by (gender)Computer part of homework 3. Hand in the following along with the problemsassigned from the text for homework


View Full Document

UCLA STATS 13 - Lab 3

Documents in this Course
lab8

lab8

3 pages

lecture2

lecture2

78 pages

Lecture 3

Lecture 3

117 pages

lecture14

lecture14

113 pages

Boost

Boost

101 pages

Noise

Noise

97 pages

lecture10

lecture10

10 pages

teach

teach

100 pages

ch11

ch11

8 pages

ch07

ch07

12 pages

ch04

ch04

10 pages

ch07

ch07

12 pages

ch03

ch03

5 pages

ch01

ch01

7 pages

ch10

ch10

7 pages

Lecture

Lecture

2 pages

ch06

ch06

11 pages

ch08

ch08

5 pages

ch11

ch11

9 pages

lecture16

lecture16

101 pages

lab4

lab4

4 pages

ch01

ch01

7 pages

ch08

ch08

5 pages

lecture05

lecture05

13 pages

Load more
Download Lab 3
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 3 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 3 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?