Question
Really short question! Please help me to solve, thank you! Yet, the data set is too big (n=8000) as I can’t show all of them. Hope that the information of the second picture would be helpful.
(30%)Q4 (EM algorithm): The heights of n 8000 students are drawn from a school. Assume the height largely depends on the gender. We denote the height of student i by Yi, and the gender of student i by Z..(Y; : 1 i n) are observed, but {Zi : 1 i n} are unknown Our model can be formulated as follows. First, Pr(Zi 1) π and Pr(Z-2)-1-T, where Zi indicates student i is female. Zi--2 indicates student i is male, and π can be interpreted as the proportion of female students in all the students. Second, given Z, 1, Y, is assumed to be from a normal distribution N(μί, σ?); given Zi 2, X is assumed to be from, a normal distribution N(Paơ). Based on these notations and information, please 1) write down the cornplete-data likelihood function L(π, μί, μ2.σί, σ2/Y, Z); 2) derive E step and M step to find MLE of (π, μ, μ2: σί, σ2); 3) use R to implement your EM algorithm, give MLE of (π, μ, μ2:qM), and distinguish the first ten students gender. (The data set (Y: 1Si S n) is heights.data.tat.)
0257647 0233899 0264522 8779259 812312 4012 5100 92。5. 9 2. 6748 d13 sqq 12555857457 83360231293 10304413499 6 1 5 7 8 381727 428260 135681 96369450419 6029A 9636 777756677751
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

By using given data ,the coding as follows bellow,

1x-c( 172.9146181,174.6321032,175 3585335,173.6627065,156 9868405,160.4103428,162 5008135,173.0961317,177 4607424,176.1322995,158 9697937,158.705085,8000,167 5487222,7.921017635,160 0129437,175.0232586,149 0015294, 182.73292997) ;x 2 y-length(x):y m-mean(x) ; m v-var (X):v sd-sqrt(v);sd #length #mean #variance of data of data #s tandard deviation 6 min(x) 7 max (X) 8 quantile(x,0.25) 9 quantile(X,0.75) #min of data #max of data #1st quantile #3rd quantile

output:

K R Compiler 3.5 Output [1 172.914618 174.632103 175.358533 [7] 162.500813 173.096132 177.460742 [13] 8000.000000 167.548722 7.921018 [19] 182.732930 11 571.7405 [1] 3237230 11 1799.23 [1] 7.921018 [1] 8000 25% 159.4914 75% 175.1909

Add a comment
Know the answer?
Add Answer to:
Really short question! Please help me to solve, thank you! Yet, the data set is too...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Really short question! The second picture is some information about the data set. Please help me...

    Really short question! The second picture is some information about the data set. Please help me to solve, thank you! (30%)Q4 (EM algorithm): The heights of n 8000 students are drawn from a school. Assume the height largely depends on the gender. We denote the height of student i by Yi, and the gender of student i by Z..(Y; : 1 i n) are observed, but {Zi : 1 i n} are unknown Our model can be formulated as follows....

  • Really short question! Please help me to solve, thank you! (10%)Q3 (Logistic regression): We collected n...

    Really short question! Please help me to solve, thank you! (10%)Q3 (Logistic regression): We collected n 15 independent binary observations : i- 1, , 15) and their corresponding covariates {xi : і = 1, , 15). Assume the relationship between yi and zi (for i = 1, , 15) is Vi ~ Bernoulli(p.) and logit(Pi)-α+82i, where logit(t) = log ti. Please 1) write down the likelihood function L(a, B|x, y) of the logistic regression model; 2) derive the Newton method...

  • Really short question! Please help me to solve part(b), also need the R code, thank you!...

    Really short question! Please help me to solve part(b), also need the R code, thank you! Problem 4 [26 points] (Section 2.4): Consider a one-sample z-test (known variance) with hypotheses: Ho: μ lo vs H, μ μο. a/2 where φ(.)Is the CDF of N(0,1), d-layo, and δ is the difference between the true mean and the mean under Ho (a) [10 points] Based on the fact that φ(x) [pdf of N(0,1)] is a decreasing function in x when x> 0,...

  • Really short question! Please help me to solve, thank you! (30%)Q2 (Poisson regression): We collected n...

    Really short question! Please help me to solve, thank you! (30%)Q2 (Poisson regression): We collected n 15 independent count observations {Vi : 1,..., 15 and their corresponding covariates (i 1,..., 15). Assume the relationship between Vi and xỉ (for i-: 1, , 15) is yi ~ Poisson(A) and log(A) α+ßxi. Please 1) write down the likelihood function L(a, B|x, y) of the Poisson regression model; 2) derive the Newton method for maxmizing L(a, BIx, y); 3) implement the Newton method...

  • Really short question! Please help me to solve ONLY part(b) with R code. Thank you! Problem...

    Really short question! Please help me to solve ONLY part(b) with R code. Thank you! Problem 4 [26 points] (Section 2.4): Consider a one-sample z-test (known variance) with hypotheses: Ho: μ lo vs H, μ *Ho. The probability of Type II error can be written in the form |ß D(%2_Jnd)-0(-%2_Jnd) where Φ㈠ is the CDF of N(0,1), d Isyo, and δ is the difference between the true mean and the mean under Ho (a) [10 points] Based on the fact...

  • Really short question! Please help me to solve! It also needs the R code, thank you!...

    Really short question! Please help me to solve! It also needs the R code, thank you! Requirements: (25%)Q2: Please use the accept-reject method to generate 5000 samples from f(x) = 02 n which gfx) - 3e-3) and M f(x) M.g() and prove thet in which gr)3e 1-9(3) 3V2T (1-(3) algorithm proof R code

  • Could anyone help me with the question (d) and (e)? I've finished the question (a), (b) and (c). You don't need to solve the question (a), (b), and (c), and you could use them directly. And...

    Could anyone help me with the question (d) and (e)? I've finished the question (a), (b) and (c). You don't need to solve the question (a), (b), and (c), and you could use them directly. And the following 2 are (b) and (c). (a) Let (X,M, μ) be a measure space and T : X → y a mapping from X oni at Y Prove thai (i) N (B C y : T-1 (B) EM} is a σ-algebra of subsets...

  • Please only solve question 1.13. Question 1.12 is only there for reference. Thank you. 1.12 To...

    Please only solve question 1.13. Question 1.12 is only there for reference. Thank you. 1.12 To collect data in an introductory statistics course, recently I gave the students a questionnaire. One question asked whether the student was a vegetarian. Of 25 students, 0 answered "yes." They were not a random sample, but let us use these data to illustrate inference for a proportion. (You may wish to refer to Section l-4-1 on methods of inference.) Let π denote the population...

  • I NEED A MATHEMATICAL ALGORITHM FOR A CEASER CHYPER I CREATED. PLEASE HELP ME...THANK YOU! THE...

    I NEED A MATHEMATICAL ALGORITHM FOR A CEASER CHYPER I CREATED. PLEASE HELP ME...THANK YOU! THE SINGLE-DIGIT KEY IS 14 THE PHRASE IS "GOOD MORNING PROFESSOR" THE CYPHER IS UCCR ACFBWBU DFCTSGGCF I DON'T KNOW HOW TO CREATE THE ALGORITHM AND IT CANNOT BE COMPUTER GENERATED. a. Develop a Caesar cipher-type encryption algorithm with a little more complexity in it. For example, the algorithm could alternatively shift the cleartext letters positive and negative by the amount of the key value....

  • HELP needed urgently....Data and question is attacted below..... Thank you in advance there is no data...

    HELP needed urgently....Data and question is attacted below..... Thank you in advance there is no data link fir this data it’s all in photos.... thank you i have already posted the question We were unable to transcribe this imageNo. 2 3 4 5 6 7 8 Working Sector Public Own Public Public Private Public Private Private Own Own Private Public Public Public Private 9 10 11 12 13 Public IS 16 17 18 19 20 21 22 23 24 25...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT