Publications by Don Padmaperuma
Data 605-Discussion 12
Task: Using the “cars” dataset in R, build a linear model for stopping distance as a function of speed and replicate the analysis of your textbook chapter 3 (visualization, quality evaluation of the model, and residual analysis.) Analysis: summary(cars) ## speed dist ## Min. : 4.0 Min. : 2.00 ## 1st Qu.:12.0 ...
1152 sym R (1637 sym/10 pcs) 4 img
DATA 605 - Assignment 10
Smith is in jail and has 1 dollar; he can get out on bail if he has 8 dollars. A guard agrees to make a series of bets with him. If Smith bets A dollars, he wins A dollars with probability .4 and loses A dollars with probability .6. Find the probability that he wins 8 dollars before losing all of his money if: (a) he bets 1 dollar each time (ti...
1478 sym R (92 sym/4 pcs)
DATA 605 - Week10
Exercise 13 Write a program to compute \(u^{(n)}\) given u and P. Use this program to compute \(u^{(10)}\) for the Land of Oz example, with u = (0, 1, 0), and with u = (1/3, 1/3, 1/3). library(expm) ## Warning: package 'expm' was built under R version 3.6.3 ## Loading required package: Matrix ## ## Attaching package: 'expm' ## The following obj...
190 sym R (650 sym/10 pcs)
DATA 605 - Assignment 9
1. Exercise 11 - Page 363 The price of one share of stock in the Pilsdorff Beer Company (see Exercise 8.2.12) is given by \(Y_n\) on the \(n\) th day of the year. Finn observes that the differences \(X_n=Y_{n+1}−Y_n\) appear to be independent random variables with a common distribution having mean \(μ=0\) and variance \(σ^2\)=\(\frac{1}{4}\)....
2508 sym R (235 sym/6 pcs)
DATA 605 - Assignment 8
Chapter 7 - SUMS OF RANDOM VARIABLES Exercise 11 - Page 303 A company buys 100 light bulbs, each of which has an exponential lifetime of 1000 hours. What is the expected time for the first of these bulbs to burn out? Let \(X_{i}\) be the independent variable. Expected life time = 1000 Hrs lambda = 1/1000 n = 100 Expected_Time_Hrs = 1/(n*lambda...
1531 sym R (258 sym/10 pcs)
DATA 605 - Week8
Chapter 8 - LAW OF LARGE NUMBERS Exercise 1: A fair coin is tossed 100 times. The expected number of heads is 50, and the standard deviation for the number of heads is (100 · 1/2 · 1/2)1/2 = 5. What does Chebyshev’s Inequality tell you about the probability that the number of heads that turn up deviates from the expected number 50 by three o...
682 sym
DATA 605 - Assignment 7
1. Let X1, X2, . . . , Xn be n mutually independent random variables, each of which is uniformly distributed on the integers from 1 to k. Let Y denote the minimum of the Xi’s. Find the distribution of Y. sim.uni <- function(a,b) { Y = c() for (i in 1:b){ X <- runif(a) Y[i] = min(X) } return(Y) } Y <- sim.uni(10, 100) ...
1210 sym R (1153 sym/25 pcs) 1 img
DATA 605 - Assignment 6
(1) A box contains 54 red marbles, 9 white marbles, and 75 blue marbles. If a marble is randomly selected from the box, what is the probability that it is red or blue? Express your answer as a fraction or a decimal number rounded to four decimal places. r <- 54 w <- 9 b <- 75 prob_rb <- round((r+b)/(r+w+b), 4) prob_rb ## [1] 0.9348 (2) You a...
4390 sym R (2171 sym/31 pcs)
DATA 605 - Assignment 5
Choose independently two numbers B and C at random from the interval [0, 1] with uniform density. Prove that B and C are proper probability distributions. Note that the point (B,C) is then chosen at random in the unit square Setup the enviorenment Using runif function in R to choose random numbers from a uniform distribution in the interval [0, ...
1031 sym R (714 sym/17 pcs) 7 img
Data Task NYCDOE
library(kableExtra) library(stringr) library(tidyverse) ## -- Attaching packages ---------------------------------------------------------------------------------------------------------------------------------------- tidyverse 1.2.1 -- ## v ggplot2 3.2.1 v readr 1.3.1 ## v tibble 2.1.3 v purrr 0.3.2 ## v tidyr 0.8.3 v dply...
746 sym R (17950 sym/28 pcs)