Publications by Dirk Hartog
Discussion board 11
library(tidyverse) Exercise Week 11 Using R, build a regression model for data that interests you. Conduct residual analysis. Was the linear model appropriate? Why or why not? This data set captures the details of how CO2 emissions by a vehicle can vary with the different features. The data set has been taken from Canada Government official open...
1558 sym R (3687 sym/11 pcs) 2 img
Homework wk10
library(markovchain) ## Package: markovchain ## Version: 0.9.5 ## Date: 2023-09-24 09:20:02 UTC ## BugReport: https://github.com/spedygiorgio/markovchain/issues PROBLEM: 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 w...
2002 sym R (1972 sym/9 pcs)
Discussion board 10
Exercise 11, page 415 Assume that a man’s profession can be classified as professional, skilled laborer, or unskilled laborer. Assume that, of the sons of professional men, 80% become professionals themselves, 10% become skilled laborers, and 10% become unskilled laborers For skilled laborers, 60% become skilled laborers, 20% become professional...
1440 sym
Homework wk9
Exercise 10 page 339 Find the probability that among 10,000 random digits 3 appears not more than 931 times. mu <- 10000 * (1/10) sd <- sqrt(10000 * 0.1 * 0.9) x_931 <- (931 - 1000) / sd \[P(Sn_{10,000} \leq 931) \\ P(^*Sn_{10,000} \leq \frac{931 - 1000} {30})\\ P(^*Sn_{10,000} \leq -2.3)\] If we look at a Z-score table we find that the probability...
290 sym 1 img
Homework wk8
Question 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 1st of these bulbs to burn out? \(\lambda = 1000\) \(n = 100\) Since the expected time has an exponential distribution we can calculate the mean or expected value using \(E(x) = \frac {\mu}{n}\) The expect...
1949 sym
Discussion board 8
#Question 5 page 312 Let x be a rnadom variable with \(E(X) = 0\) and \(V(X) = 1\). WHat integer value k will assure us that \(P(|X| \geq k) \leq 0.01?\) Chebyshev’s Inequality states that \(P(|X - \mu| \geq k\sigma) \leq \frac {\sigma^2}{k^2\sigma^2} = \frac {1}{k^2}\) Solving for \(k\) \[\frac {1}{k^2} = 0.01 \\ k^2 * 0.01 = 1 \\ k^2 = \frac {1...
390 sym
Homework wk7
QUESTION 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. If we consider that \(Y = y\) then the event that this occurs happens if all n random variables are \(\geq y\) and so the probability th...
3847 sym
Discussion board 7
Question 14 page 199 On average, only 1/1000 has a particular rare blood type. Find the probability that, in a city of 10,000 people no one has this blood type We can use the Poisson distribution to calculate this probability using \[ p(X = k) \approx \frac {\lambda^{k}}{k!} \cdot e^{-\lambda} \] \[ p(X = 0) \approx \frac {\lambda^{k}}{k!} \cdot ...
1110 sym
Homework wk6
Question 1 A bag contains 5 green and 7 red jellybeans. How many ways can 5 jellybeans be withdrawn from the bag so that the number of green ones withdrawn will be less than 2? \[ = \begin{pmatrix}5\\ 0\end{pmatrix} * \begin{pmatrix}7\\ 5\end{pmatrix} + \begin{pmatrix}5\\ 1\end{pmatrix} * \begin{pmatrix}7\\ 4\end{pmatrix}\] (choose(5,0) * choose...
4970 sym Python (2983 sym/34 pcs) 1 img
Discussion board 6
Quesiton 9, pg. 89 Stirling’s approximation provides a powerful tool for approximating the factorial of large numbers with a high degree of accuracy. A more refined inequality for approximating \(n!\) is given by \[ \sqrt{2\pi n}\left(\dfrac{n}{e}\right)^n e^{1/(12n+1)} < n! < \sqrt{2\pi n}\left(\dfrac{n}{e}\right)^n e^{1/(12n)}\] Write a compute...
768 sym R (3203 sym/6 pcs)