[Solved]1 Please Write One Matlab Function T Meanm Perfornm Various Test Regarding Mean Normal Ran Q37172366
help please in matlab please
1. Please write a one MATLAB function T mean.m to perfornm various test regarding a mean of a normal random variable X The syntax should be [pvalue,teststat] T mean(x.mu0,alt,alpha,sigma) The function should perform a significance test of the hypothesis Ho:-Ho versus a user chosen alternative H1ιμ > μο- H,: μ <Ho,or Hı: μ#Hoand could be used in both the case of known standard deviation ơ of X (Z-test) and in the case when standard deviation is unknown (T-test). It also should produce a normal probability plot to assess whether the assumption of normality is plausible. The input variables should be: 1. x- vector containing data 3. alt = ‘>, “<‘or'<>, depending on form of the alternative 4. alpha a significance level 5, sigma = standard deviation of X if known; if standard deviation of X is not known that sigma is not entered Function should print on the screen: 1. critical region at a given level of significance (alpha) 2. the observed value of the proper test statistics (should be named teststat) 3. p-value (should be named pvalue) 4. conclusion at alpha level of significance 5. normal probability plot On a back page is an outline of my T mean.m. You may follow my idea and complete the missing parts in the outline or create your own function from a scratch. T mean.m 2, Solve the following two exercises using your function A. Perform a test of Ho: 10 versus H: u> 10 at significance level 0.02 assuming that X is normal and its standard deviation is known to be 1.8. Use data 13.9 13.2] significance level 0.02 assuming that X is normal and its x=[ 11.2 12.4 8.7 11.5 11.0 9.5 10.3 11.0 B. Perform a test of Ho: H 10 versus H: H10 at standard deviation is not. Use the same data x -[11.2 12.4 8.7 15 11.0 9.5 10.3 11.0 13.9 13.2]: Show transcribed image text 1. Please write a one MATLAB function T mean.m to perfornm various test regarding a mean of a normal random variable X The syntax should be [pvalue,teststat] T mean(x.mu0,alt,alpha,sigma) The function should perform a significance test of the hypothesis Ho:-Ho versus a user chosen alternative H1ιμ > μο- H,: μ , “ 10 at significance level 0.02 assuming that X is normal and its standard deviation is known to be 1.8. Use data 13.9 13.2] significance level 0.02 assuming that X is normal and its x=[ 11.2 12.4 8.7 11.5 11.0 9.5 10.3 11.0 B. Perform a test of Ho: H 10 versus H: H10 at standard deviation is not. Use the same data x -[11.2 12.4 8.7 15 11.0 9.5 10.3 11.0 13.9 13.2]:
Expert Answer
Answer to 1. Please write a one MATLAB function T mean.m to perfornm various test regarding a mean of a normal random variable X T… . . .
OR

