##Question 1
dbinom(4, 10, .2)
## [1] 0.08808038
dbinom(3, 20, 1/12)
## [1] 0.1502988
##Question 2
x.var <- seq(0, 10, 1)
probs <- dbinom(x.var, 10, 1/5)
plot(x.var, probs, type = "h")
x.var <- seq(0, 20, 1)
probs <- dbinom(x.var, 20, 1/12)
plot(x.var, probs, type = "h")
##Question 3
x.var <- seq(0, 10, 1)
probs <- dbinom(x.var, 10, 1/5)
plot(x.var, probs, type = "l")
You should not use this option because it makes your data connected,
making it seem like you have data points in places where you do not.
Your data for this graph is all whole numbers but if the graph extends
into areas between the two whole numbers, it makes it seem that those
are also points in your data set.
##Question 4
x.var <- seq(0, 10, 1)
probs <- dbinom(x.var, 25, 1/5)
plot(x.var, probs, type = "h")
x.var <- seq(0, 10, 1)
probs <- dbinom(x.var, 10, .5)
plot(x.var, probs, type = "h")
If you change the second line that contains the probability of success
and the number of trials conducted, you can change the graph to be
symmetrical. Both the probability of success and the number of trials
work together to make the data symmetrical by changing the data
points.
##Question 5
pbinom(5, 10, 1/5)
## [1] 0.9936306
pbinom(70, 100, 4/5)
## [1] 0.01124898
##Question 6 The probability of the mouse completing 6 or more out of 10 mazes is 0.0063694 or 0.64%
The probability of a new schizophrenia drug improving outcomes for 70 or more patients out of 100 is 0.98875102 or 98.88%
##Question 7
my_sample <- make.my.sample(34252778, 100, aliens)
summary(my_sample$antennae)
## Curly Straight
## 20 80
pbinom(20, 100,.5)
## [1] 5.579545e-10
I think that the report from the previous explorer was incorrect because for my sample to get 20 aliens with curly antennae, the probability is extremely small. It would be nearly impossible to get 20 out of 100 if there is a 50% chance of getting an alien with a curly vs. straight antennae.
##Question 8
pnorm(75, mean = 100, sd = 15)
## [1] 0.04779035
pnorm(120, mean = 100, sd = 15)
## [1] 0.9087888
The probability that someone scores 75 or lower is 4.78% and the probability that someone scores lower than 120 is 90.88%.
##Question 9
higher_cumulative_prob <- pnorm(140, 100, 15)
lower_cumulative_prob <- pnorm(120, 100, 15)
higher_cumulative_prob - lower_cumulative_prob
## [1] 0.08738084
The probability of someone falling into this category is 8.74%.
##Queston 10
qnorm(.90, mean = 100, sd = 15)
## [1] 119.2233
qnorm(.80, mean = 100, sd = 15)
## [1] 112.6243
The 80th percentile is 112.62 and the 90th percentile IQ score is 119.22.
##Question 11
(140-100)/15
## [1] 2.666667
(95-100)/15
## [1] -0.3333333
The z score associated with an IQ score of 140 is 2.67 and the z score associated with an IQ score of 95 is -0.33.
##Question 12
IQ <- seq(50, 150, 1)
plot(IQ, dnorm(IQ, 120, 10), type = "l")
##Question 13
hist(my_sample$intelligence)
mean(my_sample$intelligence)
## [1] 110.36
sd(my_sample$intelligence)
## [1] 8.593538
In my sample of aliens, the histogram shows a somewhat normal distribution with a small peak around 95-100. The average mean of intelligence between the aliens in my sample is 110.36, which is 10 points higher than that of humans which is 100. The aliens intelligence has a standard deviation of 8.59, which is much smaller than the humans IQ standard deviation of 15.
##Question 14
pnorm(120, mean = 100, sd = 15)
## [1] 0.9087888
pnorm(120, mean = 110.36, sd = 8.59)
## [1] 0.8691188
I used cumulative probability to figure out what percentile you would be if you were a human or an alien within my sample with an IQ score of 120. From my calculations, I discovered that a human with an IQ score of 120 is smarter about their species than an alien with an IQ score of 120. This is because the mean for aliens’ IQ is higher, demonstrating that aliens are more likely to have a higher IQ score than humans, making it easier for them to achieve a score of 120 compared to humans. The probability of an alien receiving a 120 or lower in IQ score is 86.91% and a human receiving a 120 or lower in IQ score is 90.88%.