Question A.
> data1 <- c(8, 14, 16, 10, 11)
> mean(data1)
[1] 11.8
> sd(data1)
[1] 3.193744
> sample(data1, size = 2)
[1] 10 16
> sample_data <-c(10, 16)
> sample_mean <- (10 +16) / 2
> sample_mean
[1] 13
> sd(sample_data)
[1] 4.242641
A. The mean of the population is 11.8
B. 10 and 16
C. Mean = 13, SD = 4.242641
D. The sample mean is larger than the population mean. The sample standard
deviation is also larger than the population standard deviation meaning
(10, 16) are more spread out than the population.
Question B.
Given:
n = 100
p = 0.95
q = 1-p = 0.05
1. np = 100 x 0.95 = 95
nq = 100 x 0.05 =5
Since nq = 5, and 5 is less than 10, the distribution is not normal because
np and nq need to be greater than or equal to 10.
2. 200 is the smallest value of n.
200 x 0.05 = 10
Question 3.
Coin tossing is better done using a rbinom() function than sample because rbinom()
gives the probability of getting heads or tails while the sample() function, just
randomly picks a number. rbinom() takes two possible outcomes and gives a random
result based on the probability.
Comments
Post a Comment