This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
“3.6.2 In the United States, 42% of the population has type A blood. Consider taking a sample of size 4. Let Y denote the number of persons in the sample with type A blood. Find:
There are 2 ways of doing this operation: i) The first is to either state that an individual does or does not have type A blood type (thus making this operation binary; 1 = Yes, 0 = No). ii) The second way is to determine the probability of each blood type based on alleles (by way of a probability tree). Since blood type is confered by two copies of any of multiple alleles (i^A, i^B, i^O) then this prompt lacks the information to answer this question by way of the 2nd mehtod.
The question subset below will be answered via the 1st way (having (=1) or not having (=0) type A blood)."
# (a) What is the probability that none of the 4 individuals in our sample group have type A blood type. Answer --> 0.113165 ~ 11.32%
dbinom(0, size = 4, prob = .42)
## [1] 0.113165
# (b) What is the probability that 1 of the 4 individuals in our sample group have type A blood type. Answer --> 0.3277882 ~ 32.78%
dbinom(1, size = 4, prob = .42)
## [1] 0.3277882
# (c) What is the probability that zero up to 2 individuals individuals in our sample group have type A blood type. Answer --> 0.7969989 ~ 79.7%
dbinom(0, 4, .42) + dbinom(1, 4, .42) + dbinom(2, 4, .42)
## [1] 0.7969989
##The other option would be to use the cumulative probability funciton to this binomial distribution.
pbinom(2, 4, .42)
## [1] 0.7969989
# (d) What is the probability that greater than zero but up to 2 individuals individuals in our sample group have type A blood type. Answer --> 0.68383399 ~ 68.4%
dbinom(1, 4, .42) + dbinom(2, 4, .42)
## [1] 0.6838339
“3.6.7 Construct a binomial setting (different from any examples presented in this book) and a problem for which the following is the answer: 8 (Choose) 3 (0.8)^3 (0.2)^5
In Binomial settings, there are two possible outcomes per attempt. This is at times referred to a “coin toss” outcome.
In this case we can say that out of 8 attempts 3 resulted in the desired outcome. The probability that something would take place is equal to 80% (=0.8) as indicated by the exponent of 3. The probability that something would take place is equal to 20% (=0.2) as indicated by the exponent of 5.
An example of this binomial setting could be that of: A dart-master having an 80% probability of making a bullseye when blindfolded. What is the probability that this dart master will hit 3 bullseyes while having 8 shots?"
“3.S.10 Refer to the blood pressure distribution of Exercise 3.S.9. Suppose four men are selected at random from the population. Find the probability that (a) all four have blood pressure higher than 140 mmHg (b) three have blood pressures higher than 140, and one had blood pressure 140 or less.”
#(a) Determine the probability that all 4 individuals have BP > 140 mmHg. Answer --> 0.02085136 ~ 2.08%
dbinom(4, size = 4, prob = .38)
## [1] 0.02085136
#(b) Determine the probability that 3 individuals have BP > 140 mmHg and one had BP of 140 or less. Answer --> 0.2721651 ~ 27.22%
dbinom(3, size = 4, prob = .38) + dbinom(1, size = 4, prob = .62)
## [1] 0.2721651
“4.3.2 (a) The 90th percentile of a normal distribution is how many standard deviations above the mean? (b) The 10th percentile of a normal distribution is how many standard deviations below the mean?
–> (a)The 90th percintile is 1.28 standard deviations (SD) above the mean. –> (b)The 10th percintile is 1.28 SD below the mean."
“4.3.3 The brain weights of a certain population of adult Swedish males follow approximately a normal distribution with mean 1,400gm and standard deviation 100gm. What percentage of the brain weights are (a) 1,500gm or less? (b) between 1,325 and 1,500gm? (c) 1,325gm or more?”
#(a) Percentage of the brain weights of 1,500gm or less.
##The prompt indicates that everything up to the first standard deviation above the mean will be included in this calculation. Therefore, we know that includes 84.14% of the information within the designated range and leaves out 15.86% (values above the stated range).
###This would be the mathematical representation: P{Z ≤ 1} = 84.14%.
### Answer --> 0.8413447 ~ 84.14%
pnorm(1, mean = 0, sd = 1)
## [1] 0.8413447
#(b) Percentage of the brain weights of 1,325gm and 1,500gm.
##The prompt indicates that the first standard deviation above the mean will be included in this calculation. Therefore, we know that the area under the curve between the first SD above and below the mean is equivalent to 68.2%. Since the lower limit of this range is a bit less than 1 SD, we know that it will be less than 68.2% but more than 50%.
###This would be the mathematical representation: P{-0.75 ≤ Z ≤ 1} = 61.5%.
### Answer --> 0.6147174 ~ 61.5%
one_sd_above <- pnorm(1, mean = 0, sd = 1)
three_quarters_sd_below <- pnorm(-0.75, mean = 0, sd = 1)
one_sd_above - three_quarters_sd_below
## [1] 0.6147174
#(c) Percentage of the brain weights of 1,325gm or more.
##From the previous question we know that the lower limit of this equaiotn will exclude the 1st SD below the mean. So the remaining value will be less rthan the one seen in part (a) of this question. It will, however, not be too far off.
### This would be the mathematical representation: P{Z > -0.75} = 77.3%.
### Answer --> 0.7733726 ~ 77.3%
1 - pnorm(-0.75, mean = 0, sd = 1)
## [1] 0.7733726