2TwoGroupsfull

.pdf
This is a preview
Want to read all 33 pages? Go Premium today.
View Full Document
Already Premium? Sign in here
Comparing Two Groups Reading Oehlert: Chapter 2.4 Gerber & Green: Chapter 2.1-2.2, 2.4, 2.6 1 Anchoring and Bird Calcium We will start by discussing very simple experiments with one condition of interest that has two possible states/treatments. To make our discussion concrete, we take two case studies: 1. Anchoring Students in our class were given one of two questionnaires and asked to estimate the percentage of countries in the UN that are located in Africa. The questions are nearly identical, except that one version first asked if the percentage was above 11 and the other asked if it was above 73. The expectation is that those with the higher number would provide higher values for the answer to the second question on the survey. This phenomenon is called anchoring. Identify the condition and the units. Condition is value of anchoring. Units are students in 158; or more broadly students with math background at UC, Berkeley, etc. What is the response? Response=student's estimate of % African countries in UN. 2. Bird Calcium For many animals, the body's ability to use calcium depends on the level of certain hormones in the blood. The following data set looks at the relationship Pimentel, Stat 158 #2, Fall 2023 1
between hormone supplement (present or absent) and level of calcium in the blood. The subjects were 10 female birds. Half were chosen at random to get a hormone supplement and the other half did not. What is the response and what is the condition? Response=Level of calcium in blood. Condition=hormone level. Imagine the question was being posed in humans. What would an observational study to answer this question look like? One population takes hormone supplement. Another doesn't. Sample from pop- ulation. What considerations need to be addressed? Since population that takes supplement may be very different, want other characteristics (age, SES, health, etc.) to be the same. Before describing general principles of design and analysis for two-group experi- ments, we will take a look at these two datasets. 1.1 Anchoring Experiment Load in the data: > names (anchor) ## [1] "Anchor" "Higher" "Guess" > anchor[ 1 : 4 ,] ## Anchor Higher Guess ## 1 73 0 10.00 ## 2 11 1 25.00 ## 3 11 0 6.50 ## 4 73 0 27.83 > summary (anchor) Pimentel, Stat 158 #2, Fall 2023 2
## Anchor Higher Guess ## Min. :11.00 Min. :0.000 Min. : 0.00 ## 1st Qu.:11.00 1st Qu.:0.000 1st Qu.:15.00 ## Median :11.00 Median :0.000 Median :25.00 ## Mean :41.24 Mean :0.439 Mean :24.98 ## 3rd Qu.:73.00 3rd Qu.:1.000 3rd Qu.:30.00 ## Max. :73.00 Max. :1.000 Max. :90.00 > class (anchor $ Anchor) ## [1] "integer" > class (anchor $ Guess) ## [1] "numeric" > anchor $ Anchor <- factor (anchor $ Anchor, c ( 11 , 73 ), labels = c ( "X=11" , "X=73" )) > summary (anchor) ## Anchor Higher Guess ## X=11:21 Min. :0.000 Min. : 0.00 ## X=73:20 1st Qu.:0.000 1st Qu.:15.00 ## Median :0.000 Median :25.00 ## Mean :0.439 Mean :24.98 ## 3rd Qu.:1.000 3rd Qu.:30.00 ## Max. :1.000 Max. :90.00 Notice that I change the anchor type to be a factor in R. This makes our analysis easier to carry out in R. There is not a lot of data here, so we can just look at all the data. How would you compare the two groups? What numeric and visual comparisons would you make? > summary (anchor $ Guess) > tapply (anchor $ Guess, anchor $ Anchor, summary) Pimentel, Stat 158 #2, Fall 2023 3
Why is this page out of focus?
Because this is a Premium document. Subscribe to unlock this document and more.
Page1of 33
Uploaded by BaronTurkeyMaster854 on coursehero.com