### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# APPLIED ENGRG METHODS ENGR 416

ISU

GPA 3.54

### View Full Document

## 14

## 0

## Popular in Course

## Popular in General Engineering

This 33 page Class Notes was uploaded by Jazmin Rowe II on Monday October 12, 2015. The Class Notes belongs to ENGR 416 at Idaho State University taught by W. Pan in Fall. Since its upload, it has received 14 views. For similar materials see /class/222169/engr-416-idaho-state-university in General Engineering at Idaho State University.

## Similar to ENGR 416 at ISU

## Popular in General Engineering

## Reviews for APPLIED ENGRG METHODS

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/12/15

R Reference Card by Tom Short EPRI PEAC tshortepripeaccom 20041107 Granted to the public domain See wwwRpadorg for the source and latest version Includes material from R for Beginners by Emmanuel Paradis with permission Getting help Most R functions have online documentation help topic documentation on top1c topic id help search quot topic quot search the help system apropos quot topicquot the names of all objects in the search list matching the regular expression topic help s tart start the HTML version of help str a display the internal structure of an R ob39ect summary a gives a summary ofa usually a statistical summary but it is eneric meaning it has different operations for different classes of a ls show objects in the search path specify patquotpat quot to search on a atte ls str strO for each variable in the search path dir show les in the current directory methods a shows S3 methods ofa methods classclass a lists all the methods to handle objects of class a Input and output load load the datasets written with save data x loads speci ed data sets library x load addon packages read table file reads a le in table format and creates a data frame from it the default separator sepquotquot is any whitespace use headerTRUE to read the rst line as a header of column names use as l I I ll Irl tors use commentchar quot to prevent quotitquot from being interpreted as a comment use sk1pn to skip n lines before reading data see the help for options on row naming NA treatment and others readcsv quot filenamequot headerTRU39E id but with defaults set for reading commadelimited les readdelim quot filename quot headerTRU39E id but with defaults set for reading tabdelimited les read fwf filewidths headerFALSE sep quot quotA as read a table offixed widthformatted data into a dataframe is an integer vector giving the widths of the xedwidth elds saves the speci ed objects in the XDR platform independent binary format save image file saves all objects ca ep quot quot prints the arguments after coercing to character sep is the character separator between arguments print a prints its arguments generic meaning it can have differ ent methods for different objects format x format an R object for pretty printing write table x file quot quot row namesTRU39E col namesTRU39E sep39 quot prints x after converting to a data frame if quote is TRUE filequot quot I character or factor columns are surrounded by quotes quot sep is the eld separator eoI is the endofline separator ha is the string for missing values use coInamesNA to add a blank column header to get the column headers aligned correctly for spreadsheet input sinkfile output to f1Ie until s1nk Most ofthe IO inctions have a f1Ie argument This can often be a charac ter string naming a le or a connection f1Iequot quot means the stande input or output Connections can include les pipes zipped les and R variables On windows the le connection can also be used with descr1pt1on quotc11pboardquot To read a table copied from Excel use lti readde11mquotcl1pboardquot To write a table to the clipboard for Excel use wr1tetabIe x quotc11pboardquot sepquottquot col namesNA For database interaction see packages RODBC DB1 RMySQL RPgSQL and ROracIe See packages XML hdf 5 netCDF for reading other le formats Data creation c generic inction to combine arguments with the default forming a vector with recurs1veTRUE descends through lists combining all elements into one vector from to generates a sequence has operator priority 14 1 is 2345 seqfrom to generates a sequence by speci es increment length speci es desired length seqalongx generates 1 2 1engthalong useful for for replicate x t1mes use each to repeat each 1 x each times rep c12 3 2 is 1 2 3 1 2 3 repc123each2is 33 data frame e named r unnamed arguments dataframe v14 chc quotaquot quotBquot quotcquot quotdquot n10 shorter vectors are recycled to the length of the longest list create a list of the named or unnamed arguments 11st ac 12 bquoth1quotc31 array x dim y wi data x specify dimensions d1mc 342 elements ofx recycle ifx is not long enough matrix x nrowncol matrix elements ofx recycle factor x levels encodes a vector x as afactor gl 1 k lengthnk labels1n generate levels factors by spec ifying the pattern of their levels k is the number of levels and n is the number of replications expandgrid a data frame from all combinations of the supplied vec tors or factors rbind combine arguments by rows for matrices data frames and others rep x times ement of like cbind id by columns Slicing and extracting data Indexing vectors x n nth element x in all but the nth element x lzn rst n elements x a 1 n elements from n1 to the end xc142 speci celeme x quotnamequot element named quotnamequot x x gt 3 all elements greater than 3 x x gt 3 amp 11 elements between 3 and5 x x 1n c quotaquot quotandquot quotthequot elements in the given set Indexing lists n list with elements n x n nth element ofthe list x quotnamequot element ofthe list named quotnamequot 39d X l Indexing matrices x 1 element atrow 1 column j x1 row1 XIJ xc 13 columnsl and3 x quotnamequot row named quotnamequot Indexing data frames matrix indexing plus the following x quotnamequot column named quotnamequot xSname id Variable conversion as array x as data frame x as numeric x as logical x as complex x as character x convert type for a complete list use methods as Variable information isnax isnullx isdataframex isnumeric ischaracterx I test for type for a complete list use methods 1 s length x number of elements in x dim x Retrieve or set the dimension ofan object d1m x lt7 c 32 dimnames x Retrieve or set the dimension names ofan ob39ect nrow x number ofrows NROW x is the same but treats avector as a one atrix ncol x and NCOL x id for columns class x get or set the class of x cIass x lt7 quotmycIassquot unclass x remove the class attribute ofx attr xwhich get or set the attribute wh1ch ofx attributes obj get or set the list of attributes of ob Data selection and manipulation which max x returns the index of the greatest element ofx which min x returns the index of the smallest element ofx rev x reverses the elements of x sort x sorts the elements of x in increasing order to sort in decreasing der revsort x cutxbreaks divides x into intervals factors breaks is the number of cut intervals or a vector of cut points match x y returns a vector ofthe same length than xwith the elements ofx which are in y NA otherwise which x a returns a vector of the indices of x ifthe comparison op eration is true TRUE in this example the values of 1 for which x1 a the argument ofthis inction must be avariable ofmode logi is array x cal choosen k r Lquot I m nln7klk naomit x suppresses the observations with missing data NA sup presses the corresponding line ifx is a matrix or a d a arne na fail x returns an error message ifx contains at least one NA unique x if x is a vector or a data frame returns a similar object but with the duplicate elements suppressed table x returns a table with the numbers of the differents values of x typically for integers or factors subset x s a selection of x with respect to criteria typically comparisons xSVl lt 10 if x is a data frame the option select gives the variables to be kept or dropped using a minus sign sample x size resample randomly and without replacement SlZe ele ments in the vector x the option replace TRUE allows to resample with replacement prop table xmargin table entries as fraction ofmarginal table Math sin cos tan asin acos atan atan2 log loglO exp max x maximum ofthe elements ofx min x minimum ofthe elements ofx range x id then cm1n x max x sum x sum of the elements ofx di ff x lagged and iterated differences of vector x prod x product ofthe elements 0 x mean x mean ofthe elements ofx median x median ofthe elements ofx quanti le x probs sam le quantiles corresponding to the given prob abilities defaults to 025575l weightedmean x w mean ofx with weights w rank x ranks ofthe elements ofx var x or cov x variance of the elements ofx calculated on n 71 ifx is a matrix or a data frame the variancecovariance matrix is calculated sd x stande deviation ofx cor x correlation matrix of x if it is a matrix or a data frame 1 if x is a vector var x y or cov x y covariance between x and y or between the columns of x and those of y if they are matrices or data frames cor x y linear correlation between x and y or correlation matrix ifthey are matrices or data frames round x n rounds the elements ofx to n decimals log x base computes the logarithm ofx with base base scale x if x is a matrix centers and reduces the data to center only use the option centerFALSE to reduce only scaleFALSE by default centerTRUE scaleTRUE pmin x y a vector which ith element is the minimum of x 1 y1 pmaxxy id for the maximum cumsum x a vector which ith element is the sum from x l cumprod x id for the product cummin x id for the minimum cummax x id for the maximum union xy intersect xy setdiff xy setequal x y is element el set set functions Re x real part of a complex number Im x imaginary part Mod x modulus abs x is the same Arg x angle in radians ofthe complex number Conj x complex conjugate convolve xy compute the several kinds of convolutions of two se quences tox1 f ft x Fast Fourier Transform of an array mvfft x FFT of each column ofamatrix filter x filter applies linear ltering to a univariate time series or to each series separately of a multivariate time series an math inctions have a logical parameter na rmFALSE to specify miss ing data NA removal Matrices tx transpose diag x dia onal 95 matrix multiplication solve ab so vesa 99 x bforx solve a matrix inverse ofa rowsum x sum ofrows for a matrixlike object rowsums x is a faster version colsum x colSums x id for columns rowMeans x fast version of row means colMeans x id for columns Advanced data processing apply X INDEX FU39N a vector or array or list of values obtained by applying a function FUN to margins INDEX of X lapply X FUN apply FUN to each element of the list X tapply X INDEX FUN apply FUN to each cell of a ragged array given by Xwith indexes INDEX by da ta INDEX FUN apply FUN to data frame data subsetted by INDEX merge a b merge two data frames by common columns or row names xtabs a b da tax a contingency table from crossclassifying factors aggregate xbyFUN splits the data frame x into subsets computes summary statistics for each and returns the result in a convenient form by is a list of grouping elements each as long as the variables In x stack x transform data available as separate columns in a data frame or list into a single column unstack x 39 verse of stack reshape x reshapes a data frame between wide format with repeated measurements in separate columns of the same record and lon format with the repeated measurements in separate records use directionquotwide or direction long Strings paste concatenate vectors a er converting to character sep is the string to separate terms a single space is the default collapse is an optional string to separate collapsed results substrx start stop substrings i a character vector can also as sign as substr x start stop lt7 value strsplit x split split x according to the substring Spllt grep patternx searches formatches to pattern within x see regex gsub pattern replacementx replacement of matches determined by regular expression matching sub is the same but only replaces the rst occurrence tolower x convert to lowercase toupper x convert to uppercase match x table avector of I rue elements ofx among table x in table id but returns a logical vector pmatch x table partial matches for the elements ofx among table nchar x number of characters Dates and Times The class L 39 times POSlXct includ ing time zones Comparisons eg gt seq and d1fft1me are use il Date also allows and 7 DateT1meClasses gives more information See also package chron as Date s and as POSIXct s convert to the respective class format dt converts to a string representation The default string format is 20010221 These accept a second argument to specify a format for conversion Some common formats are a A Abbreviated and full weekday name b B Abbreviated and full month name d Day ofthe month 01731 II Hours 00723 I Hours 01712 j Day of year 0017366 mMonth 01712 M Minute 0075 9 p AMPM indicator S Second as decimal number 00761 U Week 00753 the rst Sunday as day l ofweek l w Weekday 076 Sunday is 0 W Week 00753 the rst Monday as day l ofweek l y Year without century 00799 Don t use Y Year with cen u 2 output only Offset from Greenwich 70800 is 8 hours west of Z output only Time zone as a character string empty if not available Where leading zeros are shown they will be used on output but are optional on input See strft1me Plotting plot x plot of the values of x on the yaxis ordered on the xaxis plot x y bivariate plot of x on the xaxis and y on theyaxis hist x histogram ofthe frequencies ofx barp lot x histogram ofthe values of x use hor1 zFALSE for horizontal bars do tchart x if x is a data frame plots a Cleveland dot plot stacked plots linebyline and columnbycolumn pie x circular piechart boxp lot x boxandwhiskers plot sunflowerplot x y id than plot but the points with similar coor dinates are drawn as owers which petal number represents the num ber of points stripplot x plot of the values of x on a line an alternative to xplot for small sample sizes coplotx y l 2 bivariate plot of x and y for each value or interval of values of z n39lnt f1 f2 y if fl and f2 are factors plots the means of y on the y axis with respect to the values of fl on the xaxis and of f2 different curves the option fun allows to choose the summary statistic ofy by default funmean matplot xy bivariate plot ofthe rst column ofx vs the rst one of y the nd one ofx vr the second one of fourfoldplot x visualizes with quarters of circles the association be tween two dichotomous variables for different populations x must be an arraywith dlmc 2 2 k or amatrix with dlmc 2 2 if assocplot x Coheanriendly graph showing the deviations from inde pendence of rows and columns in a two dimensional contingency ta ble mosaicplot x mosaic graph ofthe residuals from a loglinear regres sion of a contingency table pairs x if x is a matrix or a data frame draws all possible bivariate plots between the columns of x plot ts x if x is an object of class quotts quot plot ofx with respect to time x may be multivariate but the series must have the same frequency and d te a s ts plot x id but ifx is multivariate the series may have different dates and must have the same frequency qqnorm x quantiles of x with respect to the values expected under a nor m 1 law a qqplot x y quantiles of y with respect to the quantiles of x contour x y z contour plot data are interpolated to draw the curves x and y must be vectors and 2 must be a matrix so that m z c length x length y x and y maybe omitted filled contour x y 2 id but the areas between the contours are coloured and a legend ofthe colours is drawn as wel image x y id but with colours actual data are plotted persp x y 2 id but in perspective actual data are plotted stars x ifx is a matrix or a data frame draws a graph with segments or a star where each row of x is represented by a star and the columns are the lengths of the segments symbols x y draws at the coordinates given by x and y sym bols circles squares rectangles stars thermometres or boxp ots which sizes co ours are speci ed by supplementary arguments termplotmodohj plot of the partial effects of a regression model 2 H mo 0 j The following parameters are common to many plotting inctions addFALsE if TRUE superposes the plot on the previous one if it exists U39E if FALSE does not draw the axes andthe box pll speci es the type of plot quotpquot points quotlquot lines quotbquot points connected by lines quot0quot id but the lines are over the points quothquot vertical lines quotsquot steps the data are represented by the top of the vertical lines quotSquot id but the data are represented by the bottom of the vertical lines xlim ylim speci es the lower and upper limits ofthe axes for exam ple with xllmc 1 10 or xllmrange x xlab ylab annotates the axes must be variables ofmode character main main title must be a variable of mode character suh subtitle written in a smaller font Low level plotting commands points x y adds points the option type can be used lines x y id but with lines text x y adds text given by labels at coordi nates xy atypicaluseis plotx y typequotnquot textx y names mtext text side3 line0 adds text given by text in e margin speci ed by Slde see ax1s below l1ne speci es the line from the plotting are segments x0 y0 x1 yl draws lines from points x0y0 to points XLY arrows x0 yo x1 yl angle 30 code2 id with arrows at points x0y0 if code2 at points x1y1 if code1 or both if code3 angle controls the angle from the shaft ofthe arrow to the edge of the arrow hea ahline a h draws a line of slope b and intercept a ahline hy draws ahorizontal line at ordinate y ahline vx draws avertical line at abcissa x ahline lm obj draws the regression line given by 1m0bj rect x1 yl x2 y2 draws arectanglewhich left right bottom and top limits are x1 x2 yl and y2 respectively polygon x39 y 39 39 linkiu 39 p 39 quot quot by x legend x y legend adds the legend at the point xy with the sym given by legend title adds a title and optionally a subtitle axis side vect adds an axis at the bottom Sldel on the le 2 at the top 3 or on the right 4 vect optional gives the abcissa or ordinates where tickmarks are drawn rug x draws the data x on the xaxis as small vertical lines locatorn type nll returns the coordinates xy a er the user has clicked n times on the plot with the mouse also draws s bols typequotpquot or lines typequotl quot with respect to optional graphic parameters by default nothing is drawn type nquot Graphical parameters These can be set globally with par many can be passed as parameters to plotting commands adj controls textjusti cation O leftjusti ed O 5 centred 1 rightjusti ed hg speci es the colour of the background ex bgquotredquot bgquotbluequot e list ofthe 657 available colours is displayedwith colors h ty controls the type of box drawn around the plot allowed values are quot0quot quotl quot quot7quot quotcquot quotuquot ou quot quot the box looks like the corresponding char if btyquotnquot the box is not drawn cex a value controlling the size of texts and symbols with respect to the de fault the following parameters have the same control for numbers on e axes cexax1s the axis labels cexlab the title cexma1n the subtitle cex sub col controls the color of symbols and lines use color names quotredquot quotbluequot see colors or as quotRRGGBBquot see rgb hsv gray and rainbow as for cex there are colax1s collab colma1n col su font an integer which controls the style of text 1 normal 2 italics 3 bold 4 bold italics as for cex there are fontax1s fontlab ontma1n fontsub las an integer which controls the orientation ofthe axis labels 0 parallel to axes 1 horizontal 2 perpendicular to the axes 3 vertical lty controls the type of lines can be an integer or string 1 quotSolldquot quotdashedquot 3 quotdottedquot 4 quotdotdashquot 5 quotlongdashquot 6 quottwodashquot or a string of up to eight characters between quot0quot and quot9quot which speci es alternatively the length in points or pixels of the drawn elements and the blanks for example ltyquot44quot will have the same effectthan lty2 lwd a numeric which controls the width of lines default 1 mar a vector of4 numeric values which control the space between the axes and the border of the graph of the form c bottom left top r1ghtthe defaultvalues are c51 41 41 21 mfcol a vector ofthe form c nr nc which partitions the graphic window as a matrix of nr lines and nc columns the plots are then drawn in columns mfrow id but the plots are drawn by row pch controls the type of symbol either an integer between 1 and 25 or any si gle character within quotquot 1 8 96 0e MXX 233 3st 4m 5 16 17 180 190 20 210 22B 230 24A 25v xx aa ps an integer which controls the size in points of texts and symbols p ty a character which speci es the type ofthe plotting region quots quot square aximal tck a value which speci es the length of tickmarks on the axes as a fraction of the smallest of the width or height of the plot if tck1 a grid is draw quotmu m n tcl a value which speci es the length of tickmarks on the axes as a fraction ofthe height of a line of text by default tcl xaxt if xaxt quotnquot the xaxis is set but not drawn use il in conjonction with ax1ss1de1 yaxt if yaxt quotnquot the yaxis is set but not drawn use il in conjonction with ax1ss1de2 l o 81 Lattice Trellis graphics xyplot y x bivariate plots with many functionalities harchart y x histogram of the values of y with respect to those of x do tp lot y x Cleveland dot plot stacked plots linebyline and column bycolumn dens i typ lo t x density inctions plot histogram x histogram of the frequencies of x hwplot y x boxandwhiskers plot In the normal Lattice formula y x l g1g2 has combinations of optional con ditioning variables g1 and g2 plotted on separate panels Lattice functions take many of the same arguments as base graphics plus also data the data frame for the formula variables and subset for subsetting Use panel to de ne a custom panel function see apropos quotpanelquot and 111nes Lattice inctions return an object of class trellis and have to be printed to produce the graph Use print xyplot inside functions Where auto matic printing doesn t Work Use lattice theme and lset to change Lattice defaults Optimization and model tting fn method c quotNelderMeadquot quotBFGSquot quotLBFGS B quot quot SANNquot generalpurpose optimization par initial values fn is function to optimize normally minimize nlm f p minimize function f using a Newtontype algorithm With starting va ues p in formula t linear models formula is typically ofthe form response termA termB use I y I x Z for terms made of nonlinear components glm fo rmula fami ly t generalized linear models speci ed by giv ing a symbolic description of the linear predictor and a description of the error distribution f ami 1y is a description of the error distribution and link function to be used in the model see fam1 1 nls formula nonlinear leastsquares estimates of the nonlinear model optimPar quotCGquot I ararneters approx x y linearly interpolate given data points x can be an xy plot ting structure spline x 37 CUbic spline interpolation loess formula t apolynomial surface using local tting Many of the formulabased modeling inctions have several common argu ments data the data frame for the formula variables subset a subset of variables used in the t naaction action for missing values quotnafa11quot quotnaom1tquot or afunction The following generics o en apply to model tting functions predictfit predictions from fit based on input data df residual fit returns the number of residual degrees of freedom coef fit returns the estimated coef cients sometimes With their standarderrors residuals fit returns the residuals deviance fit returns the deviance fi tted fi t returns the tted values logLik fi t computes the logarithm of the likelihood and the number of parameters AIC fi t computes the Akaike information criterion or AIC Statistics aovformula analysis ofvariance model anova fit analysis ofvariance or deviance tables for one or more tted model objects density x kernel density estimates ofx binomtest 39rwisettest powerttest prop test t test 0 use helpsearch quottestquot Distributions rnorm n sd1 Gaussian normal rexp n rate 1 exponential rgamma n shape scale 1 gamma mean0 rpois n lambda Poisson rweibull n shape scale1 Weibull rcauchyn location0 scale1 Cauchy rbeta n sha e1 shapeZ beta rtn df Student t rf n dfl df2 FisherrSnedecor F x2 rchisqn df Pearson rbinomn size prob binomial rgeomn prob geometric rhypernn m n k hypergeometric rlogisn location0 scale1 logistic rlnormn meanlog0 sdlog1 lognormal rnbinomn size prob negativebinomial runifn min0 max1 uni orm rwilcoxnn n rsignrank nn n Wilcoxon s statistics All these functions can be used by replacing the letter r With d p or q to get respectively the probability density dfuncx the cumulative probability density pfuncx and the value of quantile qfunc p with 0 lt Programming function arglist expr inction de nition re turn value ifcond expr ifcond consexpr else altexpr forvar in seq expr while cond expr repeat expr break I Use braces around statements ifelse test yes no a value With the same shape as test lled With elements from either yes or no docall funname args executes a inction call from the name of the inction and a list of arguments to be passed to it C HJW39S 72mg 91 Hypothesis Testing 911 Statistical Hypotheses Statistical hypothesis testing and con dence interval estimation of parameters are the fundamental methods used at the data analysis stage of a comparative experiment in which the engineer is interested for example in comparing the mean of a population to a speci ed value De nition Is A in LI a 39ltquotll JIH alfmlll lllL MIII rII IM39lil w HIWUI Jc HI 111m Hill r39lliillh H IH 91 Hypothesis Testing 911 Statistical Hypotheses For example suppose that we are interested in the burning rate of a solid propellant used to power aircrew escape systems Now burning rate is a random variable that can be described by a probability distribution Suppose that our interest focuses on the mean burning rate a parameter of this distribution Speci cally we are interested in deciding whether or not the mean burning rate is 50 centimeters per second 91 Hypothesis Testing 911 Statistical Hypotheses Twosided Alternative Hypothesis 337 H 51 111111II Hag39IIJIR I m Hj 1j11i null hypothesis HI n i 5H rum11139Irrr pigr wurml alternative hypothesis One sided Alternative Hypotheses fr n 5 centimeters per Hesmud H n 5 Ltcrlln rnslrra perm01m HIquot HI L 5H urml imcturw I m3139 H39Q39filllti HI Ir 5H L39urylin nctcra ml arrgum 91 Hypothesis Testing 9 11 Statistical Hypotheses Test of a Hypothesis A procedure leading to a decision about a particular hypothesis Hypothesistesting procedures rely on using the information in a W from the population of interest If this information is consistent with the hypothesis then we will conclude that the hypothesis is true if this information is inconsistent with the hypothesis we will conclude that the hypothesis is false 91 Hypothesis Testing 912 Tests of Statistical Hypotheses j jn it 2 5t LiL fl Ililquotlj39i ijflquot ri pct a39ul 1tl HI fl 39 It LgLrlilllIalelH 15 i Hajeit39HLI crith Veg3m ref 01 chi Hui realm Reject H133 Fail to Rejett HO Reject Hg jl 50 crnfe it 50 crnx s ji gt 50 cms 3 H e 50 mutt he 68W Value Figure 91 Decision criteria for testing H0tt 50 centimeters per second versus H1ztt i 50 centimeters per second 91 Hypothesis Testing 9 12 Tests of Statistical Hypotheses De nitions Rojasgun the null l 39 111l u w l H quot s L39l I H H lruu in Llcl39il uul mi Failing to I L TjJl lhc null hfgliL39nllcsiw 39uxhsn 11 is llllac is LlC HCLI m 1 91 Hypothesis Testing 912 Tests of Statistical Hypotheses Table ELI intuitions in Ilt39pzktthcrair Testing 1 3 tquot i H quotI I1 quot l a 39I39 l It l39 39i39ll 3quot fl I l 51quot 134 W Lquot39lquot39 3 I m asl l39ul39 lf3939u H Cl39l t tl39 19inquottquot39l 9 ljJl tvJ I quotl39l lf1l39 Hm L I ml39 t1 FHypc I error 1 fi39lil39t lt tf l Hi3 RESIN HQ la I39LIC e Sometimes the type I error probability is called the significance level or the aerror or the size of the test I Hypotheses lica IS 51 L 116313 1 1 n H 5H 1 l w INT l ll ll 5 39ll1t a 9 a EnlLlh39a 4H luw Ilm Llxu r m 39lu II1s trillgill 4H5 5H TI ml 2 39l 1 p 39I39l 1kquot lim 4 4 3 1 1115 l J LITIIA H N717 H Hx39t l quot3H1 1911 FEE r r I i 91 Hypothesis Testing 912 Tests of Statistical Hypotheses v 3913quotZ CL7 35 S39L quot 39 39 21139 3 33939 7quot Equot J z 1 a urge 6133 X 39lquot L39I IliL39uI I39afgyeil l I39ln39 LL 2 ill 39Lquot39quotquotllf quotquot LL 39quot I Fi n39n E IIIquot 21 r E H p 1111 I 1 q E q 1 1d 0 Hypothesis Testing 3 A M II L3939quotu39 1 Jill I ruL39I H 393939 n Hr Ia allay PL h fW Hi 1 ELSW5 HWMH1LL 5 MW Jl39riil l39 Hlu Evil LJI Idgr Hg 2 Figure 9 3 The M probability of type II error when p 52 and n10 j 1 394m 48 50 E E4 36 Ll llypulhcsis Testing l 39H39a L39I IUI39 M JEIII I I39uI39Ll H a 39 rn Hi3 Ix EllaJr UL H 3 H143 5 H 5ij J LJruezier H 331 5i Under Hi In 515 Figure 94 The probability of type II error when p 505 and n 3 10 PT an lr 1 1411 I I F 5 393 J l Hypothesis Testing Figure 95 The 5 14 probability of type II error when 4 42 and n J nxl H NEE I Hdx H was wN I 1 wk n 2 1 a i r r f h r Il Ifquot J 1 z 7 I s U S n l Illa I I 1 I i a r Cir mr2 rl xx fury Il FEE H 1 r r H u mxw H 1 wiwmob Ema 25 T 11le I 3913 3 kind llhquot quots 5 i In 1 tr quot I 395 3939 392 ml ll39l gs ill ILJI I 14L 2quot L h I I quot139 N3MII1L xl 39439lt 4lquot 39llu HI 4 I39m II 11 I I1 HIII3939H39ILH39 m l 39 llt39ll 5rm 139 Z r HHH m 46 431311 2 H12 1w mum Hi I If a IllJ a l39 39 quotI II39 II Ll Hypothesis Testing 39 quot 3 LL 39 quotI Ll Iquot Huh I quotIlll39a L39LIl l39aJHI H IIHIII Iii Zlm quotquot391quotH L 7 tillIL 45 43 1quot NE 39 Inhu Ia I39M 5 mil 1 1 X If1 z W Ijilrf3j m Iijt2 4 miju39jujjnijl H24394 9 1 Hypothesis Testing liuuh n 43 I a 43 44 412 K uuplunyc Ha I11 1 H 339 91 Hypothesis Testing Definition 39I39lu39 pmwr mlquot 1 wltlll llell lq al IH In lfI39LIIJZII IlllljJ ulquotulnt the null l ljrl tulItem ii 39quotI 39ll libquot Jillil39litlll39k39L 393939 Hli L39lgt ll lll39 The power is computed as l 3 and power can be interpreted as the probability of correctly rejecting a false null hypothesis We often compare statistical tests by comparing their power properties For example consider the propellant burning rate problem when we are testing H O u I 50 centimeters per second against H l u not equal 50 centimeters per second Suppose that the true value of the mean is u I 52 When n 10 we found that B 002643 so the power of this test is 1 B l 02643 07357 when u 52 9 l Hypothesis Testing 943 OneSided and TwoSided Hypotheses TwoSided Test Jill 13 LL Hui II T 39 H I p p One Sided Tests fluff H39 M HIV t I H Il 139 Lil quotm p fJ II 139 I 139 l 3 H HII 9 1 Hypothesis Testing Example 91 iHHHILI I 13 Wl391quot1JHTII39II I lll quotl l39quot lulu l39fI l39rltlg39I39I39L Ellyprim lllill IIquot ll u l ulll39nlngg rillc In lama lll39l 39 5 L39L39IHI I ms 3939 MIL39HHLI Ilkl ll39l 1quotIl39F39CI ll39llh WI 39l Hll Hl 39 zi39ll39llfllhllll I lfIl u lll 39 LRLn39l ll 39I l H39xlkifl ltl FIJ millll39lL3939quotT Iquot 39 T quotu3939k39lquotl39lLl Hunquot thus L39I39IIIL39ul I quot39IHI1 llx H ll39l thus lifl39UCI39Wllllt39llhlll39lx tl quotllquot39Llll1 IVIIl Timtn39 Ih quot 139 n gt 5 39L39I r11lquotfr In dlquot If H 11 Mllhllll L39m nxglllalun ll m alulul39ncnl L39llmll l39 39 Ilfj l llfllIIL39M39R Will I IlellL39c lh gru nu HI i I1iILi Nutluc Hm Lultlmu l mu null I IfII39THll l 1 l IH HILHCLI With an mluznl MEI ll rx llHLILJI39HILHILI I Il lqllltIL ul IjI ulllt HIGH I m HIW L II iCtI Mquot I c Lln39H39quotLl nLllu w allJ39mllw n l m ll nww 39I39l ls I39nrc I llillng 1n I C ICL39I Ht Linm Hui l l I L39EIH llLu I p 2 5H L39cl nlunclqu lwl mpgnlMJ mlljy Mn unl39a39 lhzul LIU I39H39Il ILI U HII L39rl39IgTquot quot39ILlu39l L3939 II Hl quotLquotrl ill3 1 PeValue The Pvaiue measures the plausibility of The smaller the Pvalue the stronger the evidence is against HO If the P value is sufficiently small we may be willing to abandon our assumption that H0 is true and believe H1 instead This is referred to as rejecting the null hypothesis Hypothesis Tests and Cl s Both confidence intervals and hypothesis tests are concerned with determining plausible values for a quantity such as a population mean y In a hypothesis test for a population mean u we specify a particular value of y the null hypothesis and determine if that value is plausible A confidence interval for a population mean u can be thought of as a collection of all values for u that meet a certain criterion of plausibility specified by the confidence level 1001 a The values contained within a twosided level 1001a confidence intervals are precisely those values for which the P value of a two tailed hypothesis test will be greater than or lOUO lPOON 91 Hypothesis Testing 914 General Procedure for Hypothesis Tests From the problem context identify the parameter of interest State the null hypothesis H0 Specify an appropriate alternative hypothesis H Choose a signi cance level or Determine an appropriate test statistic State the rejection region for the statistic Compute any necessary sample quantities substitute these into the equation for the test statistic and compute that value Decide Whether or not H0 should be rejected and report that in the problem context 92 Tests on the Mean of a Normal Distribution Variance Known 9 21 Hypothesis Tests on the Mean We Wish to test H p p31 f HIT p 5 p The test statistic is mix 239quot Iii 1 39l 92 Tests on the Mean of a Normal Distribution Variance Known 9 21 Hypothesis Tests on the Mean Rej ect HO if the Observed value of the test statistic Z0 is either 20 gt Zaz 0r 20 lt quotZaz Fail to reject H0 if quotZaz lt 20 lt Zoe2 92 Tests on the Mean of a Normal Distribution Variance Known 90101quot x t39 39 l T39 NIquot 39 I quot Clili al I39iH I Cilili 1 Iginn Ililiral Iin i 3 LawHymn r lullnIIv i 1I1 I39ll yl r IIjlI 344 lquot jquotl l I 2H 39 2 a I v 2 fr 439 I 2 I39In dim Il39ullllsll39l nl39x quot3939I39I393939I quotquot L L 39 ll39ll39 Ill mmul luggt11 ll39ul Iu Illa w I II39 I39 1Illa39l39lll39 L 7 4 n ll Ilia ngt139ma 11hn39ull quotquot n 111 pm 411 IL39I Ihu lt Icllt slitsmnu39a quotquot n 3939391 pm 92 Tests on the Mean of a Normal Distribution Variance Known Example 9 2 IZIIH I hc lwmm lulu Hiquot I m II39H Allil x39lfx39 trauxllfc wj3939Ha39l l l w XIII Lquot 39J39I arLl h u nulld I II39Lquott muHam I x all I ll fnrltlnl TI39HkIllL39l L1II 39uslanalup SpunHutuum I39uc lull ll u nmn luwnm IquotIl39 I IHIHI 5H a39xfl lll x 39quotlquot Mir HM39Ljnmlo Kg39 lgl u r39quot llml llq gtII1 1Lt4l 4tquot3939IHI I Hl39 HI39HIH39 Iquot ll quot In 1 3 2 L39zj lllII I IL39I39I r1 l39TIJI M39t39H L ilil n xiixlfx39l lI39I nl39HL39I le39Irtl H H quot 3939l39lh39fx LI In I I39I39I HI39 31 quot7 IIquot or MLHIIIL39LIHgu lu fcl HI 1 2 HM LII ILI ag39IJplra I Inmlul l l ml39l nl fIc HI H J IHLI I ff Emma t Hilllil lu39 I3939139LI39J quotuquot1 nn39 luluquot ul 2 Flu L39cnlnnctcrfw I Mquot mstsnmi hill runnin l l ml ul l39l HII IHH HI IHUliI In LII LIII139Il l 92 Tests on the Mean of a Normal Distribution Variance Known Example 92 W nmjx39 u39 hr1 I39rnlwlql39l l quotj3939 Iirllm a39lng il lc I1 gtIL391 mrL 39ltur t39vlIImL m Hunmm 21 14 URI 439 I l 3941 i a n o i ll I lrl ll l 139 lv rtll lll39lquotI39I l39 nl39 ll ll xquotquot39 39l M M Hy LL 7i 1 L quotl Il39l uL39lClquot IVquot Il39l nf lg39rsl thllkllt In In L I 5 lquot39lquotllIll39l39e39ltfl39 peg139 Ills I llann l uLH39I IIIIg lulls IHL39 39HHIL 3 ILL l 139 quot 1quot 9 2 Tests on the Mean of a Normal Distribution Variance Known Example 9 2 5 39 7 739 39I3939Kl 13911 aquot IT H Hl39 I39 I V39 39fe Kaila llilll I lla I39Cralllln I l39m n aIg39p 4 39x 1 39quotLquot quotm alwgI m u HHS md w Ihg uunqtll x ulr39 Ilia PHIgill 13939t39v l ll39 til w l39l39rn LII ILI ml I 39nl l39il ultll Inna HIHL39L39 T kilit39lmannt Hilly3 39I Z 5 I 3 tIHLl T 39 39 quot r m 12 Mn mm M 4 m 5H allhu39iLHS lcvclx lj i llHyZII IL39xL Slated I nul39u Ljul39nplslql rm L39mquotlL7lId ll ml Hm I ll31 l fiLII JHng 111 Llll Icl39x Imm 7 L39quotHII ng39lcl s I39TClquot wism ntl lam3d Mn LI azu nl tlJ I 5 l39l ILj39tIHlIIRIIT Iag39I Il m II ItIL39l II IL39I39L39 IN rIquotHI I quot quotlLi39I Iu hill Ilia I39i lzfdl l I ll H39N k39ul ltl quotlll mng min 39quot L39iquotCii 5H urnII39I39wlLI x 9 21 Hypothesis Tests on the Mean I39M I39ILI y w LL J IHquot I 39lllquot39l39 H lIUI quot Il39 nll HC w HH ll la I39HL39LI 1 LL I quotIIIL39 I15 TH39IJl Ir HtfHILI39 Hlll39tywv Hm 39 H ulx39 EL H p WM H39 N l II 139 lath3 ICHI HMIIHHL39 nl w39 ll ml 1 In L L39H HIquot I139LI39Illtuu 1393939Inn l139quotl nr I39I 39 9de lquotLquot3939I39 lle Ix In L39urlmI Il ml Hquot Li 2 LL IN lillwu I quot HLIL quotlu ll u grillml I cT It39u x ll39l ll r lltl lzlil nll39 Inc wizll ulzlnl Hurnml ll lulllun xll lLI Hg llA139 mim l lLllu39d atllll ulfn 1 hm Lugs Illl zll Ia quotquotUIII4 l39L39L L39l 33 Ilu quot l I 1m l1u39J39I39 In I lquotquotquot3939 quotf4quotIw HIHIHquot I luff1 H M Mi i fl quot LI Ll1quot Ila llh lqrl 139 IIIT IIL7Z 14 IquotL39C l H il libs Illlu HI I Um Hmzlll IIhul If Hit Illll l39x39fvluln Ix Ill ll lk39 IIJ HUI39 l3 HIquot ll39 erIM x ill 39 39 all39ILIZII Ll I IL rl39l39l39n Jl Ll wifll llllnll mm MINDSCI II guru 39v39 Im 39IIHI x l glk k39l ll I lIJri

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "I made $350 in just two days after posting my first study guide."

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

#### "Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.