Homework 1. Statistics 771, Spring 09 Posted online Thursday January 21/09 Due in class Monday Feb 2. 1. The Gamma(shape=a,rate=1) distribution has probability density f(x;a,b) = c x^{a-1} exp( - x ) for x >= 0, where c = 1/Gamma(a) is a normalizing constant, and a > 0 . The cumulative distribution function is F(x;a) = \int_0^x f(y;a) dy Note that Gamma(a+1) = a Gamma(a) and integration by parts to establish ** F(x;a) = F(x,a+1) + exp(-x) x^a / Gamma(a+1) Use ** to establish further that F(x;a) = exp(-x) sum_{n=0}^\infty [ x^{a+n} ]/[ Gamma(a+n+1) ] Describe a numerical approximation to F(x;a). How would you compute terms involving the Gamma() function? Implement your algorithm for all pairs of a = 1, 2, 4, 8, 16 and x = 1,2,4,8, 16, and compare to the R function pgamma(). 2. The file http://www.stat.wisc.edu/courses/st771-newton/hw/rcc-distribute.txt holds an R data object (a list) with results of a study (by Jiang and Moch) of genomic damage in a sample of n=116 renal cell cancer tumors. Damage was measured using comparative genomic hybridization (CGH), and records whether or not amplifications or deletions occur in various genomic regions. (The data file has results for m=72 possible aberrations in each tumor.) The data may be loaded into R and examined via rcc <- dget("rcc-distribute.txt") x <- rcc$data names(rcc) ## shows components of the list The problem is to write some R code (ideally a function) that takes a matrix like x and returns a visualization of x in which the matrix is layed out and plotted in two colors and in which row sums and column sums are arranged in barplots on two sides of the image. 3. Read about the QR decomposition at http://en.wikipedia.org/wiki/QR_decomposition and read chapters 1 and 2 of Givens and Hoeting.