Math Week1 - Godbero/CUNY-MSDA-Summer2015 GitHub Wiki

Data Science Math: Week 1 Assignment

Please complete exercises 2.1, 2.3, 2.5, 2.7, 2.9, 2.11, 2.13, 2.27, 2.29, and 2.31 = Homework

Please complete and turn in exercises 2.12, 2.14, 2.28, and 2.30 = Assignment

2.6.1 Defining Probability Assignment

2.12 School absences. Data collected at elementary schools in DeKalb County, GA suggest that each year roughly 25% of students miss exactly one day of school, 15% miss 2 days, and 28% miss 3 or more days due to sickness.

a) What is the probability that a student chosen at random doesn't miss any days of school due to sickness this year?

Miss-School = 25 + 15 + 28 = 68%

P(0) = 100 - 68 = 32%

b) What is the probability that a student chosen at random misses no more than one day?

P(≤1) = 32% + 25% = 57%

c) What is the probability that a student chosen at random misses at least one day?

P(≥1) = 25 + 15 + 28 = 68%

d) If a parent has two kids at a DeKalb County elementary school, what is the probability that neither kid will miss any school? Note any assumption you must make to answer this question.

P(0-k1 & k2) = P(0-k1) X P(0-k2) = .322 X .322 = 0.1024

P(0-k1&k2) = 10.24%, if I assume they are independent events

e) If a parent has two kids at a DeKalb County elementary school, what is the probability that that both kids will miss some school, i.e. at least one day? Note any assumption you make.

P(≥1-k1 & k2) = P(≥1-k1) X P(≥1-k2) = .682 X .682 = 0.4624

P(≥1-k1 & k2) = 46.24%, if I assume they are independent events

f) If you made an assumption in part (d) or (e), do you think it was reasonable? If you didn't make any assumptions, double check your earlier answers.

Not the most reasonable assumption, because child behavior is suppose to be influenced by friends and family making these events more likely dependent. If my brother doesn’t miss, I’m probably more likely not to miss.

2.14 Weight and health coverage, Part I. The Behavioral Risk Factor Surveillance System (BRFSS) is an annual telephone survey designed to identify risk factors in the adult population and report emerging health trends. The following table summarizes two variables for the respondents: weight status using body mass index (BMI) and health coverage, which describes whether each respondent had health insurance.

a) If we draw one individual at random, what is the probability that the respondent is overweight and doesn't have health coverage?

P(O & No) = 15,327/428,638 = .0358 = 3.58%

b) If we draw one individual at random, what is the probability that the respondent is overweight or doesn't have health coverage?

P(O or No) = P(O) + P(No) – P(O & No) = 157,026/428,638 + 44,837/428,638 – 15,327/428,638

P(O or No) = .3663 + .1046 - .0358 = .4351 = 43.5%

2.6.3 Sampling from a Small Population Assignment

2.28 Socks in a drawer. In your sock drawer you have 4 blue, 5 gray, and 3 black socks. Half asleep one morning you grab 2 socks at random and put them on. Find the probability you end up wearing

a) 2 blue socks

P(blu1, blu2) = 4/12 X 3/11 = 12/132 = 0.091 = 9.1%

b) no gray socks

P(No-g1,No-g2) = 7/12 X 6/11 = 7/22 = 0.318 = 3.18%

c) at least 1 black sock

P(No-bla1, No-bla2) = 9/12 X 8/11 = 6/11 = 0.545 = 54.5%

P(1-black) = 1 – 0.545 = 0.454 = 45.4%

d) a green sock

P(green) = 0/12 = 0 = 0%, there are no green socks

e) matching socks

P(blu1, blu2) = .091

P(g1, g2) = 5/12 X 4/11 = 5/33 = .152

P(bla1, bla2) = 3/12 X 2/11 = 2/44 = .045

P(matching) = P(blu1, blu2) + P(g1, g2) + P(bla1, bla2) = 0.288 = 28.8%

2.30 Books on a bookshelf. The table below shows the distribution of books on a bookcase based on whether they are nonfiction or fiction and hardcover or paperback.

a) Find the probability of drawing a hardcover book first then a paperback fiction book second when drawing without replacement.

P(h-any, p-f) = 28/95 X 59/94 = 1,652/6,110 = 0.270 = 27%

b) Determine the probability of drawing a fiction book first and then a hardcover book second, when drawing without replacement.

There are 2 ways this could happen: paper fiction 1st & any hardback 2nd or hardback fiction first & any remaining hardback 2nd, which changes the number of hardbacks

P(p-f, h-any) = 59/95 X 28/94 = 1,652/8,930 = 0.185

P(h-f, h-any) = 13/95 X 27/94 = 351/8,930 = 0.039

P(any-f, h-any) = P(pf, hany) + P(hf, hany) = 0.185 + 0.039 = 0.224 = 22.4%

c) Calculate the probability of the scenario in part (b), except this time complete the calculations under the scenario where the first book is placed back on the bookcase before randomly drawing the second book.

P(any-f, h-any) = 72/95 X 28/95 = 2,016/9,025 = 0.223 = 22.3%

d) The final answers to parts (b) and (c) are very similar. Explain why this is the case.

Our book states: “When the sample size is only a small fraction of the population (under 10%), observations are nearly independent even when sampling without replacement.” This calculation seems to show that is true.