Publications by Lin Li
Document
Problem 1. Using R, generate a random variable X that has 10,000 random uniform numbers from 1 to N, where N can be any number of your choosing greater than or equal to 6. Then generate a random variable Y that has 10,000 random normal numbers with a mean of $ = = (N+1)/2$ # generate random variables set.seed(123) N <- 8 n <- 10000 mu <- (N+1) /2...
4437 sym R (12641 sym/70 pcs) 12 img
Document
Find the equation of the regression line for the given points. Round any final values to the nearest hundredth, if necessary. (5.6,8.8), (6.3,12.4), (7,14.8), (7.7,18.2), (8.4,20.8) \[ m = \frac{\overline{x}\overline{y} - \overline{xy}}{(\overline{x})^2 - \overline{x^2}} \] \[ b = \overline{y} - m\overline{x} \] $$ \[\begin{equation} \begin{spl...
2337 sym
Document
The Taylor Formula: \[ f(x) = \sum_{n=0}^{\infty} \frac{f^{n}(0)}{n!} x^{n} , 0! = 1\] Compute the Taylor’s Series expansion. \[ f(x) = \frac{1}{1-x} \] formula: \[ f(x) = \frac{1}{1-x} = \sum_{n=0}^{\infty} x ^{n}\] \[ \frac{1}{1-x} = 1 + x + x^{2} + x^{3} + ...\] \[ f(x) = e^{x} \] formula: \[ f(x) = e^{x} = \sum_{n=0}^{\infty} \frac{x^{n...
608 sym
Document
APEX Calculus Version4 Chapter 4, Exercises 4.1, problem 5 Use 5 iterations of Newton’s Method with the given initial approximation to approximate the root. Compare it to the known value of the root. \(f(x) = x^{2} + x - 2, x_{0} = 0\) x <- 0 old_x <- x while (abs(x-old_x) < 0.0000000001) { x <- x - (x^2 + x - 2) / (2*x + 1) } x ## [1] 2 ...
241 sym R (106 sym/2 pcs)
Document
The attached who.csv dataset contains real-world data from 2008. who <- read.csv("who.csv") head(who) ## Country LifeExp InfantSurvival Under5Survival TBFree PropMD ## 1 Afghanistan 42 0.835 0.743 0.99769 0.000228841 ## 2 Albania 71 0.985 0.983 0.99974 0.0011431...
2773 sym R (4260 sym/17 pcs) 5 img
Document
Week13 Using R, build a multiple regression model for data that interests you. Include in this model at least one quadratic term, one dichotomous term, and one dichotomous vs. quantitative interaction term. Interpret all coefficients. Conduct residual analysis. Was the linear model appropriate? Why or why not? Dataset: Fitness Trends Dataset ht...
2007 sym R (4159 sym/10 pcs) 2 img
Document
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.) The ‘mtcars’ dataset # load and explore dataset: data("mtcars") head(mtcars) ## mpg cyl disp h...
1099 sym R (1877 sym/10 pcs) 4 img
Document
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 (timid...
730 sym R (1408 sym/6 pcs)
Document
P. 303 11. A company buys 100 lightbulbs, each of which has an exponential lifetime of 1000 hours. What is the expected time for the first of these bulbs to burn out? (See Exercise 10.) Exponential distribution: n = 100 \(\mu\) = 1000 \(\lambda\) = 1/1000 \(fZ(z) = \lambda^2 z e^{-\lambda z}\) f(z) = (1/1000)^2 * 100 * e ^(-1000 * 100) = 9.048374...
1669 sym R (179 sym/8 pcs)
Document
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 . # generate 10,000 random variables, uniformly distributed between 1 and k. k <- 3 n = 10000 Y <- runif(n, min = 1, max = k) # plot distributio...
1209 sym R (1484 sym/25 pcs) 1 img