A ucam olie cotiuig educatio course WHAT EVERY ENGINEER HOULD KNOW ABOUT ENGINEERING TATITIC II by O. Geoffrey Okogbaa, Ph.D., PE
A ucam olie cotiuig educatio course Table of Cotets Itroductio... 4. Mea ad the Dispersio... 5 tatistical Iferece... 5 Estimatio (Poit Estimatio)... 6 3. Poit Estimates for the Mea, Media ad Variace... 7 3.. Poit Estimates for the Mea ad Variace of the Populatio... 8 3.. Cetral Limit Theorem... 8 3..3 amplig Distributio for the mea... 9 3..4 amplig Distributio for the Mea-The tudet-t Distributio... 3..5 amplig Distributio for the ample Variace... 3..6 amplig Distributio for Two Variaces... 4. Error of Estimatio... 4. Determiatio of ample ize... 3 4.3 Cofidece Itervals for the Mea... 4 4.3. Case I... 4 4.3. Case II... 5 4.3.3 CAE III... 5 4.4 Cofidece Itervals for Oe Variace... 7 4.4 Cofidece Itervals for Two Variaces (, )... 8 4.6 Oe-ided Cofidece Iterval... 9 Test of Hypothesis... 5. Errors Associated with Decisios o Test of Hypothesis... 5.. Type I Error ()... 5.. Type II Error ()... 5..3 The Relatioship Betwee the Type I () ad Type II () errors... 5..4 Computatio of the Required ample ize () give () ad ()... 5..5 Computatio of whe >... 3 5..6 Computatio of whe... 4 5. Operatig Characteristic Curve... 5 5.. Computatio of the Parameters of the OC Curve... 6 www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page of 4
A ucam olie cotiuig educatio course 5.3 teps i Hypotheses Testig... 8 5.4 ummary Tests for Oe Mea... 3 5.4. Variace kow... 3 5.4. Variace ukow, but > 3 ( estimated from s)... 3 5.4.3 Variace ukow, 3 ( estimated from s)... 3 Test o Meas (More Tha Oe Mea)... 3 6. Variace kow... 3 6. Variace ukow but assumed equal ad 3... 33 6.3 Variace ukow ad uequal ( )... 33 6.4 Paired Tests... 34 Test of Variace... 35 7. Variace from Oe Populatio... 35 7. Variace from Two Populatios... 36 7.3 Why the F test for Two Variaces... 37 ummary... 39 REFERENCE... 4 www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 3 of 4
A ucam olie cotiuig educatio course Itroductio The focus of this course is o a importat area i egieerig aalyses ad desig, amely how we aalyze data ad use the iformatio to make decisios about the egieerig problem. The whole process of explicatig the complexities of the data to yield iformatio that would evetually be used to make desig or missio decisios is kow as iferece or more appropriately statistical iferece. If we examie the relatioship betwee the populatio ad the sample (as we did i the first course) we ote that there is sort of a symbiotic (paret-populatio, offsprig-sample) relatioship betwee the two. Probability deals with the populatio with its parameters (paret values) while statistical iferece deals with the sample ad its statistic (values computed from the sample ad used to estimate the populatio or uiverse parameters). Thus, while probability ad statistics both deal with questios ivolvig parameters ad statistic, they do so i a iverse maer as show i figure. From the poit of view of the populatio, iformatio about the sample ca be obtaied by probability aalyses. O the other had, give some sample statistic, oe ca parley those values ito makig iferece about the ature of the populatio parameters. tatistics really is about statistical iferece, amely, tryig to ifer whether the sample statistic (such as sample mea versus the populatio mea or the sample stadard deviatio versus the populatio variace ) ca reasoably be assumed to be good estimates of the parameters of the paret populatio. tatistical iferece is the idea of assessig the properties of a uderlyig distributio through the method of deductive aalyses. Iferetial statistical aalysis ifers properties about a populatio through the followig major schemes, amely; a). Estimates (poit estimates, iterval estimates), ad b). Tests of Hypotheses. The populatio or the uiverse is assumed to be ifiite ad thus is larger tha the sample from which a data set is draw. Thus, probability projects iformatio from the populatio to the sample via iductive reasoig, while we use the sample statistic as a meas of uderstadig the ature of the populatio parameter usig deductive reasoig. Figure : Relatioship betwee Populatio ad ample www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 4 of 4
A ucam olie cotiuig educatio course. Mea ad the Dispersio I ay data aalyses sceario, the focus has always bee o fidig some way to uderstad what the data meas, what it is sayig about the uderlyig process ad if there is aythig that ca be gleaed about the tred or characteristics. Ufortuately, parameters are ot easy to come by ad for that matter either is the populatio itself. For egieers, it is importat to uderstad that we do ot coduct experimets for the sake of the estimates but for evetually assessig the parameters. The goal of ay experimet is beyod just computig the statistic from the sample but to go over ad above that to uderstad how those statistics explai away the populatio parameters. The measures or the sample estimate or statistic are ever the goal but a pathway to the goal which i this case is the populatio parameter. That is why we always seek the best estimators for the parameter that we wat to estimate so we ca get as close as possible to the real thig. Give the ature of a radom experimet it is expected that each realizatio of the experimet may very well produce differet statistic(s). Hece each realizatio of the experimet may produce differet estimates of the same statistic(s). For example, the Diametral-Pitch (DP) for a sample take from a lot or populatio of spur-gears, the first sample could yield a mea value 4iches. A secod sample from the same lot could yield a DP of 6iches. Thus the statistic from the two samples would be umerically differet, eve though as we would show later, they could be statistically the same. The overarchig goal i ay experimetal situatio is ot to estimate the differet statistic for their ow sake because they are useful oly to the extet that we eed them to discover the true value of the populatio. The ultimate goal is therefore to get a sese of the populatio parameter(s) value ( or i this case) or what is geerally called the true mea or the true variace. These measures or statistic are used as a pathway to access the populatio parameters. No oe sets out i a experimet hopig that the statistic they obtaied from a sample is the ed all. Eve for those without a backgroud i mathematics ador statistics it is geerally uderstood that samples, everythig else beig equal, are mere represetatives (ad i some cases true represetatives) of the paret populatio ad hece ay decisios made will hopefully reflect the paret populatio. Thus statistic(s) from samples are mere surrogates because we really do ot have access to the populatio (very rarely do we have access to the populatio) i most cases ad so the closest thig is the sample. I essece, all we are doig is to estimate the parameter value from the sample statistic because they (sample statistics are the oly thigs we have access to. tatistical Iferece I may egieerig settigs (maufacturig, chemical, electroic, computig, service, etc.), we ecouter may radom quatities. Ofte, we do ot kow the probability structure of these variables or their uderlyig characteristics. till we do wat to determie these quatities to have www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 5 of 4
A ucam olie cotiuig educatio course better cotrol of the system operatio. This is usually accomplished by takig radom samples or observatios o the radom variables. Based o the classical defiitio of probability, the determiatio of the probability or the expected value associated with the radom variables would require a 'ifiite umber of observatios. However, sice i some cases (the case of the spur-gear described earlier) we have a very large but fiite populatio, we ca usually estimate the values i questio i the form of sample statistics computed from the samples. Ultimately, at the ed of a statistical iferece aalyses, the decisio is always to act or ot to act. I some istace, the decisio could be to accept the observed or computed value of the estimator as the ukow parameter without requirig that it be exactly the true value. O the other had, we may decide to reject or ot reject the assumptios about certai distributio without cocedig that such a statemet is true beyod doubt. Thus, the use of statistical iferece eables us to cotrol the possible errors that could arise as a result of our decisios ad to esure that these errors, while ievitable, are as small ad as ecoomically as possible. As idicated earlier, iferetial statistics ca be divided ito three mai braches, amely poit estimatio, iterval estimatio, ad test of hypotheses. Estimatio (Poit Estimatio) For a good estimatio, a fairly large sample is eeded. I some cases, oly very limited samples may be all that is available. uch limitatio could result i a situatio where the distributio is assumed beforehad sice the sample size is limited ad thus the esuig aalysis is oly meat to verify that the distributio has ot chaged. There are two types of estimators, amely poit estimators ad iterval estimators. Two methods are geerally used i geeratig estimators of parameters, amely, the methods of momets ad maximum likelihood. For some problems both the method of momets ad maximum likelihood lead to the same estimators ad for others they do ot. Whe the two methods do ot agree, the maximum likelihood estimator is usually preferred. Let be a radom variable with probability desity fuctio (pdf). The pdf has a kow form ad is based o a ukow parameter θ that belogs to the parameter space Ω. This meas that we have a family of distributios whose values all lie i the parameter space. Thus, to each value of θ ε Ω, we have oe member of the possible family of distributios. I most cases the experimeter wats to choose oly oe member of the family to represet the pdf of the radom variable of iterest. ice we have a family of distributios whose parameter values belog i the parameter space Ω, the problem becomes oe of defiig a statistic that will be a good poit estimator of the parameter of iterest. www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 6 of 4
A ucam olie cotiuig educatio course 3. Poit Estimates for the Mea, Media ad Variace A poit estimates is a sigle value or umber, a poit o the real lie, which we feel is a good guess for the ukow populatio parameter value that is beig sought. They are statistics obtaied from the sample that we the use to estimate the populatio parameter. The motivatio for coductig a experimet stems from the uderstadig that i most cases it is impractical to obtai the value of the parameter that we seek because that would require the almost impossible task of observig the outcome of a ifiite populatio. This beig the case, the problem the reduces to oe of attemptig to extract as much iformatio as possible about the parameter from the sample(s) based o the sample statistic. I other words, poit estimates are summary statistics that capture the essece of the parameter beig sought. However, there are several ways i which a parameter ca be represeted. As a example, i estimatig the cetral tedecy, which is a populatio parameter, it is geerally agreed that the mea ad the media are both reasoable quatities with which to measure such a parameter. Also i estimatig the variace of a radom variable, the sample variace ad the rage are both used as estimators. Obviously, oly oe of estimates ca be used or employed at ay oe time. Thus, there eeds to be a set of criteria, stadards, or properties by which to judge or characterize the estimators. The properties of ubiasedess, ad efficiecy are two of the commoly sought-after properties that are desired i a good estimator. A statistic is called 'best ubiased estimator (BUE) for the parameter θ if the statistic is ubiased ad efficiet, i.e., if E( ) θ ad if the variace of is less tha or equal to the variace of every other ubiased statistic. The issue of the efficiecy of a estimator has to do with its variace. I terms of the BUE, the smaller the variace of a estimator, the more efficiet the estimator. I the case of the sample mea ad media as estimators of the populatio cetral tedecy, ~ both are cosidered ubiased estimators, i.e., E ( ) θ ad E ( ) θ. The variace of the sample mea ad that of the media are as show. ~ ( ), For the Media, V ( ). 57 For the Mea, V ~ The variace of the media is.57 times the variace of the mea. Therefore, usig the criteria for BUE, the sample mea is cosidered the BUE because it has the miimum variace with respect to all the estimators of θ. As oted previously, both the Mid-rage ad the Mode are also ubiased estimators of the populatio mea but they are ot BUE. www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 7 of 4
A ucam olie cotiuig educatio course Variace of media ~ Variace of the mea Figure : Variace of Mea & Media 3.. Poit Estimates for the Mea ad Variace of the Populatio The followig are the poit estimates for the mea ad variace. For the mea, we have x i, ad x k x Where k umber of subgroups ad is the sample size ( ) x, where: x x k 3.. Cetral Limit Theorem The cetral limit theorem (CLT) is a statistical theory that states that give a sufficietly large sample size from a populatio with a fiite variace, the mea of all samples from that populatio would be approximately equal to the mea of the populatio. Let,...,, 3 deote the measuremets or output of a radom sample of size from ay distributio havig fiite variace ad mea, the the radom variable k ( ) has a limitig ormal distributio with zero mea ad variace equal to uity. I other words, eve though the idividual measuremets have a distributio that is ot the ormal distributio, the distributio of the sample meas,, 3,... as, teds to be approximately ormally distributed. I other words, the samplig distributio of the sample meas is the ormal distributio. Whe this coditio is true it would be possible to use this property to compute approximate probabilities cocerig the distributio ad to fid a approximate cofidece iterval for as well as test certai hypotheses without kowig the exact distributio of i every case or situatio. The cetral limit theorem (CLT) establishes that, for the most commoly studied scearios, whe idepedet radom variables are added, their sum teds toward a ormal distributio eve if the origial variables themselves are ot ormally distributed. This is very importat especially www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 8 of 4
A ucam olie cotiuig educatio course because it is ofte difficult to determie the uderlyig paret distributio which is eeded to determie the probabilities of evet occurrece to eable egieerig decisios to be made i a iformed maer 3..3 amplig Distributio for the mea The samplig distributio of the sample mea is the ormal distributio based o the CLT. I other words, the distributio of the sample mea is the ormal distributio with the mea ad variace as follows:, ad. For example, the Diametral-Pitch (DP) for a sample take from a lot or populatio of spur-gears, the first sample could yield a mea value 4iches. A secod sample from the same lot could yield a DP of 6iches. The larger the DP, the higher the stress o the gear tooth. Assume that o the average, the DP is 4 iches with.55 iches. A sample of 5 spur gears is take from the lot with the followig measuremets as i table. Fid the probability that some of the gear-spurs will ot meet requiremet, that is P > ). ( Figure 3: ketch of Probability Distributio for -bar P Φ.55 4,., 4.4999( fromtable) 5 (.363) ) P.936 ( > > haded area 4.4999-4. Φ Φ. (.936).864 9% (.363) There is oly a 9% chace that the spur-gears from that populatio will ot meet the desig requiremets. Note that we did ot use the stadard deviatio we computed for the data for the problem. Why? You will recall that we are focused o the samplig distributio of the sample mea so the mea is the radom variable i this particular case. www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 9 of 4
N A ucam olie cotiuig educatio course Diametral Pitch (DP) iches N Diametral Pitch (DP) iches.44966 4 4.6654 5.8777 5 3.94669 3 4.7 6 5.484784 4.6597 7 3.38745 5 5.9685 8.97696 6 3.355 9 4.356 7 3.3695 4.4885 8 5.747 5.73877 9 5.34773 4.47 4.47 3 4.6958.8644 4 3.9976 4.839 5 3.459 3 3.46 5 Mea 4.4999 td Dev.9433 Table : Diametral Pitch (DP) Measuremets (i) Later we will cosider the samplig distributio for the variace based o the values from the data. The variace is cosidered a radom variable because each sample realizatio (each sample we take) results i a variace estimate or statistic just like we have a mea estimate for each sample we take. Due to the ubiased ature of the sample mea as a estimator of the populatio mea, the samplig distributio of two or more meas is ormally distributed. sum of the meas is also ormally distributed. 3..4 amplig Distributio for the Mea-The tudet-t Distributio The studet-t arises whe estimatig the mea of a ormally distributed populatio i those cases where the sample size is small, ador the populatio variace or stadard deviatio is ukow. The tudet-t distributio is like the stadard ormal distributio whe the sample size is small, typically 3. ome of the characteristics of the studet-t are the followig: ). The probability distributio appears to be symmetric about t just like the stadard ormal distributio ). The probability distributio appears to be bell-shaped. www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page of 4
A ucam olie cotiuig educatio course 3). The desity curve looks like a stadard ormal curve, but the tails of the t-distributio are "heavier" tha the tails of the ormal distributio. That is, we are more likely to get extreme t-values tha extreme z values. The ice thig about the studet- t or the t distributio is that we ca use it i the case where the sample size does ot justify the use of the stadard ormal, that is whe 3. Recall that i the case of the tadard Normal Variable, the radom deviate I the case of the studet-t, the radom variable t is give as t with υ(-) degrees of freedom. Just like the -score, this is also called the t-score 3..5 amplig Distributio for the ample Variace From the cetral limit theorem (CLT), we kow that the distributio of the sample mea is approximately ormal. Ufortuately, ulike the sample mea, there is o CLT aalog for variace. However, whe the idividual observatio is are from a ormal distributio, there is a special coditio uder which we ca cosider the samplig distributio of the sample variace as follows. uppose as idicated earlier,,,..., are from a ormal distributio N(, ), ad we will recall that the CLT applies to ay arbitrary distributios. The distributio of the sample variace is the Chi-quare distributio. Note the followig. For the,,...,, i i is the mea, ad ( ) is the sample variace the ( ) is the i Chi-square distributio with (-) degrees of freedom. The Chi-square is available i most basic statistics texts. 3..6 amplig Distributio for Two Variaces Whe we are cocered about the variaces from two populatios, the resultig samplig distributio of the combied variace of the two populatios, follows the edecor s F-distributio or simply the F-Distributio. The samplig distributio for two variaces is used to test whether the variaces of two populatios are equal. The F distributio is give as: F with (υ, ad υ ) where υ - ad υ -; where the otatio of or is perfuctory ad depeds o which variace is larger. Please ote that for ease of computatio, it is recommeded that whe takig ratios of sample variaces, we should put the larger variace i the umerator ad the smaller variace i the deomiator. We will see how this is doe with a umerical example later. To use this test, the followig must hold: Both populatios are ormally distributed www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page of 4
A ucam olie cotiuig educatio course Both samples are draw idepedetly from each other. Withi each sample, the observatios are sampled radomly ad idepedetly of each other. Iterval (Cofidece iterval) Estimators 4. Error of Estimatio I practical situatios, there are usually two types of estimatio problems. I oe case, we may have a costat φ which represets a theoretical quatity that has to be determied by meas of measuremets. For example, the time it takes to complete a machiig operatio, the amout of yield from a give reactio, the umber of material hadlig moves required for a certai material hadlig type, ad so o. The result Y of the measuremet activity is a radom variable whose distributio fuctio depeds o the costat φ (ad perhaps other quatities). The parameter or the ukow costat has to be estimated from the measuremets take amely;,, 3,...,. I the other case, the quatity itself is a radom variable, for example, the weights i a fillig operatio, the legth of pistos from a give machie, ad so o. I these types of cases we are iterested i the average value ador the dispersio of, where is the radom variable of iterest. Hece, we have to compute E() for the mea, ad or D (), where D (). If we wat a sigle umber to use i place of the ukow costat or parameter, the poit estimatio is the appropriate method. If we are usig a good estimator, based some of the criteria we discussed earlier, the it is uderstood that the resultig estimate should probably be close to the ukow true value. We kow that a estimator is subject to error of measuremet (i the case of the costat) ad variability (i the case of the radom variable). I other words, the sigle umber (or statistic) does ot iclude ay idicatio as to probability that the estimator has take o a value close to the ukow parameter value. Cosequetly, it is istructive to have some iformatio or some kowledge about the amout of deviatio of the computed statistic from the true value (i our case the true mea or the true deviatio). This is where cofidece itervals come i because due to the variability or the error i measuremet, we wat to establish a iterval withi which we would reasoably expect the parameters value we seek to lie. I other words, i repeated samplig ad usig the same method to select the differet samples, we would expect the true parameter value to fall withi the specified iterval a give percet of the time. Thus, cofidece itervals are established for parameter values NOT for sample statistics. For example, a 95% cofidece iterval meas that i repeated samplig ad usig the same samplig method, we would expect the true parameter value to fall or lie withi our cofidece iterval 95% of the time. Let us do some housekeepig before we delve deep oto the area of Cofidece itervals. First let us look at the error associated with the estimate. www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page of 4
A ucam olie cotiuig educatio course www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 3 of 4 We kow that is true for either positive or egative depedig o where is relative to the mea. We wat to solve for by multiply ) (, > > Thus, the cofidece iterval for the mea which is a probability statemet is give by: P 4. Determiatio of ample ize If we examie at the error associated with the mea -bar say E where E is give by E, we ca re-express as follows from estimated but ukow is if E t kow is if E E E E,, ± The questio you might have is what does this all mea or why do we eed. Well the problem is that typically o oe will give you the value of to use as your sample size. What usually happes is a compay may have a policy o the size of the error for a process which they have Figure 4: Cofidece Iterval for the Mea
A ucam olie cotiuig educatio course determied historically. Give that value ad the level of cofidece specified based o the data, the the sample size eeded to cover that error is computed. A compay may say that it is comfortable with a error of ±% beig the error betwee the true mea ad the estimated mea. Example: A compay is willig to accept a error of ± 5% with a 9% cofidece. a). Assumig that the variace is kow ad.5 uits. What sample size is eeded to guaratee this level of protectio? b) Assumig that variace is ukow ad that somehow the compay has a value of the process sample stadard deviatio that was estimated from experiece with a value of with 9% cofidece, what sample size will be required? a). if is kow E, (-.9).,.5, E.5 from the stadard ormal Table.5.95.645, ( ).645.5 7.6 7 E.5 b) t if is ukow E trictly speakig, there is o way we ca evaluate this without kowig the sample size. Remember that to evaluate the t-statistic we eed the degrees of freedom equal to -. o eve though the variace is ukow, we do have the estimate of (where is a estimate of ) determied historically from the sample, we ca use the distributio i place of the t-distributio to evaluate the sample size. Note that the t-statistic ad the -statistic is idetical whe ifiity. o, i this case we will use the value of t-statistic with υ. From the formula for, the smaller the error E, the larger the sample () required to detect the error ad coversely, the larger the error, the smaller the sample size required to detect it. (.645) t 48.5 E 4.3 Cofidece Itervals for the Mea The method of cofidece itervals is meat to provide a idicatio of both the actual umerical value of the parameter ad also the level of cofidece, based o the sample iformatio, that we have a correct idicatio of the possible value of the ukow parameter or costat. We have three differet scearios, amely Case I, Case II, ad Case III 4.3. Case I Cofidece Iterval for the populatio mea with (the populatio variace) kow or assumed. The samplig distributio is the ormal distributio ad the test statistic is the stadard ormal deviate. The (-) Cofidece Limits for is: P P www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 4 of 4
A ucam olie cotiuig educatio course www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 5 of 4 4.3. Case II Cofidece Iterval for the populatio mea with (the populatio variace) ukow ad >3. The samplig distributio is agai the ormal ad the test statistic is the stadard ormal deviate. The (-) Cofidece Limits for is computed by replacig or estimatig usig sample stadard deviatio. Note: The limits of the cofidece iterval are referred to as the Upper Cofidece Limit (UCL) ad the lower as the Lower Cofidece Limit or the (LCL) 4.3.3 CAE III Cofidece Iterval for the populatio mea with (the populatio variace) ukow ad 3. Replace with sample stadard deviatio s. The samplig distributio is the studet t distributio ad the test statistic is the studet T statistic. Hece replace with the t with degrees of freedom df υ, where υ -. If the idividual values are ormally distributed, the the cofidece iterval for is the followig: EAMPLE: CAE I For a gridig operatio A, assume that 5, 75 miutes, miutes. Fid a two-sided 95% CI (Cofidece Iterval) for. ice is give, we will assume that the samplig distributio is the ormal distributio with the sample statistic equal to the. ( ) ( ) P s s P s P ν ν ν ν,,,, s t s t P t s t P P
A ucam olie cotiuig educatio course.975 (.96() ).96. 5 5 3.9 CI 75 ± 3.9 UCL 75 3.9 78.9 LCL 75 3.9 7.8 P( 7.8 78. 9 ).95 This says that i repeated samplig ad uder the same samplig scheme, we will expect the mea of the populatio to lie i the iterval: [7.8, 78.9] 95% of the time. Example Case II For the gridig time (i sec) for aother product B, Let 36, 7 secods, 8 secods. Fid a two-sided 9% CI (Cofidece Iterval) for ice >3, we will assume that the samplig distributio is the ormal distributio with the sample statistic equal to the. s P ( s ) ( s ) (.645(8) ) 6.93, 7. 93.95.645. 5, CL ± UCL 7.93 7.93, LCL 7.93 67.87 Example Case III For yet aother product C, let 5, 5 miutes,.5miutes. Fid a 95% CI (Cofidece Iterval) for. ice 3, we will assume that the samplig distributio is the tudet-t distributio with the sample statistic equal to the t. t, υ with υ ( ) deg rees of freedom P t t,,, υ υ υ Note that studet-t is ot symmetric so t.4.5,4 (.4)(.5) 5.64 UCL 5..64 5.64 CI 5 ±.64, LCL 5..64 4.358 P( 4.358 5.64 ).975 www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 6 of 4
A ucam olie cotiuig educatio course 4.4 Cofidece Itervals for Oe Variace The samplig distributio of the variace (oe variace) is the Chi-square distributio with (-) degrees of freedom. Please ote that ulike the symmetric ormal distributio, the Chi-square is ot symmetric so the values correspodig to the tails of the distributio are differet. As a matter of fact, the Chi-square is a skewed distributio. Cosider the followig 6 data poits (i iches) from a weldig process: {4, 8,, 3, 3, } i 5 iches, the media 3. 5 iches, the Rage (3-) iches i ( ) i is the sample variace We idicated earlier that that statistic ( ) ( ) ( ) χ P χ χ 3 4 5 7 3 4.95 iches is approximately Chi-square distributio, that is. Thus, we ca establish the cofidece iterval as Figure 5: The Chi-square Distributio - χ χ www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 7 of 4
P LCL Wat: ( ) From We have: Hece: ( ) A ucam olie cotiuig educatio course UCL P χ χ P ( ) > > χ ( ) χ ( ) ( ) χ χ ; ad, hece ( ) χ ( ) P χ, ( ) χ ( ), ( ) Please ote that for the same degrees of freedom (-), χ, ( ) > χ, ( ) Example: Assume for the gridig example product D, the sample size 5, s4.9, establish a 95% cofidece iterval for the variace. 4 P χ ( 4.9) 4( 4.9).5, 4 χ.975, 4.95, from the table χ.5,4 39.364, ( 4.9) 4( 4.9) ( ). 95 4 P.95 4.639 39.364.4 P P ( 3.83 6.8). 95 46.467 4.4 Cofidece Itervals for Two Variaces (, ) The Test tatistic is: F, Note: ice F > F, υ υ, υ, υ, χ.4.975, 4 The: P ULC LCL, P F, υ υ υ υ, F,, P F,,,, F Example: uppose that i the Diametral Pitch example, the pur-gears were supplied by two supplierscliets, with the followig data, upplier :,.56 iches, upplier, 6.8 iches. Fid a 95% cofidece iterval o the ratio of the two variaces. Assume that the processes are idepedet, ad the pur-gear operatios are ormally distributed www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 8 of 4
P (.56) (.8) F.975,5, F.5,, 5 A ucam olie cotiuig educatio course F.5,5, ( ).56 F.5, 5, ( ) (.56 ).8 (.8).76 (.56) (.8) P.35.49 4.6 Oe-ided Cofidece Iterval Uder certai coditios oly oe-sided itervals may be of iterest. For example, take the case of still bars where we wat the measured stregth to be as high as possible. Our major cocer the is that the stregth values do ot go beyod a certai lower limit. I that case, we will be establishig a lower cofidece (oe-sided) iterval rather tha a two-sided iterval. O the other had, we may have a variable (say the umber of defects) i which case we wat the value to be as close to zero as possible. I that case, we oly worry about how high the value ca go. o, we wat to establish a oe-sided cofidece iterval. A oe-sided cofidece iterval is looked at as a oetailed iterval (UCL or LCL but ot both) ulike the two tails of the two-sided cofidece Iterval. That beig the case we use rather tha. UCL UCL t : P t : P, υ,, ( or ) ( or ), LCL LCL t : : P > t P >, υ ( 4.9) 4( 4.9) 4 UCL : P, LCL : P > χ χ.975, 4.5, 4 Let us use the example for CAE III example to illustrate. Assume ow that we wat a 95% lower cofidece iterval (LCL) for the gridig duratio of product C. P t.5,4 t, υ. 76 from the studet t table ( ).76.5 5.583 LCL 5..583 4.358 P( 4.358) 95%.57 www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 9 of 4
A ucam olie cotiuig educatio course Test of Hypothesis A test of hypothesis is a test o a assumptio or statemet that may or may ot be true cocerig the parameter of the populatio of iterest. The truth or falsity of such a test ca oly be kow if the etire populatio is examied. ice this is impractical i most situatios, a radom sample is take from the populatio ad the iformatio used to deduce whether the hypothesis is likely true or ot. Evidece from the sample that is icosistet with the stated hypothesis leads to a rejectio whereas evidece supportig the hypothesis leads to its acceptace. The acceptace of a statistical hypothesis does ot ecessarily imply that it is true. It does ot ecessarily mea that the hypothesis is true because if we have aother set of data, the decisio might be differet. The acceptace of a statistical hypothesis is simply a idicatio that, the data o had ad oly because of the data o had, we have bee led to accept the hypothesis. It does ot ecessarily mea that the hypothesis is true because if we have aother set of data, the decisio might be differet. This is where the issue of variability comes i The hypotheses that are formulated with the hope of rejectig are called ull hypotheses ad deoted by H o. The rejectio of H o leads to the acceptace of a alterate hypothesis deoted by H. The decisio to reject or ot reject a hypothesis is based o the value of the test statistic. The test statistic is compared to a critical value. The critical value is based o the level of sigificace of the test ad represets values i the critical regio as defied by the sigificace level. Depedig o the ature of the test, that is: Less tha ( o) Greater tha ( > o) Not Equal ( o). Based o the value of the test statistics as compared to the critical value (or the table value of the sigificace level of the test), a decisio is made to reject or ot reject the ull hypothesis. I such test of hypothesis, if the test statistic falls i the acceptace regio, the H o is ot rejected, else it is rejected. The hypothesis is the specified as: The ull is give as: H o: o The alterative is give i the form of oe of the followig: H : o H : > o H : o 5. Errors Associated with Decisios o Test of Hypothesis Decisio to reject or ot reject a test aturally leads to two possible types of errors. The reaso for the error is that the decisio is made based o iformatio from a sample rather tha the actual process populatio itself. The fact is that we are tryig to ascertai the true state of ature usig iformatio from the sample. We of course do ot kow the true state of ature ad would www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page of 4
A ucam olie cotiuig educatio course like to INFER it from the sample. This otio is perhaps oe of the most importat foudatios of statistics, amely the fact that while we do i fact seek the populatio value we ca oly approach that value by way of the sample value which i ad of itself is of limited value uless it poits us to or gives us the populatio value. All samples are take ot for their ow sake but to provide iformatio or iferece about the populatio value. The errors are the errors of Type I (), ad Type II (). 5.. Type I Error () This type of error is committed whe the ull Hypothesis (H ) is rejected. 5.. Type II Error () This is the type of error committed whe the ull Hypothesis (H ) is ot rejected. This is loosely referred to as acceptig the ull Hypothesis. It is a more cosequetial ad less forgivig error tha the type I or alpha error. These errors are aptly demostrated by the schematic i Table. TRUE TATE OF NATURE DECIION H True H False Accept NO ERROR TYPE II ERROR DECIION Do Not Accept TYPE I ERROR NO ERROR Table : chematic for Type I ad Type II Errors 5..3 The Relatioship Betwee the Type I () ad Type II () errors Note that ad are always at the opposite side of the target or what we will later call the dividig lie of criteria. However, it is importat to ote that we caot talk about committig a type II error () if we do ot kow what the true mea value is. I order words, you ca oly have made a mistake whe you kow what the target or what the aimed at value is. If we look at the real implicatio of the type II error, it says that we are acceptig the ull hypothesis whe it is false. This is a very serious error that is ot take lightly. Ad to say that we committed such a error, we must kow what the true state of ature is to say that we did commit the error of Type II. This says that give that we have ad the sample or we ca look at the probability of type I www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page of 4
A ucam olie cotiuig educatio course error as the probability of rejectig the ull hypothesis whe ideed it is true. However, if we say we accept the ull hypothesis the we must kow the true mea value to say that ideed accepted somethig we should ot have. That true mea value is deoted as. o is related to type I error () ad is related to type II error (). Note that sometimes rather tha specifically talk about, we talk about (- ) which is also referred to as the power of the test. 5..4 Computatio of the Required ample ize () give () ad () I order to exert some cotrol over a process, the egieer might specify the size of both Type I ad Type II errors that the system ca tolerate. The questio the what value of (sample) would help guaratee the level of protectio based o these error levels. Whe the uderlyig process is ormally distributed or whe our focus is o the mea of the process (as you may recall eve if the process is ot ormally distributio accordig to the cetral limit theory, the meas from the process follow the ormal distributio). Assume we have specified ad. If we also specify the we must ecessarily specify. A ketch of the relatioship betwee these parameters will help explai the procedure A Figure 6a: Locatio of ad, μ >μ Figure 6b: Exploded view of Fig 6a A www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page of 4
A ucam olie cotiuig educatio course www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 3 of 4 ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )...(4)...(3) () : () :...()...() olvig A A A A Example Let,,.5. Let. for Compute that will provide the level of protectio give by the type I ad type II errors ( ) ( ) 9 8.57.97.8.645..5 Note: if ( ) ( ) 5..5 Computatio of whe > uppose,,.5. Let? for Previously we observed: ( ) ( ) ( ), where, Note: If, the >.5 or 5% For our example:,,.5.? for
A ucam olie cotiuig educatio course.6453.464-.645.8, Ф(.8).9656 From Figure 6, -Ф(.8).344 or 3% 5..6 Computatio of whe To complete this importat example, let look at the case whe Fig 7a: ad for μ >μ μ μ A Fig 7b: Exploded view of ad for μ >μ www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 4 of 4
A ucam olie cotiuig educatio course www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 5 of 4 A A A A () : ()...()...() ( ) ( ) ( ) ( ) Φ Let 5. Operatig Characteristic Curve Operatig characteristic curves are useful tools for explorig the power of a cotrol process. Typically used i cojuctio with stadard quality cotrol plots, OC curves provides a mechaism to gauge how likely it is that a sample statistic is ot outside of the cotrol limits whe, i fact, it has shifted by a certai amout? This probability is usually referred to as or Type II error probability, For μ >μ,, For μ μ,, ( ) Φ For μ μ, ( ) for both μ >μ ad μ μ ( ) for μ μ
A ucam olie cotiuig educatio course that is, the probability of erroeously acceptig the true state of ature (e.g. mea, variace, etc.) as beig "i cotrol" whe i fact it is ot. The OC curve also provides aother measure of the test i the cotext of its overall power, amely kow the extet to which the test ca detect the effect or shift i quality level of a give metric, ofte referred to as the power of the test ad is deoted by -. Note that operatig characteristic curves pertai to the false-acceptace probability usig the sample-outside-of- cotrol-limits criterio. The sample size for establishig a OC curve is determied by the cost of implemetig the pla (e.g., cost per item sampled) ad o the costs resultig from ot detectig quality problems ad thus passig ufit products. The OC curve provides the ability to assess the risk associated with each quality level whe there is a shift i the process quality. 5.. Computatio of the Parameters of the OC Curve (or the Type II error) is the probability of acceptig the origial hypothesis H whe it is ot true or whe some alterative hypothesis, H is true. Thus is a fuctio of the value of the test statistic that is less (or greater) tha the hypothesized value. uppose the critical Value (Y-bar) for the mea based o a 95% CI is 8.8. Also, let 5, ad. We ca ow examie how varies for differet values of. 8.8 - (power of the test) 8..98 8.3.5..89 8.5.75.3.77 9 -.5.69.3 9. -..84.6 9.5 -.75.96.4 Table 3: Computatio of the parameters of the OC Curve www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 6 of 4
A ucam olie cotiuig educatio course.5 8.8 5 9.5 9. 8.8 9.5.5 5 φ (.5) φ(.5). 69 8.5 Dividig lie of criteria y-bar 8.8 Figure 8: Computatio of Operatig Characteristic Curve Data Poits OC Curve. Pa (Beta).8.6.4 eries. 7.5 8 8.5 9 9.5 Mea Figure 9: Plot of the Operatig Characteristic Curve www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 7 of 4
5.3 teps i Hypotheses Testig A ucam olie cotiuig educatio course 5.3. et up the Hypothesis ad its alterative Example H o: 9.5 g H : 9.5 g 5.3. et the sigificace level of the test ad the sample size. pecify or compute Example:.5, 5, 5.3.3 Determie a samplig distributio ad the correspodig test statistic Choose a samplig distributio ad the correspodig test statistic to test H with the appropriate assumptios. Example: Assumig kow, is ormally distributed with mea ad stadard deviatio or ε N (,). Also for the test statistic, we have C 5.3.4 et up a critical regio for the test statistic et up a critical regio for this test statistic where H o will be rejected p percet of the samples whe H o: is true Example: I our example where H : 9.5 g, the critical regio would cosist of all computed values of the test statistic ( C) less tha the table or specified value (- ). Thus, the decisio would be to reject the ull hypothesis H if C -. imilarly, for H : > 9.5 g, the critical regio would cosist of all computed values of the test statistic ( C) greater less tha the table or specified value ( ). Thus, the decisio would be to reject the ull hypothesis H if C >. 5.3.5 Perform the Experimet Example: Choose a radom sample of observatios, compute the test statistics ad make a decisio o H o 5.3.6 Numerical Examples: Hypothesis Tests for the Mea, kow or >3 i) Hypothesis for: μ μ H o: 9.5 g H : 9.5 g Reject H if C - table., Let:.5, 5,, 8.9, 9.5. Also,.95.645 www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 8 of 4
A ucam olie cotiuig educatio course With kow the samplig distributio is the ormal. The test statistic is the stadardized, hece 8.9 9.5 C.5 5 Critical Regio: All values of the test statistic less tha -.5 Reject if C -.95 C -.5, -.95 -.645 But: -.5 > -.645 Therefore, do ot Reject H. There is o evidece based o the data to suggest that the true mea of the populatio is ot 9. grams. ii) Hypothesis for: μ> μ H o: g H : > g a). Let:.5, 9,, 6. Also,.95.645,. for μ 6.8 3 Critical Regio: All values of >, that is all >.645 But.8>.645 Hece Reject H iii) Hypothesis for: μ μ H o: g, H g Let:.,?, 6, 6. Also,.995.976,. for μ 9 Reject if, (.576.84) ( 86) ( ), where 6 6 47 (.576.84) ( 6) 64 6 47 6 6 ( 6.856) 6 ice.57.976 Reject H 46.67 47.57 5.3.6 Examples for Test of Hypothesis for the Mea, ukow ad 3 i) Hypothesis for: μ μ H o: 75 H 75 Let:.5, 6, s 7.9, 7.8, μ 75 www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 9 of 4
A ucam olie cotiuig educatio course amplig distributio is the studet-t ( ukow ad 3) t (.5, 5).5. Reject if t-.5 t ( 7.8 75) 7.6 6.68 ice -.68>-.5 Do NOT REJECT H Computatio of for this example:.5, 6, assume 7.9, 7.8, 75, 7 for. ( ), where.645.84 6.745.46 ( ) 5.4 6 5.4 ummary Tests for Oe Mea 5.4. Variace kow H o: o; 7 75 7.9 H : o H : > o Reject if: - Reject if: > H : o Reject if: > Test tatistic 5.4. Variace ukow, but > 3 ( estimated from s) H o: H : o H : > o Reject if: - Reject if: > H : o Reject if: > Test tatistic: s 5.4.3 Variace ukow, 3 ( estimated from s) H o: o H : o Reject if: t - t, ν H : > o Reject if: t > t, ν H : o Reject if: t > t, ν where df ν - Test tatistic : t www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 3 of 4
A ucam olie cotiuig educatio course Test o Meas (More Tha Oe Mea) 6. Variace kow a). For two Idepedet amples, the differece betwee two meas ( ( ) The variace of the differece betwee two meas for two idepedet samples from ormal populatios., ad H o: ; ad the alteratives, amely: H : H : > Reject if: -, Reject if: > H : Reject if: > The Test tatistic is give by as show above ( ) δ ( ) ( ) - Figure : Differeces betwee two variaces Example: The maufacturig egieer has bee tasked to determie the setup cofiguratio for two cotract broachig processes. The maufacturer of the broachig machie has historical data o the expected time to complete a broachig operatio for each cofiguratio. Assume that the populatio variaces are also kow ad are as follows: 45, 5, 5, 5,, 8,.5 i) H o: ;, H : Reject if: > Note:.975.96 ( ) δ 5 45 5 5( 5) 64 5 5 64 5 64 5.95 ice (.95) (.96), Do ot Reject. The two broachig cofiguratios are essetially the same. However, because of the closeess of the critical (table) value to the computed value, additioal aalyses eed to be carried out. www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 3 of 4
A ucam olie cotiuig educatio course b) We use the Test tatic above whe we are samplig from ormal populatios. However, we ca use a modified versio whe the populatio is ot ormally distributed, but the sample sizes are large eough (>3) i which case we ca apply the cetral limit theorem(clt) ad approximate ad with ad respectively. That is ( ) ( ) ( ) Example As way to stregthe its material properties, a compay is cosiderig aealig of a piece part ad the measure the ductility. The project egieer claimed that aealig will icrease ductility by.ii percet. After tesile testig the percet elogatio as a measure of ductility for the aealed parts was. ii with stadard deviatio.35 ii ad 4. Values (percet elogatio) obtaied for the stadard material without aealig was.87 ii with stadard deviatio of.7 ii ad 4. et up the hypothesis ad at., determie if the claim by the project egieer ca be supported by the data.. H : μ -μ, H : μ -μ > (.),.., 4 ( ) δ..87. 3.3 3. Reject if > (.99.33) (.35) (.7) 4 4 4. Decisio: ice (3.3) is greater tha the critical value of.33, the we must reject the ull hypothesis. This meas that the data supports the claim of the project egieer for the aealig process. Example: Let us cosider a commo example of matig or tolerace parts, where the focus is o the optimum fit that is, the optimum clearace. Our example is a shaftbearig sceario where the clearace is zero for optimum fit. Please ote that if the clearace is less tha or equal to zero, the it would be difficult for the shaft to fit ito the bearig. Give the followig iformatio about the matig parts (shaft ad bearig), what is the probability that the shaft will ot fit i the bearig? Defie C B,,, C B C B δ Let B.73 iches,.698 iches, B.4 iches,.6 iches 4 C (.4) (.6).7x, C.34, C Note: if ay the Vax()a Var(Y) This leads to: if D-Y, the Var(D)Var()Var(Y).65 www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 3 of 4
P {( B) } C C A ucam olie cotiuig educatio course C P( C ).34.6, Φ.65 C (.6) Φ(.6).983.97 % The probability that i the matig arragemet the shaft will ot fit ito the bearig is about % 6. Variace ukow but assumed equal ad 3 ( ) H o: ; or H : - t H : or H : - Reject if: t - s t,ν p H : > or H : - > Reject if: t > t,ν H : or H : - ( ) ( ) Reject if: t > t,ν s s Where s p, df υ ( ) For the previous problem assume that the variace is ukow ad estimated from the data ad that 45, 5, 5, 5,, 9,.5, ν48, t.5, 48.68 H o: H : Reject if: t -t,ν ( 45 5) 5 5 5 p.5.6, t.67.6 5.6 5 5 Reject if t-t. But -.67>-.68, hece Do NOT Reject. However, the values are close eough to warrat further ivestigatio ad aalyses. 6.3 Variace ukow ad uequal ( ) H o: ; or H : - where : ν H : ; or H : - Reject if: t -t,ν H : >, or H : - > Reject if: t > t,ν H :, or H : - Reject if: t > t,ν t ( ) s s www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 33 of 4
A ucam olie cotiuig educatio course The above data is from two differet plats. The differece i the machiig time of two idetical operatios at the two differet plats of a multiatioal compay is of cocer to the Director of Egieerig ervices. It is believed that a differece of more tha miutes would cause a problem about cycle time which would require a major chage i the system desig. Determie what should be doe based o a test of hypotheses at.. i). H : μ II -μ I, H : μ II-μ I>, Reject if t > t t ( ) ( 97.4) II s 5 Plat I(miutes) Plat II(miutes) 8 86 65 98 97 9 34 9 9 87 4 Mea 97.4 Variace 78.8 93.33 5 7 Table 4: Machiig times for machies I ad II I s 7 78.8 5 93.33 7.6.. (( 78.8 5) ( 93.33 7) ) ( 5.76) ( 3.48) 7.4 7 t.,7.45ice t (.) t, (.47), therefore caot reject H. Hece it is reasoable to suggest that the differece betwee the two machies is statistically ot more tha miutes. 6.4 Paired Tests I some situatio, the samples for, are ot idepedet which is a assumptio we have made or implied i most of the foregoig tests. I some applicatios, paired data are ecoutered. For example, while matchig a cylidrical disk, it may be ecessary to take measuremets at two differet referece poits. I such circumstaces, the differece betwee the measuremets rather tha the actual measuremets becomes importat. The differece test is sometimes referred to as the depedecy test. The radom variable of iterest is the differece, d j where: d j j - j, j,,... H : d, H : d ( ) d j ( ) d d d d j j i d, s d υ 4 6 www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 34 of 4
The Test tatistic is give by: A ucam olie cotiuig educatio course d t, with ν ( ) s d d Example: A group of egieerig studets were pre-tested before istructio ad post-tested after 6 weeks of istructio with the followig results as show i table 5. H.5, ν 9( ), t t s :, H d d d Coclusio: Based o the test results, there is ot eough statistical evidece to suggest a improvemet due to the itervetio. tudet Before After Istructio Differece d 4 7 3 6 4 3 4 8 5-6 5 4-7 7 3 8 8 4 9 9 4 5 7 5 Table 5: Result of Post- Test Pre-Test Test of Variace :.5.36 > 9,.95.833, 3.56, ice 7. Variace from Oe Populatio Let:H o: o d H : o, reject if:, χ χ, > o, reject if: χ > χ, χ d.5, s t > t 9,.95, the o, reject if:, or ( ), df ( d d ) will > χ χ χ d reject Test tatistic.36 H ( -) χ o www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 35 of 4
A ucam olie cotiuig educatio course The samplig distributio for the variace of a populatio is the chi-square, where s is computed from a radom sample of observatios ad o is the give or specified value. Note that the Chisquare ulike the ormal is ot symmetrical. Also for a specific, ad same degrees of freedom give by ν (-): χ > χ, υ, υ Example: The populatio variace from a machiig operatio was give by the lathe maufacturer as 3. A sample from the curret machiig operatio was take with the followig values N5, 4.9..5 Test the hypothesis: H : 3 agaist H : 3 χ χ Reject if, χ χ.95, 4 ( - ) o 4 3.8(4.9) 9.8 3.848, si ce χ (9.8) > χ.95, 4 (3.848) Do ot reject H. There is ot eough evidece to believe that is ot statistically equal to 3. 7. Variace from Two Populatios F F H o:, H : Reject if:,, F > F > Reject if:,, Reject if: F > F,, or F F,, Due to the difficulty of accessig some of the data from the F-table, we recast the Test statistic ad critical regio as follows:, F Reject if: F F,, >, F Reject if: F > F,, M, F Reject if: F > F,, m M m The test statistic is the F-Distributio s s Where s > s F,, F, where >, : M m www.ucam.com Copyright 7 O. Geoffrey Okogbaa, PE Page 36 of 4