Lab Report 01
Brock Butlett
Sept. 2, 2016
Computer Lab 01
1.Create a vector x with the numbers 8, 9, 16, 25, and 33. Use the function c.
x = c(8,9,16,25,33)
x
[1] 8 9 16 25 33
2. Create a vector y with values 14, 21, 28, 35, and 42 using the seq function.

Design and Analysis of Experiments
PSTAT 122:
Instructor
Class Polices and Syllabus
September 22, 2016
Drew Carter, [email protected], Office Hours: in 5507 South Hall.
Teaching Assistant TBA
Textbook
Design and Analysis of Experiments 8th edition, Do

Mingming Liu
PSTAT 122 TR 12:30-1:45
Drew Carter
29.9.2016
1.
Create a vector x with the numbers 8, 9, 16, 25, and 33. Use the function c.
> x<-c(8,9,16,25,33)
2.
Create a vector y with values 14, 21, 28, 35, and 42 using the seq function.
> y=seq(from=14

Mingming Liu
Pstat 122
HW2
1.
a).
>Conductivity<-c(143,141,150,116,152,149,137,143,134,136,132,127,129,127,132,129)
>CoatingType<-c(rep(1,4),rep(2,4),rep(3,4),rep(4,4)
>Coating.aov<-aov(Conductivity~CoatingType)
>summary(Coating.aov)
Df Sum Sq Mean Sq F v

PSTAT 122:
Blocking in ANOVA
Oct. 18, 2016
Pairs Tests
Blocking
Sum of squares
Matched-pairs design
We observed pairs (Xi , Yi )
Are the means the same
Sufficient to look at Di = Xi Yi .
Use the t statistic
t=
sd
d
p
1/n
Benefit is that the varian

ANOVA Model Assumptions
Drew Carter
October 6, 2016
Analysis of Variance Model Assumptions
Yij N (i , 2 )
The observations have normal distributions, no outliers or long tails
The observations are independent, no time-series behaviors
The groups all ha

PSTAT 122:
Testing Means in Multiple Populations
October 4, 2016
Comparing means from k populations
F test
Multiple Means
The final technique is to measure how a quantitative variable depends on a particular categorization.
Two Sample Problem
Two indep

Blocking Variables
Drew Carter
October 18, 2016
Guinea Pigs need Vitamin C
Figure 1:
Variables
The variables measured on each of 60 guinea pigs
dose: The milligrams of vitamin C given daily Treatment
supplement: The way the supplement was fed, either in

PSTAT 122:
Fractional Factorial Models
November 10, 2016
For three factors,
Treatment
Factorial Effect
Combination
I
A
B
AB
C
AC
BC
ABC
(1)
a
b
ab
c
ac
bc
abc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Fractional Design
We on

Factorial Design
Drew Carter,
November 10, 2016
Factorial model
N <- c(0,1,0,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,0,0)
P <- c(1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,0,0,1,0,1,1,0)
K <- c(1,0,0,1,0,1,1,0,0,1,0,1,0,1,1,0,0,0,1,1,1,0,1,0)
yield <- c(49.5,62.8,46

PSTAT 122:
Replication and Blocking
October 20, 2016
ANOVA Table
If we repeat our observations
df
SS
MSS
F
Blocks
b-1
SSB
MSB =
SSB
b1
Treatment
k1
SST
MST =
SST
k1
Error
bk b k + 1
SSE
Total
bk 1
Total SS
MSE =
MSB
MSE
MST
MSE
SSE
bkbk+1
Matched Pairs
W

PSTAT 122:
Midterm solutions
November 4, 2016
1. A computer programmer has designed three algorithms to sort large database files. She wants to
compare these algorithms to see which one will complete the task the fastest. In order to make the
comparison f

Zhiwei wang
9357922
Lab-B
T 12:30-1:45
1.
R code:
> y1<-c(143,141,150,146)
>y2<-c(152,149,137,143)
> y3<-c(134,136,132,127)
> y4<-c(129,127,132,129)
datatv<-c(y1,y2,y3,y4)
groups = factor(rep(letters[1:4], each = 4)
fit = lm(formula = datatv ~ groups)
ano

PSTAT 122:
Assignment #1
Due October 6, 2016
1. Suppose that I have two independent samples of respectively m and n normal observations that are
assumed to all have the same variance. We can calculate sample means x
and y and denote the pooled
sample sta

PSTAT 122:
Lab B
Due October 13, 2016
Please write up a report on these four data sets that answers these questions and shows the R routines that
you used. Be sure to include an ANOVA table for each analysis that you run on a data set. In all of these
que

Brock Butlett
Pstat 160A
10/13/16
Python Homework 2
A. C
alculate the minimal amount of x so that the company only
becomes bankrupt with a 5% probability.
X i Bern(0.10)
n
n
i=1
n
i=1
n
E [X] = E[ X i] = E [X i] = 10000 * (0.10) = 1000
V [X] = V [ X i] =

PSTAT 122
HW4 Solution
Prof. Hsu
Problem 5.10:
Two fixed-factor factorial design: study the influence of operating temperature and
two types of glass.
Glass
Type
1
2
y.j.
1718
1659
3377
1392
1380
1386
1328
1312
1299
6367
100
580
568
570
550
530
579
yi.
T

FINAL EXAM
PSTAT 122
HSU
3/18/15
Name
(10%) 1. In an experiment to investigate the eect of color of paper (blue, green, orange) on response rates for questionnaires distributed by the windshield method in supermarket parking lots, 15 representative superm

# 1) Input single data:
# store values into a variable to access later.
x1 <- 39
# print out the value of a variable by typing its name on the console.
x1
x2 = 42
x2
45 -> x3
x3
st<- 12
# re-assign any value to a variable at any time.
st<- "section at 8

Topics
Math 6A
Winter 2017
Here is a list of several important topics that you should be familiar with for the final1 .
1. Compute divergence and curl of vector fields.
2. Find a potential function for a conservative vector field.
3. Find critical points

PSTAT 122:
Lab B
Due October 13, 2016
Please write up a report on these four data sets that answers these questions and shows the R routines that
you used. Be sure to include an ANOVA table for each analysis that you run on a data set. In all of these
que

PSTAT 122:
Lab C
due October 27, 2016
Please write a report on the following data sets including answers to the following questions.
1. We would to improve the analysis of the eectiveness of insecticides from the Mosquito data set.
(a) Perform an ANOVA te

PSTAT 122:
R Introduction
Due September 29, 2016
Please work through these questions, and submit a report via the Gauchospace page. Your report should
include R input and output as well answers to the questions and relevant graphs.
1. Create a vector x wi