CS 112
Week11: Trees
1
General Trees
This week we discuss one of the most important non linear
data structures in computing, trees.
Trees are indeed a breakthrough in data organization,
allowing us to implement a host of algorithms much faster
than when u
TRANSFER COURSE EQUIVALENCY FORM
This form is used to document equivalency for coursework to be completed outside of
Boston University that is intended for use toward the College of Arts and Sciences degree.
Before submitting this form, you should familia
MA684 HW 5
Multiple Regression II
Question 1. Data from Prof. Bernard Rosner, Prof. of Biostatistics across town, posted on
line. The attached data set provides data on lung function for a sample of 654 kids
between the ages of 3 and 18. We are interested
Ma684 HW 8
Regression Diagnostics
Data on 100 subjects are saved on ACS under the file hw8anyproblems. Variables in the data
set are 1) an id number, ranging from 1 to 100; 2) sex, coded 1 for females and 0 for males; 3)
age, in years; 4) x1, a measuremen
MA684
Homework from Class 12
Factor Analysis II
A study examined a number of factors that might impact quality of life. We will focus on
depressive symptoms, as measured by the CES-D (Center for Epidemiologic Studies
Depression Scale) which is included at
MA684
Homework from Class 3
Solutions
1. Some results from the regression predicting height (in inches) from femur length (in inches),
from last weeks homework. First, some summary data on the independent (femur length) and
dependent (height) variables in
Homework from Class 8
Logistic Regression
1. Taking multiple vitamin and mineral supplements during pregnancy can reduce the risk
of birth defects. A study (based on a sample of several thousand women) was conducted
to examine factors associated with not
SPSS Results
MA684 HW 11
Principal Components Factor Analysis
Question 1: PC factor analysis with varimax rotation
Click on Analyze Dimension Reduction Factor
Select the variables to be included in the factor analysis
X
Under the Rotation button, select v
MA684
1
Some Review Problems
Class
1.
Based on a problem from Ch. 13 of the KKM and N text. The following
gives weight loss (in pounds) over a three week period for people initiating
two different weight-loss programs:
Diet A: 21 , 33 , 35 , 42 , 36 , 34
R Code for HW 8
Regression Diagnostics
>
> reg.out <- lm(y~age+sexf+x1+x2+x3)
> summary(reg.out)
Call:
lm(formula = y ~ age + sexf + x1 + x2 + x3)
Residuals:
Min
1Q Median
3Q
Max
-52.007 -5.638 4.220 9.743 17.608
Coefficients:
Estimate Std. Error t value
MA684 Class 10 Homework
Logistic Regression II
1. (No computer work necessary, other than finding p-values for chi-square statistics) From
the voting study in last weeks assignment. Last week you ran a multiple logistic regression
predicting whether or no
"!$#&%' () *+%' !$,'- .%."%( !$(
/"%( !$(102 3%456'- 7(98&%5:8" ";"5(<%=5 !>#&%' ?(9@(9' 02 1' A&%'3( 8&%5BDC& 16E%.8"*$5 #"(9!>"
'-AF'HGI .&%( (
JLK&MON-KPQ %#"
RTS V U N S WUYX
01Z P %#"['-AF56'-
\^] S b `_d_acVU ]fe _dg KMih e b _dcjg KP ]fe
MA 242
October 25, 2012
More examples of vector spaces
Recall the definition of a vector space from last class:
Definition. A vector space V is a set of objects that are called vectors along with two
operationsvector addition and scalar multiplication. Th
MA 242
December 4, 2012
Orthogonal sets
Definition. A set of vectors cfw_v1 , v2 , . . . , vk is an orthogonal set if vi vj = 0 for all i 6= j.
Example 1. Consider the vectors
v1 =
2
1
4
5
,
v2 =
0
1
1
1
,
and
v3 =
0
3
2
1
.
Theorem. Suppose that cfw_
MA 242
December 6, 2012
Projection matrices
Theorem. If cfw_u1 , . . . , uk is an orthonormal basis for a subspace W , then
projW v = (vu1 )u1 + . . . + (vuk )uk .
If
U = u1
u2
.
uk
,
then projW v = UUT v.
The matrix UUT is called the projection matrix
MA242 Test 1
Arazyan, Spring 2016 February 25, 2016
1. (12 points) ROW reduce the matrix to reduced echelon form. Specify the row operations. Indicate When
you arrive at a matrix in echelon form.
/
139 2 R 3353321,.
A: 1 0 3 4 N (2242 g .13 43
MA242 Quiz 1
Arazyan, Spring 2016 Student Name @431
(.7
I 0 POM); 1. Determine if the system is consistent. Do not completely solve the system.
6x2 = 5
4x3+x4 = 0
x1+6x2 +x3 +5x4 :3
x2 +5363 +4x4 = 0
M
[U WU t; 2. Write the matrix in reduced e
MA 242
November 1, 2012
Bases for vector spaces and subspaces
Given a vector space or subspace V , we often find it convenient to express it as the span of
a few vectors. A basis for V is a spanning set that contains as few vectors as possible.
Definition
MA 242
October 30, 2012
Subspaces associated to a matrix
There are three important subspaces associated to an m n matrix A. Let c1 , . . . , cn
represent the columns of A. That is,
A=
c1
c2
.
cn
.
These column vectors are vectors in Rm .
Let r1 , . . .
Plate Tectonics
North America
South America
Theory
The outer shell of the earth is composed of
individual plates that interact to produce:
Earthquakes, Mountains, Ocean basins,
Volcanoes, Ocean Trenches, etc.
Active Volcanoes
Plate Tectonic Theory
Plate T
MA 242
November 13, 2012
The dimension of a vector space
The number of elements in a basis of a vector space is an important quantity associated with
the space.
In order to be more precise, we need to distinguish between finite-dimensional vector spaces
a
Quiz 3
MA242 /( . cfw_
Arazyan, Spring 2016 Student Name 2
Show all work for full credit.
1. ( 10 points] Use coordinate vectors to test the linear independence of the set of polynomials.
Explain your work.
(2 03, (3 t)2, 1 + 61: 5112 + t3
2. (9 points)
MA242-Test2 O4[14[2016
1. [12 points] Use Cramers rule to compute the value of x2 for the following system of equations.
x1 2x2 + x3 = 0
ZXZ 8X3 : 8 Y;
"496'1 + SXZ + 9X3 = 9
2. [12 points] Compute the adjugate of the given matrix, and then use it
!#"$%$ '&$ (%)$*
+!,.-0/21431657/98;:<=>
BCC GE F LNMM
BCC R.F LNMM
CC EH MM
C M
$% Q @ C RSI H M
?A@ I
D EKI J O
P
D RTI J O
<U!V J (#"$ ?9W Q @ EGFXR.FZY[EH#RH\Y^]_]_]TY[EJRTJ I
`ba ,5cS,ed Kf 8hgi ? (Qj $%lkm7n>*o# p
<q!V J $ rUo'tu7 pv* r I0w "$
P
MA 242 Section A2 Quiz 4
Spring 2016 Student Name A45?
BU ID#
Show all your work for full credit.
1 9
7
1. Let u1:[l];u2= l ;y= l ,andW=Spancfw_ul,u2.
4 2 6
(a) (I 0 points) Verify that cfw_1,11, M2 is an orthogonal set, and then nd the orthogonal pro
MA 242 Section A2 Quiz 2
Spring 2016 Student Name
We
BU ID#
Show all your work for full credit.
1. (12 points) Compute the determinant of the matrix in two ways:
(a) by cofactor expansion
l "5 y '23 _ \
529% Mg; 3' (H4 . (56") .l g "11.
a rt 0
W5, a O