<- function(w){
cummean <- length(w)
n <- numeric(n)
y <- c(1:n)
x <- cumsum(w)
y <- y/x
y return(y)
}
Assignments
Homework06: (complete by Monday October 9)
Homework Guidelines: homework_guidelines.pdf
Read: Ch. 6
Problems Ch6: 4, 6, 9, 10, 11
Homework05 AI: (due Monday October 13)
For Homework05 R Exercise 1, use ChatGPT to generate a solution to the problem. Submit the Shared Link to your ChatGPT session. Ask for a generate R Quarto Notebook, download the file and Render it on your own computer. Submit a generated report saved to a .pdf file through Canvas.
Follow the suggestions provided in AILearning.pdf.
Homework05: (complete by Monday October 13)
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 October 6)
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 22)
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 AI: (due Monday September 15)
For Homework02 R Exercise 1, use ChatGPT to generate a solution to the problem. Submit the Shared Link to your ChatGPT session and submit a generated report saved to a .pdf file through Canvas.
Follow the suggestions provided in AILearning.pdf.
Homework02: (due Monday September 15)
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.
- Leemis_chart.pdf
- Leemis_chart2.pdf
Complete the following Exercises using R.
Your R code should be completed in an R Quarto Notebook Rendered to a .html file and submitted through Canvas, submit both the .qmd file and the .html file. The YAML header of your R Quarto Notebook should look like the following (with your name and the date you submit the assignment):
---
title: "Stat. 640 Homework 2"
author: "Your name"
date: "September 15, 2025"
format:
html:
embed-resources: true
---
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 AI: (due Monday September 8)
For Homework01 R Exercise 2, use ChatGPT to generate a solution to the problem. Submit the Shared Link to your ChatGPT session and submit a generated report saved to a .pdf file through Canvas.
Follow the suggestions provided in AILearning.pdf.
Homework01: (due Wednesday Sept. 3)
- Homework Guidelines: homework_guidelines.pdf
Your handwritten homework solutions should be submitted through Canvas. Your papers should be scanned into a .pdf file in the order assigned. Your name should appear on each page. I would suggest starting each problem at the top of a new page so it is clear which problem you are working on.
Read: Preface
Read: Ch. 1
Problems Ch. 1: 8, 9, 45, 72, 73
Complete the following Exercises using R.
Your R code should be completed in an R Quarto Notebook Rendered to a .html file and submitted through Canvas, submit both the .qmd file and the .html file. The YAML header of your R Quarto Notebook should look like the following (with your name and the date you submit the assignment):
---
title: "Stat. 640 Homework 1"
author: "Your name"
date: "September 3, 2025"
format:
html:
embed-resources: true
---
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.