An integer is selected at random from the set {1,2,3...1000}. What is the probability that it is divisible by 4,5,or 6?
The sample space is
S={1,2,3,.....,998,999,1000}
n(S)=1000
Let A denotes number which are divisible by 4,5 or 6
A={4,5,6,8, 10 ,12 ,15 , 16,......,966 , 968 , 970, 972, 975, 976 ,978 , 980 , 984 , 985 , 988 , 990, 992 , 995, 996, 1000}
n(A)=466
The probability that it is divisible by 4,5,or 6 is
P(A)=n(A)/n(S)=466/1000=0.466
The probability that it is divisible by 4,5,or 6 is 0.466
The R-code is
x=1:1000
A=length(which(x%%4==0|x%%5==0|x%%6==0))
N=length(x)
A #Total number which are divisible by 4,5 or 6
[1] 466
N # Total number of observations
[1] 1000
#Now probability that the number from integer {1,2,...,1000} which is divisible by 4 or 5 or 6 is
A/N
[1] 0.466
Get Answers For Free
Most questions answered within 1 hours.