This is a fairly short data set, as we need to make sure we are ready for the midterm.
Monday, Tuesday, and Wednesday will be devoted to a data set encompassing ALL of what we've done so far in class. A lot of it will be derived from old data sets, and could be questions that make you think a little bit more.
your written midterm will be on Thursday. I will encompass what we've done, including the math, the r code and questions about how to think about the data. It will be long, but quite complete able in 90 minutes.
Question One: Discrimination:
22 people are applying for a job; 12 are males and 10 are females. There are three openings for the job, and all three are filled with females. The men claim they are being discriminated against.
Assume all candidates were equally qualified and management, not know what to do, picked three names out of a hat.
Using the code we talked about yesterday, see if you can figure out how to run a simulation of this situation (hint: you might make males one number and females another number). Run the simulation 100 times.
a) how many out of those 100 times were ONLY females picked?
b) how many times out of those 100 were ONLY males picked?
c) compare your answers to those of other groups before you proceed to part d. (this should be at least three other groups
d) based on this randomness, do you think there is discrimination happening? Explain fully.
Question Two: The Lottery.
So here's a game:
a) pick a number from 0-9 (there's 10 choices there). That is your lucky number.
b) create a list of 100 numbers 0 through nine
* sample(0:9,100,replace=T) ##this will put the number back in so it can get picked again
c) for each time your number showed up, give yourself $9. for each other number, you lose $1.
d) how much money did you make?
e) what number showed up the most? how many times?
f) which number shows up the least? how many times?
g) run the simulation again, picking either the number that showed up the least or the most. EXPLAIN the choice of either the one that showed up the most or the least.
h) did you make money the second time?
i) in a brief paragraph, explain the point I'm trying to make.
j) if we played the game 10,000 times instead of 100 times, do you think you would make more or less money? explain your reasoning.
Part Three: Random participants.
Below is a list of 50 people generated at http://listofrandomnames.com/index.cfm?generated .
Names in blue are male.
Names in red are female.
a) Use r to select 10 people from this list. Show all code and explain how it happened.
b) What is the percentage of males in this population of 50?
c) What is the percentage of males in your sample?
d) Is your sample a good cross section of the 50 in the population? How do you know?
Maurice Precourt
Tomi Rayner
Keena Hadden
Margarito Heyd
Eboni Cedillo
Willodean Huskey
Candra Voorhis
Sudie Ferrin
Johnathon Sennett
Bridgett Heinz
Hilaria Bergerson
Sibyl Andry
Demetra Seaberg
Carter Lauver
Katy Viviano
Gilbert Morton
Irwin Durbin
Golda Mceachern
Ayana Speck
Raymond Byron
Kimberly Tipps
Chandra Schmitz
Melani Dimery
Palmira Lamarr
Awilda Beauchemin
Ulysses Cassette
Jermaine Rodarte
Kena Hougland
Corrin Sick
Frieda Aultman
Angela Obermiller
Alla Howser
Viola Rushin
Marguerita Grimaldi
Ashlea Riggan
Valery Greenly
Basilia Gaston
Wendi Stroble
Quyen Cadena
Toni Ehrmann
Teisha Lightfoot
Odilia Monge
Denita Pelkey
Ammie Calbert
Shirlee Etzel
Reyna Mansell
Desire Hutchings
Kiara Dole
Angelica Leroux
Jina Beesley