Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lab 1 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

LAB 1

Engineering Statistics I (MA223)


Enna Hitchcock, Aakash Goswami, Tom Thomas
Updated: 2021-08-09
tear = tibble(
`FL` = c(157, 216, 148, 216, 216, 187, 210, 142, 173, 216, 154,
163,161,197,167,173,195,183,200,185, 216, 216, 216, 203, 38, 203, 25, 216,
216,
63),
`IA` = c(23, 30, 5, 110, 137, 24, 5, 15, 63, 25,
46,71,42,92,57,75,54,132,38,120, 70, 64, 13, 13, 19, 10, 13, 19, 44, 32)
)

Question 1: Parameter(s)
Define the population parameter(s) of interest associated with the research objective. Only define parameter(s)
that are specifically associated with the research objective. Include both the definition in the context of the
problem as well as the symbol you will use to represent the parameter(s). Hint: look at your Model in Q3 and
your Hypotheses in Q4.

The parameter of interest is the slope (B[1]) of the relationship between IA and FL, or the
average change in IA given a one unit increase in FL.

Question 2: Variables
List all variables which you will record on each unit of observation (subject) in the sample. You should clearly
identify the role of each variable listed (e.g., response, predictor, factor, block, or extraneous variable…note, not
all types of variables may be present in your question). Be sure to specify the units of measurement, when
applicable.

FL: Distance from start point of longest distance of actual to intended tear (in mm)
(predictor) IA: Longest distance of actual to intended tear (in mm) (response) Tester: the
specific individual who ripped the paper. Tester one generated datapoints 1-10, tester two
generated datapoints 11-20, and tester 3 generated datapoints 21-30 (Extraneous variable)

Question 3: Model
State an appropriate model for the data generating process.

FL: (flat to longest)= Distance from start point to the point with the largest distance
between the actual and intended tear (in mm) (predictor) IA: (intended to actual)= Longest
distance of actual to intended tear (in mm) (response)
(intended to actual)[i]= B[0] + B[1] x (flat to longest)[i] + E[i]
Where B[0] is the intercept, so the intended to actual distance when the flat to longest
distance=0 (in this context it will almost certainly be an extrapolation). B[1] is the slope, so,
for every one unit change of the flat to longest distance, the intended to actual distance will
change by B[1] units. E is the error or noise in the measurement for the ith value.
Question 4: Hypothesis
If appropriate, state the hypotheses associated with the research objective using the parameters you defined
above. If the research objective does not involve testing hypotheses, clearly identify the parameter you will
estimate and with what level of confidence this parameter will be estimated.

H[0]: (intended to actual)[i]= B[0] + E[i] H[1]: (intended to actual)[i]= B[0] + B[1] x (flat to
longest)[i] + E[i]
H0 states that there knowing the flat to longest distance will not help you to better predict
the intended to actual distance, in other words, that the flat to longest is not associated
with the intended to actual in a linear fashion and so does not belong in the model, or
B[1]=0. H1 says that you can better predict the intended to actual distance if you know the
flat to longest distance.

Question 5: Data Collection


In one or two paragraphs, describe your data collection procedure. There should be enough detail of the process
that an outside party could re-create your collection scheme. As a part of your description, state the practices
implemented during data collection which helped create a set of measurements that should be representative
of the population (for example, the use of randomization).

Each tester tore 10 sheets of paper, and recorded the IA and FL for the half of the paper
torn with the longest IA length, for a combined total of 30 observations. Data was collected
using 3 testers, each using the standard printer paper located in their house. We used
standard 8.5“x11” (216mm x 280mm) printer paper. We started by lightly marking the
intended tear line down the middle of the paper with a pencil so that the tear would be
nominally parallel to the 216mm side of the paper. Each tester then tore down the middle,
attempting to separate the paper into two 210x148.5mm sections following the line drawn
earlier. The paper was not scored or folded prior to tearing. We used 3 testers, with each
tester ripping the paper in whatever way felt most natural to them while sitting. This was
to ensure that the style of tearing used for the sample would be as representative of the
true population of all tears made in a4 paper as possible. We also did not control for the
brand of printer paper used, further randomizing the sample. The data was imputed into R
studio in the order it was collected for each tester, so that the first 10 data points are from
the first tester, data points 11-20 are from the second tester and so on.

Question 6: Limitations and Sources of Error


A limitation to a study is a setting that was the same across all observations and limits the population of
interest in some respect. Certainly, in order to complete your study in the allotted time, you will need to impose
limitations on the scope of your study. That is, if you were to conduct the study again with more time and
resources, you might have done a few things differently. A source of variability is something that differs from
one observation to the next and contributes to why the responses differ across observations. State one
limitation of the study design and describe why you believe it is a limitation. Then, state one source of variability
in your study. Note: “sample size” is not a valid “limitation.”

Each person is tearing the paper using a different style of grip (we did not control for finger
placement on the paper or the distance the paper was held from the body or the speed the
tear was performed) and using a different brand of paper. Though the variations in testers’
tear method and paper brand allows the sample to be more representative of the wider
population of interest’s diverse tearing conditions, it is also a source of variability, and with
the small sample size, that variation is quite pronounced and likely contributes to a large
part of the variability in the response variable, as knowing the tester gives you information
that allows you to better predict IA given FL.
A limitation of the study is that it only tested rips performed while testers were sitting. In
the real world, paper is torn in a variety of positions: while sitting, standing, crouched over,
while the paper is held outstretched or close to the body etc.and these different locations
and positions will change the muscle groups used and the force each person can apply due
to how they how they hold the paper. In the future, testing more positions would help make
the sample more representative of the wider population.

Question 7: Graphic
Construct and describe a graphical summary of the data collected.
qplot(data = tear,
y = IA,
x = FL,
geom = "point") +
labs(y = "IA (in MM)",
x = "FL (in MM)")

The majority of the data is centered between 150 and 216 mm from the initial tear point of
the paper and IA ranges from 0 to 175mm. There does not appear to be a linear
relationship between FL and IA. There are 3 outliers with smaller then typical FL values of
25, 38, and 63mm.
Question 8: Conditions
State any conditions/assumptions of the statistical inference technique you are planning to use. Also, discuss
how reasonable you feel each is. If any plots are generated to do this, they should be included here.
tear.model = specify_mean_model(IA ~ 1 + FL, data = tear)
tear.diag = obtain_diagnostics(tear.model, data = tear)

qplot(data = tear.diag,
sample = .resid,
geom = "qq") +
labs(x = "Theoretical Quantiles",
y = "Sample Quantiles")

qplot(data = tear.diag,
y = .resid,
x = .fitted,
geom = "point") +
labs(y = "residuals",
x = "predicted values")
qplot(data = tear.diag,
y = .resid,
x = seq_along(.resid),
geom = c("line", "point")) +
labs(y = "Residuals",
x = "Order of Observations")
1- The error in the
response has a mean of 0 for all values of the predictor. -To evaluate this we look at a plot
of the residuals vs the predicted values. If the mean at all points in the line is 0, then the
model has been correctly specified and we can reasonably assume the this condition is met.
In this graph, the mean is zero except for the portion of data with predicted values between
40mm and 50mm, so it is not reasonable to conclude that the model has been been
correctly specified, and assuming this condition is met would also be unreasonable. We can
also see the 3 outliers with predicted values around 20-25mm, which are not part of any
trend.
2- The error in the response for one subject is independent of the error in response for any
other subject -This condition requires us to only gather data from one half of the torn
paper, instead of collecting 2 data points per tear. That way, any given tear only impacts
one data point. We can look at the plot of the residuals in the order they were collected to
see if there is a trend which suggests a departure from independence of the errors. As the
data is ordered with each tester generating 10 consecutive data points, we can see 3
distinct sections each with their own level of variability, and one section/testers data
(observations 7-17) has a clear upwards trend. This suggests that the tester selection
impacted the variability, and thus we cannot assume the conditions for independence have
been met.
3- The errors are identically distributed for all values of the predictor. -The errors are not
identically distributed. Looking at the graph of residuals and predicted values there is less
variability for smaller predicted values then larger ones. As the spread varies based on the
value of the predictor, it is not reasonable to assume that this condition has been met. The
three outliers mentioned earlier do skew the data, as the extend the range of predicted
values by 2x, which makes the trend harder to see. It is clear that the spread between
predicted values of 40-50 is different from the spread between predicted values of 50-60.
4- The errors follow a normal distribution. -If this condition was met we would see a
straight line on the probability plot, however we instead see a clear bowing of the data,
indicating that it is not reasonable to assume that the error in this data follows a normal
distribution.

Question 9: Analysis
Provide all relevant computer output here from the statistical analysis you used to address the research
objective (e.g. p-values, confidence intervals, model fits, et. cetera). If your analysis requires any
conditions/assumptions that you found unreasonable, please be sure to describe those here.
tear = tibble(
`FL` = c(157, 216, 148, 216, 216, 187, 210, 142, 173, 216, 154,
163,161,197,167,173,195,183,200,185, 216, 216, 216, 203, 38, 203, 25, 216,
216,
63),
`IA` = c(23, 30, 5, 110, 137, 24, 5, 15, 63, 25,
46,71,42,92,57,75,54,132,38,120, 70, 64, 13, 13, 19, 10, 13, 19, 44, 32)
)
tear.model.h1 = specify_mean_model(IA ~ 1 + FL, data = tear)
tear.model.h0 = specify_mean_model(IA ~ 1, data = tear)
compare_models(tear.model.h1,
tear.model.h0,
assume.identically.distributed = FALSE,
assume.normality = FALSE)

source df ss ms statistic p.value


1 Additional Terms 1 2966.375 2966.375 2.110552 0.0148
2 Error 28 39353.925 1405.497 NA NA

estimate_parameters(tear.model.h1,
confidence.level = 0.95,
assume.identically.distributed = FALSE,
assume.normality = FALSE)

term estimate standard.error 95% lower 95% upper


1 (Intercept) 14.109055 10.27979457 -7.34390701 33.1786485
2 FL 0.196875 0.07886382 0.04877148 0.3556566

summarize_model_fit(tear.model.h1)

# A tibble: 1 x 8
r.squared sigma logLik AIC BIC deviance df.residual nobs
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int>
1 0.0701 37.5 -150. 307. 311. 39354. 28 30

In order to do the analysis, we needed to assume that the error in the response has a mean
of zero for all values of the predictor, and that the error in the response for one subject is
independent of the error in response for all other subjects. In the response to question 8,
we described why it would be unreasonable to assume that these conditions have been
met, but we will assume they have been met anyway as they are necessary if we are to do
any sort of analysis.

Question 10: Conclusion


Based on the results above, interpret your findings in context. That is, what can be concluded about the
research objective/question?

Average response line: (IA)[i]= 14.11 + 0.20 x (FL)[i]


The P value of 0.018 means there is some evidence against the null hypothesis that
knowing the flat to longest distance does not allow us to better predict the intended to
actual distance.
The 95% confidence interval for slope is ~0.05-0.36. Since the only plausible values of
slope do not include zero, we can say that there is evidence of a linear relationship.
However, looking at the R^2 we see that the predictor in our model only explains 7% of the
variability in IA, which is quite low. This means that we are likely missing a relevant part of
the model, such as isolating for the tester’s tear style or brand of paper used. With an R^2
so low, caution should be used as there is too much variability to make precise predictions.
In summary, while there is evidence of a linear relationship between IA and FL, there is too
much variability for the model of that relationship to be of much predictive value.

You might also like