STA 410/2102 Practice Questions for Second Test
Please note that these questions do not cover all the topics that may be on the test.
Question 1: Suppose we numerically evaluate the integral
1
x4 dx
0
using the midpoint rule. Using 100 points, the approxi
X and y for test problem:
[,1] [,2]
[1,] 1e+00 1e+00
[2,] 1e-07 0e+00
[3,] 0e+00 1e-07
[1]
0.0 -1.1
1.0
Coefficients found using lm function:
Call:
lm(formula = y ~ X - 1)
Residuals:
1
2
3
5e-09 -5e-02 -5e-02
Coefficients:
Estimate Std. Error t value Pr(>
OUTPUT OF THE TESTS OF THE PERMUTATION TEST PROCEDURE
> source("perm.r")
> test.norm()
Permutation test p-value: 0.892
Call:
lm(formula = y ~ x)
Residuals:
Min
1Q
Median
-2.49203 -0.43068 -0.09145
3Q
0.21283
Max
2.59969
Coefficients:
Estimate Std. Error t
# EXAMPLE OF AN R PROGRAM TO DO A PERMUTATION TEST.
#
# R. M. Neal, January 2000
# COMPUTE THE P-VALUE FOR A PERMUTATION TEST OF
CORRELATION. Tests the null
# hypothesis that the the vectors x and y are
independent, versus the
# alternative that they are
# STA 410/2102, Assignment #1, Spring 2014 - Functions
for finding MLE.
# Find the log probability of a single observation
given the model parameters.
#
# Arguments:
#
count
Count of how many children were
born this day
#
time
The number of the day (integ
STA 410/2102 Practice Questions for First Test
Please note that these questions do not cover all the topics that may be on the test.
Question 1: Calculate the result of each of the following arithmetic operations, assuming that the
numbers are represented
# FUNCTIONS FOR LINEAR REGRESSION USING HOUSEHOLDER
TRANSFORMATIONS. Written
# by Radford Neal, 2000, using the method described by
R. Thisted in Elements
# of Statistical Computing, Chapter 3.
#
# The functions intended for outside use are lr.house
and,
STA 410/2102, Fall 2014 Assignment #2
Due at the start of class on November 13. Please hand it in on 8 1/2 by 11 inch paper, stapled
in the upper left, with no other packaging.
This assignment is to be done by each student individually. You may discuss it
STA 410/2102, Fall 2014 Assignment #3
Due at the start of class on December 2. Please hand it in on 8 1/2 by 11 inch paper, stapled in
the upper left, with no other packaging.
This assignment is to be done by each student individually. You may discuss it
STA 410/2102, Fall 2014 Assignment #1
Due at the start of class on October 16. Please hand it in on 8 1/2 by 11 inch paper, stapled
in the upper left, with no other packaging.
This assignment is to be done by each student individually. You may discuss it
EXAMPLES OF SYMBOLIC DIFFERENTIATION AND MINIMIZATION
IN R.
Taking symbolic derivatives with "D".
> D(quote(a^3),"a")
3 * a^2
> D(quote(b^3*a^3),"a")
b^3 * (3 * a^2)
> D(D(quote(b^3*a^3),"a"),"b")
3 * b^2 * (3 * a^2)
Using "eval" to get the value of a sym