In: Statistics and Probability
7. Let X be the random variable denoting the height of a randomly chosen adult individual. If the individual is male, then X has a normal distribution with mean of µ1 = 70 inches with standard deviation of σ1 = 3.5 inches; while if the individual is female, then X has a normal distribution with mean µ0 = 66 inches and standard deviation of σ0 = 3 inches. [Note: For computing probabilities and quantiles for the normal distribution, use the R functions pnorm, dnorm, and qnorm.] (f) Suppose that you want a rule to classify an individual into male or female depending on the person’s height. Consider the classification rule given by: Classification Rule: Classify individual into male if the height of the person is at least c inches. What should be c so that the probability that you will classify a male person as female (an error in decision, called Type I) is 0.05? (g) For the classification rule in (f), what is the probability that a female person will be classified as male (also an error of decision called Type II)? (h) If you want to decrease the probability of a Type II error to be equal to 0.05, what should c be and what will then happen to the probability of a Type I error?
X is the random variable denoting the height of a randomly chosen individual.
The distribution of X for a male is
The distribution of X for a female is
f) Classify individual into male if the height of the person is at least c inches. This means that we will classify a male person as female when the height of the person is less than c
We want the probability that a random male has a height less than c (and wrongly classified as female) is 0.05. That is
R code to find c (all statements starting with # are comments and can be removed)
#set the values of mu1 and sigma1 for males
mu1<-70
sigma1<-3.5
#calculate the value of c, such that P(X|male<c)=0.05
c<-qnorm(0.05,mu1,sigma1)
sprintf('The value of c so that the probability that you will
classify a male person as female is 0.05 is %.2f',c)
## get this
g) Using the result from f, we would be classifying a person as male if the height is greater than c=64.24 inches.
the probability that a female person will be classified as male is same as the probability that a female has a height greater than 64.24 inches.
We want the probability
R code
#set the values of mu1 and sigma1 for females
mu0<-66
sigma0<-3
#get P(X|female>c)
prob<-pnorm(c,mu0,sigma0,lower.tail=FALSE)
sprintf('The probability that a female person will be classified as
male is %.4f',prob)
#get this
h) The value of c for the type II error to be 0.05 is same as the probability that a randomly selected female has a height greater than c is 0.05
We want c for the probability
and for such a c, the probability of a type I error would be the the probability that you will classify a male person as female or
R code is
#The value of c for the type II error to be 0.05
P(X|female>c) =0.05
c<-qnorm(0.05,mu0,sigma0,lower.tail=FALSE)
sprintf('The value of c for the type II error to be 0.05 is
%.2f',c)
#the probability of a type I error would be P(X|male<c)
prob<-pnorm(c,mu1,sigma1)
sprintf('The probability of a type I error is %.4f',prob)
## get this