Question
Suppose that you generate an 8-character password by selecting each character independently and uniformly at random from {a, b, . . . , z} {A,
Suppose that you generate an 8-character password by selecting each character independently and uniformly at random from {a, b, . . . , z} {A, B, . . . , Z} {0, 1, . . . , 9}. (a) What is the expected number of letters in a password? (b) What is the variance of the number of letters in a password? (a) Each password consists of 8 characters Each character is independently and uniformly selected from the set {a, b, . . . , z}{A, B, . . . , Z}{0, 1, . . . , 9} The size of the sample space is || = (26 + 26 + 10)^8 To find the expected number of letters in a password, we need to first define a random variable X that represents the number of letters in a password. Since there are 52 letters in , we have: X() = 1, if is a letter X() = 0 if not letter The expected value of X is given by: E[X] = 8 52/62 = 6.71 Therefore, the expected number of letters in a password is approximately 6.71 (b) Your solution to (b) Var(X)= (8 52/62 ) (1 52/62 ) = 1.08 Therefore, the variance of the number of letters in a password is 1.08
Is it the right way to solve it?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started