<- function(w){
cummean <- length(w)
n <- numeric(n)
y <- c(1:n)
x <- cumsum(w)
y <- y/x
y return(y)
}
Assignments
Homework10: (complete by Monday December 4)
Homework Guidelines: homework_guidelines.pdf
Read: Ch. 9, Sections 1, 2, 3, 4
Problems Ch9: 1, 2, 3, 4ab, 5, 7, 8, 9
Homework09: (complete by Monday November 13)
Homework Guidelines: homework_guidelines.pdf
Complete the exercises related to the A.V. in this handout. handout1a.pdf
Read: Ch. 8
Problems Ch8: 6bc, 7c, 16c, 35, 46, 47abc, 50, 52c, 55
Code for 6c
For problem 46 here is the dataset whale.csv or whale.txt and four R programs, one using uniroot( ), and the others using the nlmib( ), nlm( ), and mle( ) functions. Note the use of the scan( ) function to read in the data from the txt file.
- whale5.html computes the mle using fitdist( ), a function in library(fitdistrplus)
- whale5.qmd
- whale1.R computes the mle using uniroot( )
- whale2.R computes the mle using nlminb( )
- whale3.R computes the mle using nlm( )
- whale4.R computes the mle using mle( ), a function in library(stats4)
Homework08: (complete by Monday November 6)
Homework Guidelines: homework_guidelines.pdf
Complete the exercises related to the M.L.E. in this handout. handout1a.pdf
Homework07: (complete by Monday October 30)
Homework Guidelines: homework_guidelines.pdf
Read: Ch. 8
Read: SurveySampling.pdf or read ModernDive Chapter 7
Problems Ch8: 6a, 7ab, 12, 16ab, 21ab, 26, 27abc, 32, 52ab
Homework06: (complete by Monday October 9)
Homework Guidelines: homework_guidelines.pdf
Read: Ch. 6
Problems Ch6: 4, 6, 9, 10, 11
Send the required email requested at the end of the class_guidelines.pdf.
Homework05: (complete by Monday October 2)
Homework Guidelines: homework_guidelines.pdf
Read: Ch. 5
Problems Ch. 5: 1, 3, 4, 5, 16, 17, 18, 26, Find a proof of Problem 27 in a Calculus book.
Read the Mean and Standard Deviation Simulation Stats Magazine paper. Mean&SDSimulation.pdf
Complete the following Exercises using R.
Exercise 1: (L.L.N.) Demonstrate the Law of Large Numbers for the Normal Distribution.
- Sample \(n = 1000\) Standard Normal random values and put them in a vector \(z\).
- Write an R function to compute the cumulative mean.
- Create a vector \(x = (1, 2, ..., n)\).
- Compute the cumulative mean vector \(y\) from \(z\) and \(x\).
- Approximate the probability that \(|y| > \epsilon\).
- Hint: Here is the R code needed for writing the cummean function.
Exercise 2: (C.L.T.) Demonstrate the Central Limit Theorem for the Normal and Exponential Distributions.
- Sample \(k = 1000\) samples of size \(n = 30\) from the \(Normal(\mu = 5, \sigma^2 = 2^2 = 4)\).
- Compute the means for each of the \(k\) samples.
- Draw a histogram of these \(k\) sample means.
- Describe the shape of the histogram.
- Do the above steps again with the \(Exponential(\lambda = 1/3)\).
Exercise 3: Demonstrate the independence of the sample mean and sample variance when sampling from the \(Normal(\mu = 5, \sigma^2 = 2^2 = 4)\).
- Sample \(k = 1000\) samples of size \(n = 30\) from the \(Normal(\mu = 5, \sigma^2 = 2^2 = 4)\).
- Compute the sample means and standard deviations for each of the \(k\) samples.
- Plot the sample means versus the sample standard deviations.
- Compute the correlation between the sample means and standard deviations.
- Do the above steps again with the \(Exponential(\lambda = 1/3)\).
Homework04: (complete by Monday September 25)
Homework Guidelines: homework_guidelines.pdf
Read: Ch. 4
Problems Ch. 4: 42, 43, 50, 55, 77
Complete the following Exercises.
Exercise 1: Prove \(Var(X) = E[X^2] -(E[X])^2\).
Exercise 2: Prove \(E[Y] = E[E[Y|X]]\).
Exercise 3: Prove \(Var(Y) = Var(E[Y|X]) + E[Var(Y|X))]\).
Homework03: (complete by Monday September 18)
Homework Guidelines: homework_guidelines.pdf
Read: Ch. 3
Problems Ch. 3: 1 and add part c) Are X and Y independent?, 24, 42a, 44 (hint: use the binomial thm), 64, 66, 69
Homework02: (complete by Monday September 11)
Homework Guidelines: homework_guidelines.pdf
Read: Ch. 2
Problems Ch. 2: 16, 27, 31, 56, 60, 66, 67
Read Problems Ch. 2: 71, 72 (random number generation)
Read: the Handouts on random number generation.
- From jStor find and read the following papers. JSTORE - online statistics and probability articles, available on campus. See CSUEB Libary > Databases A-Z > J
- Leemis, Lawrence., Relationships Among Common Univariate Distributions, The American Statistician, Vol. 40, No. 2 (May 1986), pp. 143-146.
Complete the following Exercises using R.
Exercise 1: Using R verify that these models are the same: GAMMA(\(\alpha = n/2, 1/2\)) = CHISQ(\(n\)). To show this compute the cumulative probabilities for the two models using the pgamma() and pchisq() commands for the same value of \(x\) and parameter \(n\). Or use qgamma() and qchisq() to determine the 25th percentile (quantile) for each distribution.
Homework01: (complete by Monday Sept. 4)
Read: Preface
Read: Ch. 1
Problems Ch. 1: 8, 9, 45, 72, 73
Complete the following Exercises using R.
Exercise 1: Use R to
- Plot the model BIN(\(n\) = 10, \(p\) = 0.5)
- Plot the model POIS(\(\lambda\) = 5)
- Determine the value of the 25th percentile (quantile) for each distribution.
Exercise 2: Using R simulate \(n\) = 100 standard normal values, square each value, and plot histograms. Comment on the shape of the distribution.
Exercise 3:
- Using R plot the model Exponential p.d.f. for \(\lambda\) = 0.4, 1, 8. Determine the 25th percentile (quantile) for each distribution.
- Using R plot the model Gamma p.d.f. for \(\alpha\) = 1, \(\lambda\) = 0.4, 1, 8 and for \(\alpha\) = 0.5, 1, 5, \(\lambda\) = 2.5. Determine the 25th percentile (quantile) for each distribution.