STAT2201 Assignment 5 University of Queensland

Stat2201 Assignment 5 University Of Queensland-Free PDF

  • Date:30 Jan 2020
  • Views:28
  • Downloads:0
  • Pages:12
  • Size:227.98 KB

Share Pdf : Stat2201 Assignment 5 University Of Queensland

Download and Preview : Stat2201 Assignment 5 University Of Queensland


Report CopyRight/DMCA Form For : Stat2201 Assignment 5 University Of Queensland


Transcription:

In 14 1 10 quantile TDist 24 0 025 0 975 0 015 sqrt 1 1 25. Out 14 2 element Array Float64 1, The length of the prediction interval is 0 06314315423890449 As can be seen this interval is. larger than the confidence interval Remember the confidence interval predicts where the pop. ulation mean will lie while the prediction interval predicts where the next observation will. Question 3 Steel Rods, The diameter of steel rods manufactured on two different extrusion machines is being investi. gated Two random samples of sizes n1 15 and n2 17 are selected and the sample means. and sample variances are x1 8 73 s21 0 35 x 2 8 68 and s22 0 40 respectively Assume. that 12 22 and that the data are drawn from a normal distribution. a Is there evidence to support the claim that the two machines produce rods with different. mean diameters Use 0 05 in arriving at this conclusion Find the P value. First define the variables given in the question as follows. In 15 n 15 17,means 8 73 8 68,vars 0 35 0 40,Out 15 2 element Array Float64 1. Now calculate the pooled standard deviation using the following formula. n1 1 s21 n2 1 s22, Once this is calculated the t statistic can be calculated with the following formula. s pooled n11 n12, In 16 stdPoolQ3 sqrt n 1 1 vars 1 n 2 1 vars 2 n 1 n 2 2.
tStatisticQ3 means 1 means 2 stdPoolQ3 sqrt 1 n 1 1 n 2. Out 16 0 22997811554215344, This t value is then used to find the two sided p value using a t distribution with 30. degrees of freedom,In 18 2 ccdf TDist n 1 n 2 2 abs tStatisticQ3. Out 18 0 8196697157339579, As the p value is greater than the level of 0 05 the conclusion from this hypothesis test. is that the machines do not produce rods with significantly different mean diameters. b Construct a 95 confidence interval for the difference in mean rod diameter Interpret. this interval, To calculate the confidence interval the following formula is used. CI x 1 x 2 t d f s pooled,In Julia this calculation is.
In 19 means 1 means 2 quantile TDist n 1 n 2 2 0 0275 0 975. stdPoolQ3 sqrt 1 n 1 1 n 2,Out 19 2 element Array Float64 1. So the confidence interval is 0 384109 0 494015 As this interval contains zero it can be. concluded that there is no significant difference in the mean diameter of rods produced. by the two machines,Question 4 Wet Chemical Etching. In semiconductor manufacturing wet chemical etching is often used to remove silicon from. the backs of wafers prior to metallization The etch rate is an important characteristic in this. process and known to follow a normal distribution Two different etching solutions have been. compared using two random samples of 10 wafers for each solution The observed etch rates. are as follows in mils per minute,Solution 1 Solution 2. 9 9 10 63 10 2 10 0,9 4 10 3 10 6 10 2,9 3 10 0 10 7 10 7. 9 6 10 3 10 4 10 4,10 2 10 1 10 5 10 3, a Construct normal probability plots for the two samples Do these plots provide support.
for the assumptions of normality and equal variances Write a practical interpretation. for these plots, Using the code presented in Assignment 3 for Normal Probability Plots. In 43 using PyPlot,function NormalProbabilityPlot data. mu mean data,sig std data,n length data,p i 0 5 n for i in 1 n. x quantile Normal p,y sort i mu sig for i in data,y quantile i mu sig for i in data p. PyPlot scatter x y,xRange maximum x minimum x,PyPlot plot minimum x xRange 8 maximum x xRange 8.
minimum x xRange 8 maximum x xRange 8,color red linewidth 0 5. xlabel Theoretical quantiles,ylabel Quantiles of data. Out 43 NormalProbabilityPlot generic function with 1 method. Now using this function to plot the Normal Probability Plots of the two solutions the. following plot is obtained,In 44 NormalProbabilityPlot Solution 1. NormalProbabilityPlot Solution 2, Looking at this plot it can be seen that both data sets follow the line closely and have. about the same spread around the line, b Does the data support the claim that the mean etch rate is the same for both solutions.
In reaching your conclusions use 0 05 and assume that both population variances. are equal Calculate a P value, Defining the two variables and then performing an equal variance t test the fol. lowing output is obtained, In 20 Solution 1 9 9 9 4 9 3 9 6 10 2 10 63 10 3 10 0 10 3 10 1. Solution 2 10 2 10 6 10 7 10 4 10 5 10 0 10 2 10 7 10 4 10 3. testQ4 EqualVarianceTTest Solution 1 Solution 2,Out 20 Two sample t test equal variance. Population details,parameter of interest Mean difference. value under h 0 0,point estimate 0 4269999999999996.
95 confidence interval 0 7494160569134942 0 10458394308650493. Test summary,outcome with 95 confidence reject h 0. two sided p value 0 012291046308808899,number of observations 10 10. t statistic 2 782410155904908,degrees of freedom 18. empirical standard error 0 15346407469574833, As the p value is 0 0123 which is below the 0 05 there is moderate evidence to reject. the null hypothesis Therefore the mean etch rate is significantly different between the. c Find a 95 confidence interval on the difference in mean etch rates. Using the confidence interval from the test performed above. In 21 confint testQ4,Out 21 0 7494160569134942 0 10458394308650493.
This means that Solution 1 s mean etch rate is between 0 7494 and 0 1046 less than Solu. tion 2 s mean etch rate Therefore it can be said that the mean etch rate of Solution 1 is. less than the mean etch rate for Solution 2,Question 5 Gold Ball Distance. The overall distance travelled by a golf ball is tested by hitting the ball with Iron. Byron a mechanical golfer with a swing that is said to emulate the distance hit by. the legendary champion Byron Nelson Ten randomly selected balls of two differ. ent brands are tested and the overall distance measured The data is as follows. Brand 1 275 286 287 271 283 271 279 275 263 267,Brand 2 258 244 260 265 273 281 271 270 263 268. a Is there evidence that overall distance is approximately normally distributed Is there. an assumption of equal variances justified, First define the variables and calculate the variances. In 22 Brand 1 275 286 287 271 283 271 279 275 263 267. Brand 2 258 244 260 265 273 281 271 270 263 268,var Brand 1 var Brand 2. Out 22 64 45555555555558 100 90000000000003, While these variances are different from each other the variance of Brand 2 is less than.
two times the variance of Brand 1 As a factor of four is expected for significantly differ. ent variances it can be concluded that the assumptions of equal variances is appropriate. here Alternatively as with Question 4 the normal probability plots can be compared. In 31 NormalProbabilityPlot Brand 1,NormalProbabilityPlot Brand 2. Looking at these plots it can be seen that both Brands data follows a normal distribution. and the variance is similar in both groups, b Test the hypothesis that both brands of ball have equal mean overall distance Use. 0 05 What is the P value, Running an equal variance two sample t test as before the following output is. In 39 testQ5 EqualVarianceTTest Brand 1 Brand 2,Out 39 Two sample t test equal variance. Population details,parameter of interest Mean difference.
value under h 0 0,point estimate 10 399999999999977. 95 confidence interval 1 8568244113862864 18 94317558861367. Test summary,outcome with 95 confidence reject h 0. two sided p value 0 019784887263473237,number of observations 10 10. t statistic 2 5575488870470826,degrees of freedom 18. empirical standard error 4 066393433443887, Here the p value is 0 0198 T1 9 2 558 and so there is moderate evidence to reject the.
null hypothesis Therefore there is moderate evidence of a significant difference in the. mean overall distance between the brands, c Construct a 95 two sided CI on the mean difference in overall distance for the two. brands of golf balls, As before the confidence interval can be obtained from the test above. In 40 confint testQ5,Out 40 1 8568244113862864 18 94317558861367. Looking at this confidence interval it is noted that it is entriely positive This means that. the mean overall distance of Brand 1 will be between 1 857 and 18 943 greater than the. mean overall distance of Brand 2, d What is the power of the statistical test in part b to detect a true difference in mean. overall distance of 5 yards, While a similar method to that taken in the past assignment can be taken here a.
function to calculate power is presented, In 25 function powerTTest n NULL delta NULL sd 1 sig level 0 05 power NULL. ttype two sample alternative two sided, Have to be using Distributions package Can be used in two ways. 1 Enter n size of sample delta sd sig level 0 type and. alternative to find power of test post hoc, 2 Enter 0 delta sd sig level power type and alternative to find. sample size for power pre hoc,tsample if ttype one sample ttype paired 1. elseif ttype two sample 2 end,tside if alternative one sided 1 elseif.
alternative two sided 2 end,if tside 2 isnull delta delta abs delta end. nu n 1 tsample,powerDist TDist nu,ncp sqrt n tsample delta sd. qu cquantile powerDist sig level tside,power ccdf powerDist qu ncp cdf powerDist ncp qu. return round power 5,elseif power 0,normDist Normal. nu tsample sd 2 quantile normDist power,cquantile normDist sig level tside 2 delta 2.
while powerTTest nu delta sd sig level 0 ttype alternative. return round nu 5 n,Out 25 powerTTest generic function with 8 methods. Using this function the power can be computed using the following command. In 38 powerTTest 10 5 sqrt mean var Brand 1 var Brand 2 0 05. 0 two sample two sided,Out 38 0 19938, Therefore the power of the power of the test in part b to detect a true difference in mean. overall distance of 5 yards is 19 93, e What sample size would be required to detect a true difference in mean overall distance. of 3 yards with power of approximately 0 75, Again using the function defined above the command to obtain the answer is be. In 34 powerTTest 0 3 sqrt mean var Brand 1 var Brand 2 0 05. 0 75 two sample two sided,Out 34 128 5113 99743, The ouput above gives an estimate of the size of one group This needs to be taken to the.
nearest integer greater than or equal to the value then multiplied by two to get the total. sample size The required sample size to detect a true difference in mean overall distance. of 3 yards with a power of approximately 0 75 is 2 129 258. Question 6 Computer Output,Consider the following computer output. Two Sample T Test and CI,Sample N Mean StDev Se Mean. 1 12 16 1 26 0 36,2 16 12 15 1 99 0 50,Difference mu 1 mu 2. Estimate for difference 1 210,95 CI for difference 2 560 0 140. T test of difference 0 vs not,Both used Pooled StDev.
a Fill in the missing values Is this a one sided or a two sided test Use lower and upper. bounds for the P value,Two Sample T Test and CI,Sample N Mean StDev Se Mean. 1 12 16 1 26 0 36,2 16 12 15 1 99 0 50,Difference mu 1 mu 2. Estimate for difference 1 210 3 85,95 CI for difference 2 560 0 140 2 500 5 200. T test of difference 0 vs not,T value 1 842804 5 863466. P value 0 05 p 0 1 p 0 0002,DF 12 16 2 26,Both used Pooled StDev 1 719404.
Values in from table rather than estimate for difference. b What are your conclusions if 0 05 What if 0 01, As the p value is between 0 05 and 0 1 there is weak evidence to reject the null. hypothesis Therefore it can be concluded that there is weak evidence of a significant. difference between the samples, As the p value is less than 0 0002 there is very strong evidence to reject the null. hypothesis Therefore there is strong evidence to suport a significant difference between. the samples, c This test was done assuming that the two population variances were equal Does this. seem reasonable, Given that the ratio ss12 of standard deviations is less than 2 it seems reasonable. that the population variances are equal, d Suppose that the hypothesis had been H0 1 2 vs H1 1 2 What would your.
conclusions be if 0 05, As the t value is negative the p value for the test 1 2 is half of the p value. stated for the two sided test Therefore the p value is between 0 025 and 0 05 given. moderate evidence to reject the null hypothesis It can be concluded that there is. moderate evidence that the mean of sample 1 is less than the mean of sample 2. As the t value is positive the p value for the test 1 2 will be p 0 25 Therefore. there is inconclusive evidence to reject the null hypothesis It can be concluded that the. mean of sample 1 is not less than the mean of sample 2. Question 7 Melting Point, The melting points of two alloys used in formulating a solder were investigated by melting 21. samples of each material The sample mean and standard deviation for alloy 1 was x 1 420. F and s1 4 F For alloy 2 they were x 2 426 F and s2 3 F. a Does the sample data support the claim that both alloys have the same melting point. Use 0 05 and assume that both populations are normally distributed and have the. same standard deviation Find the P value for the test. First define the variables and calculate the t statistic using Julia as follows. In 28 n 21 21,means 420 426,vars 4 2 3 2,sPooled7 sqrt mean vars. STAT2201 Assignment 5 Question 1 P values with t For the hypothesis test H 0 m 7 against H 1 m 6 7 with variance unknown and n 20 approximate the P value for each of the following test statistics a t 0 2 05 b t 0 1 84 c t 0 0 4 First the Distributions package needs to be loaded and a distribution with 19 degrees of freedom

Related Books