Fall 2011, CMPSC/MATH 451
Homework Assignment #1
Due September 9 (hand over in class or submit via Angel by 11 am)
1
The Euclidean norm of an n-dimensional vector x is dened by |x|2 = (n x2 )1/2 .
i=1 i
(a ) Discuss how there may be overow and harmful und

Lecture # 4 Least Squares451
Normal Equations and the Augmented System in Least Squares
We noted earlier the solution yLS of the least squares problem
b XyLS 2 = minn b Xy2
yR
along with its residual
rLS = b XyLS
satises
rLS + XyLS
T
X rLS
= b
(1)
= 0
(2)

Study Guide for Exam 2
STAT 462, Fall 2016
Note:
You are allowed to take one calculator and two sheets (both sides) of formulas and
notes for the exam. However, you cannot share your calculator or notes with others.
The exam will be 50 minutes in class

Stat 462 Practice Exam 2 Solution
Part 1. The following study relates Y = the selling price of a home to X1 = the logarithm of the square foot area of the
home, X2 = the number of bedrooms, and X3 = the size of the garage.
a. Write down the multiple regre

# test for randomness
n = 50
# independent data
x = rnorm(n)
# correlated data (trend)
x = arima.sim(model=list(ar=.8),n)
# correlated data (cyclic)
x = arima.sim(model=list(ar=-.8),n)
m = median(x)
plot.ts(x)
abline(m,0)
runs = 1*(x<m)
r = sum(abs(runs[2

function summation = sumA(A)
% Input - matrix A
% Output - summation of all the entries
%
% Step 1: find the dimension of A by using size
%
int num=size(summation)
%
% Step 2: Two for loops for the summation
%
[m,n]=size(A);
for i=1:m;
for j=1:n;
sum= sum

MATH/CSE 451, FALL 2010, HW2
1
Homework 2, Due September 30, 2010
1. Let H denote the n n Hilbert matrix, whose (i, j) entry is 1/(i + j 1). Write a program
to solve Hx = b by Gaussian elimination for n = 3, n = 7 and n = 13. Take b to be as
follows:
bi =

Math 455 Midterm
Spring 2009
0
1. 20 points. Consider a function f (x) such that f (0) = 0, f (1) = 1 and f (1) = 1.
(a) Compute the linear Lagrange form of the interpolating polynomial, p, such that
p(0) = f (0) and p(1) = f (1).
(b) Use divided differen

MATH 451, HW2 Take home midterm
1
Homework 2 Take home midterm
1. Use the nested multiplication subroutine to evaluate P (x) = 1 x + x2 x3 + + x98 x99
at x = 1.00001. Find a simpler, equivalent expression, and use it to estimate the error when
using neste

Debugging in M ATLAB
Debugging is available for any M-file function (not scripts). A complete list of commands can be found
from help debug.
To set a breakpoint when the function foo is called, type dbstop in foo. To stop at line 17, enter
dbstop at 17 in

MATH 455 MIDTERM
Solve 5 of the 6 given problems below.
(1) 20 points. Which of the following iterations will converge to the indicated fixed
point, , provided x0 is sufficiently close to ? If it does converge, give the order of
convergence; for linear co

Lecture Notes for Math-CSE 451:
Introduction to Numerical Computation
Wen Shen
2011
2
NB! These notes are used by myself in the course. They are provided to students as a
supplement to the textbook. They can not substitute the textbook.
Textbook:
Numerica

1
Problem 1
Implement the bisection method. For a given function that has values of
different signs at the end points: f (a) f (b) < 0 , iterate until the length of
the interval |an bn | = 2(n+1) |a b| < tol.
We choose tol = 0.5 106 to achieve the desired

function b = decimal2binary(d)
% Input - d in decimal
% Output - b in binary, in the string form
%
% Step 1: integer part
%
integer = floor(d);
% Initialization
b = [];
quotient = integer;
remainder = 0;
while 1
remainder = mod(quotient, 2);
quotient = (q

STAT463 Homework #1
due Wednesday, 1/18
1. Find and include an example image of a time series on the web of anything. Make sure
the axes are labeled, the plot is titled, and write 2-3 sentences describing the statical features
and interpretation of the se

CSE/Math 455
Lecture # 7
From C.D. Meyer, Matrix Analysis and Applied Linear Algebra, SIAM Publications, Philadelphia, 2000. on p.1 is the following quote
The earliest recorded analysis of simultaneous equations is found in the
ancient Chinese book Chiu-c

Computer Science/Mathematics 451
Lecture Notes
Fourier Lecture # 2
Orthogonal Functions and Least Squares Approximation
Our purpose is to build a basis of functions 0 (x), 1 (x), . . . , n (x), . . . so
that we can approximate a general function f () as
f

MATH451/CMPSC451 Homework 7
Due Nov 2, 2016, 1pm
1. (10 points) Find a polynomial p(x) of degree 5 or less that satisfies the
following conditions:
p(0) = 20, p(1) = 26, p0 (1) = 9, p(2) = 36, p0 (2) = 16 p00 (2) = 12.
2. (20 points). Write a computer pro

MATH451/CMPSC451 Homework 8
Due Nov 9, 2016, 1pm
1. (10 points) Show that the following formula is forth order.
f 0 (x)
f (x + 2h) + 8f (x + h) 8f (x h) + f (x 2h)
.
12h
2. (20 points). (Computer project) Write a computer code to implement the
extrapolat

MATH451/CMPSC451 Homework 9
Due Nov 16, 2016, 1pm
1. (10 points) 5.2 Computer Problem 8. Attach a printout of the code.
2. (15 points). Derive an adaptive mid-point rule, and write a program to
R1
implement the algorithm. Test the method using 0 xdx, with

CMPSC/MATH 451: Numerical Computation, Course Syllabus, Spring 2015
Instructor: Wen Shen, Associate Professor, Department of Mathematics.
Contact: shen_w@math.psu.edu, 223A McAllister Building.
Course text: I have a set of Lecture Notes which will be avai

# bootstrap mean
# normal population with mu=5 and sig=1
# theta = mean
n = 5 # sample size
N = 1000 # number of bootstrap samples (author uses 'REP')
alpha = .05
x = round(rnorm(n,5,1),1)
# usual approach assuming normality
theta.hat = mean(x)
s = sd(x)

M ATLAB Survival Guide
M ATLAB is. . .
A fancy calculator. You can use M ATLAB just like a calculator: Type in a command for some operations
to be performed on some data, and M ATLAB comes back with the answer. That is to say, M ATLAB is
an interpreted en

PRACTICE FINAL (HW 3): DUE 5 / 1 / 2009
CSE/MATH 456 SPRING 2009
Some of the problems are only partially solved. Please try to complete the solution of these.
1. Try to answer to the following general questions:
(a) Write down the Taylor formula for f (x

Chapter 1
Homework sets
1
2
CHAPTER 1. HOMEWORK SETS
1.1
Homework set No. 1
Problem 1
Convert to hexadecimal, to octal, and then to decimal.
a). (110111001.101011101)2
b). (1001100101.01101)2
Problem 2:
For some values of x, the function f (x) = x2 + 1 x

Final Project MATH/CSE 451, Fall, 2010
Instructor: James Brannick
Due Wednesday, December 15, 2010
Please complete the assignment on the given due date. I will answer few basic questions
regarding the given problems, but overall you are expected to comple

An Introduction to Numerical Analysis
James Brannick
The Pennsylvania State University
Contents
Chapter 1.
Introduction
5
Chapter 2.
Computer arithmetic and Error Analysis
7
Chapter 3.
Approximation and Interpolation
3
17
CHAPTER 1
Introduction
This manus

Homework of Chapter 5
Xiaozhe Hu, Guangri Xue, and Jiwei Jia
Problem 5.1: Implement Algorithm 5.2 and use to it solve linear systems in which A is
Hilbert matrix, whose elements are Ai,j = 1/(i + j 1). Set the right-hand-side to
b = (1, 1, , 1)T and the i