0
4/36 (2,3), (3,2), (1,4), (4,1)
1/36 (6,6)
The American Community Survey is an ongoing survey that provides data every year to give communities the current information they need to plan investments and services. The 2010 American Community Survey estimates that 14.6% of Americans live below the poverty line, 20.7% speak a language other than English (foreign language) at home, and 4.2% fall into both categories.
No they are not - they are not disjoint, where 4.2% fall into both categoreis according to The American Community Survey.
## Loading required package: grid
## Loading required package: futile.logger
#load the data
survey_df <- c("below poverty line" = 0.146, "speaks other languages" = 0.207, "both" = 0.042)
survey_df
## below poverty line speaks other languages both
## 0.146 0.207 0.042
# drawing the diagram
grid.newpage()
draw.pairwise.venn(area1 = 0.146, area2 = 0.207, cross.area = 0.042, category = c("below poverty line", "speaks other languages" ),
fill = c("skyblue", "pink1"),
alpha = rep(0.5, 2),
cat.pos = c(0, 0),
cat.dist = rep(0.025, 2),
scaled = FALSE)
## (polygon[GRID.polygon.1], polygon[GRID.polygon.2], polygon[GRID.polygon.3], polygon[GRID.polygon.4], text[GRID.text.5], text[GRID.text.6], text[GRID.text.7], text[GRID.text.8], text[GRID.text.9])
10.4%
## [1] 31.1
## [1] 68.9
# If A and B represent events from two different and independent processes, then the
# probability that both A and B occur can be calculated as the product of their separate probabilities:
# P (A and B) = P (A) × P (B)
# P(below poverty line & speaks foriegn language)
0.042 == 0.146 * 0.207
## [1] FALSE
since the two side have different values, so they are not independent.
Assortative mating is a nonrandom mating pattern where individuals with similar genotypes and/or phenotypes mate with one another more frequently than what would be expected under a random mating pattern. Researchers studying this topic collected data on eye colors of 204 Scandinavian men and their female partners. The table below summarizes the results. For simplicity, we only include heterosexual relationships in this exercise.
table
# P(male with blue eyes | female with blue eyes)
# (total male + total female) - common criteria / total population
((108 + 114) - 78) / 204
## [1] 0.7058824
## [1] 0.6842105
## [1] 0.3518519
## [1] 0.3055556
## [1] FALSE
No, they are not independent because the two process are not independent from each other. and because both sides of the multiplication rule are not equal to each other.
The table below shows the distribution of books on a bookcase based on whether they are nonfiction or fiction and hardcover or paperback.
table2
## [1] 0.1849944
## [1] 0.2257559
## [1] 0.2233795
They are simillar to each other because the possible events are considerable large so the outcome will not be affected by much.
An airline charges the following baggage fees: $25 for the first bag and $35 for the second. Suppose 54% of passengers have no checked luggage, 34% have one piece of checked luggage and 12% have two pieces. We suppose a negligible portion of people check more than two bags.
## [1] 15.7
## [1] 25.387
## [1] 1884
## [1] 278.1007
The relative frequency table below displays the distribution of annual total personal income (in 2009 inflation-adjusted dollars) for a representative sample of 96,420,486 Americans. These data come from the American Community Survey for 2005-2009. This sample is comprised of 59% males and 41% females.
table3
gender_income <- data.frame(income = c("1-9,999 or loss", "10,000-14,999", "15,000-24,999", "25,000-34,999", "35,000-49,999", "50,000-64,999", "65,000-74,999", "75,000-99,999", "100,000 or more"), total = c(0.022, 0.047, 0.158, 0.183, 0.212, 0.139, 0.058, 0.084, 0.097))
counts <- barplot(gender_income$total)
axis(1, at = counts, labels = gender_income$income)
The distribution is unimodal and symmetric centered at 35,000-49,999 (Peak point).
## [1] 0.62
## [1] 0.2542
Assuming 59% males and 41% females distributed evenly across all income levels.
71.8% is a big difference from 25.42% I obtained from part (c), therefore the assumption that male and female proportions are distributed evenly across all income levels is not valid.