\documentclass[a4paper]{article}

\usepackage{fancyhdr}
\usepackage{extramarks}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{tikz}
\usepackage[plain]{algorithm}
\usepackage{algpseudocode}
\usepackage{enumitem}

\graphicspath{ {./images/} }

\usetikzlibrary{automata,positioning}

%
% Basic Document Settings
%

\topmargin=-0.45in
\evensidemargin=0in
\oddsidemargin=0in
\textwidth=6.5in
\textheight=9.0in
\headsep=0.25in

\linespread{1.1}

\pagestyle{fancy}
\lhead{\hmwkAuthorName}
\chead{\hmwkClass\ : \hmwkTitle}
\rhead{\firstxmark}
\lfoot{\lastxmark}
\cfoot{\thepage}

\renewcommand\headrulewidth{0.4pt}
\renewcommand\footrulewidth{0.4pt}

\setlength\parindent{0pt}

%
% Create Problem Sections
%

\newcommand{\enterProblemHeader}[1]{
    \nobreak\extramarks{}{Question \arabic{#1} continued on next page\ldots}\nobreak{}
    \nobreak\extramarks{Question \arabic{#1} (continued)}{Question \arabic{#1} continued on next page\ldots}\nobreak{}
}

\newcommand{\exitProblemHeader}[1]{
    \nobreak\extramarks{Question \arabic{#1} (continued)}{Question \arabic{#1} continued on next page\ldots}\nobreak{}
    \stepcounter{#1}
    \nobreak\extramarks{Question \arabic{#1}}{}\nobreak{}
}

\setcounter{secnumdepth}{0}
\newcounter{partCounter}
\newcounter{homeworkProblemCounter}
\setcounter{homeworkProblemCounter}{1}
\nobreak\extramarks{Question \arabic{homeworkProblemCounter}}{}\nobreak{}

\newenvironment{homeworkProblem}[1][-1]{
    \ifnum#1>0
        \setcounter{homeworkProblemCounter}{#1}
    \fi
    \section{Question \arabic{homeworkProblemCounter}}
    \setcounter{partCounter}{1}
    \enterProblemHeader{homeworkProblemCounter}
}{
    \exitProblemHeader{homeworkProblemCounter}
}

\newcommand{\hmwkClass}{INF 1004 Mathematics 2}
\newcommand{\hmwkTitle}{Tutorial\ \#4\ \& \#5}
\newcommand{\hmwkAuthorName}{\textbf{Woon Jun Wei}}
\newcommand{\hmwkStudentID}{\textbf{2200624}}

\title{
    \vspace{2in}
    \textmd{\textbf{\hmwkClass \\ \hmwkTitle}}\\
    \vspace{3in}
}

\author{\hmwkAuthorName \\ \hmwkStudentID}
\date{\today}

\renewcommand{\part}[1]{\textbf{\large Part \arabic{partCounter}}\stepcounter{partCounter}\\}

%
% Various Helper Commands
%

% Useful for algorithms
\newcommand{\alg}[1]{\textsc{\bfseries \footnotesize #1}}

% For derivatives
\newcommand{\deriv}[1]{\frac{\mathrm{d}}{\mathrm{d}x} (#1)}

% For partial derivatives
\newcommand{\pderiv}[2]{\frac{\partial}{\partial #1} (#2)}

% Integral dx
\newcommand{\dx}{\mathrm{d}x}

% Alias for the Solution section header
\newcommand{\solution}{\textbf{\large My Solution\\}}

% Probability commands: Expectation, Variance, Covariance, Bias
\newcommand{\E}{\mathrm{E}}
\newcommand{\Var}{\mathrm{Var}}
\newcommand{\Cov}{\mathrm{Cov}}
\newcommand{\Bias}{\mathrm{Bias}}

\begin{document}

\maketitle

\pagebreak

\begin{homeworkProblem}
     Suppose that buses arrive at a bus-stop at every 10-min interval. What is the probability
that a passenger who arrives at the bus-stop will have to wait between 5-7 mins?
Assume all possibilities are equally likely.
Hints:
\begin{enumerate}
    \item Is this a uniform distribution or a normal distribution?
    \item What is the minimum in this distribution?
    \item What is the maximum in this distribution?
    \item Draw the probability distribution for this problem.
\end{enumerate}

\solution


\end{homeworkProblem}
\pagebreak

\begin{homeworkProblem}
    Stanford-Binet IQ Test scores are normally distributed with a mean score of 100 and a
standard deviation of 16. Find the probability that a randomly selected person has an IQ
test score:
\begin{enumerate}[label=(\alph*)]
    \item Over 140.
    \item Under 88.
    \item Between 72 and 128.
\end{enumerate}
\solution

\end{homeworkProblem}

\pagebreak
\begin{homeworkProblem}
    An advertising agency conducted an ad campaign aimed at making consumers aware of a
new product. Upon completion of the campaign, the agency claimed that 20\% of
consumers had become aware of the product (fixed 20\% chance of a customer being
aware of the product). Assume that each customer’s chance of being aware of the product
is independent. The product’s distributor surveyed 1,000 consumers and found that 156
were aware of the product. Assume we believe the claim of the agency.
\begin{enumerate}[label=(\alph*)]
    \item Let X be the number of consumers who are aware of the product. What is the suitable probability distribution model for X?
    \item Calculate the mean $\mu$ and standard deviation $\sigma$ of X.
    \item Find the probability that 156 or fewer consumers in a random sample of 1,000 would be aware of the product
\end{enumerate}
\solution


\end{homeworkProblem}

\pagebreak
\begin{homeworkProblem}
The time, X minutes, taken by Nicholas to install a satellite dish may be assumed to be a
normal random variable with mean 134 and standard deviation 16.
\begin{enumerate}[label=(\alph*)]
    \item Determine $P(X<150)$
    \item Determine, the time exceeded by 10\% of installations  (only 10\% of the installation times exceed this value).
    \item The time taken, Y minutes, taken by Nicholas to install a satellite dish may also be
assumed to be normal random variable but with:
$$P(Y<170)=0.14 \text{ and } P(Y>200)=0.03$$
Determine the values for the mean and standard deviation of Y.
\end{enumerate}
\solution

\end{homeworkProblem}
\pagebreak

\begin{homeworkProblem}
A strange new metal is discovered, and some coins are made from it. You’re unsure if the
properties of the metal will affect the fairness of the coins. However, based on some initial
coin flips you think that 65\% of the time the coins land on Tails, while 35\% of the time it’s
Heads. Each coin flip is independent from the others and the probabilities are fixed.
Assuming that we want to get as many Tails as possible for 1000 coin flips, answer the
following:
\begin{enumerate}[label=(\alph*)]
    \item What type of probability distribution is suitable for this model?
    \item What is the mean and standard deviation for the 1000 coin flips?
    \item After the 1000 coin flips, 599 Tails are counted. Based on the current distribution, how likely is there to be 599 Tails or less?
\end{enumerate}
\solution

\end{homeworkProblem}

\pagebreak
\begin{homeworkProblem}
Based on past data, an insurance company determines that drivers in the age group of
21–28 have an 80\% chance of no accidents in a year, a 20\% chance of being in a single
accident, and no chance of being in more than one accident in a year. For simplicity,
assume that after an accident, there is a 50\% probability that the car will need repairs
costing \$500, a 40\% probability of repairs costing \$5,000, and a 10\% probability of repairs
costing \$15,000.

\begin{enumerate}[label=(\alph*)]
    \item What is the expected repair cost?
    \item What is the potential variability of the repair cost; i.e., variance and standard deviation?
    \item Assume the insurer sells the policy to 100 car owners, each with the same risk, what is the insurer’s total risk?
    \item To help cover the variability and other expenses, the insurer decided to charge an
additional 30\% over the expected repair cost. What would be the gross premium for a policy?
\end{enumerate}
\solution

\end{homeworkProblem}
\pagebreak
\begin{homeworkProblem}
    A wholesaler sells a large number of 2-litre and 5-litre tubs of ice-cream which are sold
in the ratio 3:2. A random sample of 2 tubs, ($X_1$, $X_2$) is taken from the shelves.

\begin{enumerate}[label=(\alph*)]
    \item Find the mean and variance of the ice-cream content in this population.
    \item List all the possible samples.
    \item Find the sampling distribution for the mean $\bar{x}$.
\end{enumerate}
\solution

\end{homeworkProblem}
\pagebreak
\begin{homeworkProblem}
A supermarket sells a large number of packets of bolts. One packet contains 10 bolts and
the other 20 bolts. They are sold in the ratio 1:4 respectively. A random sample of 3 packets
(X1, X2, X3) is taken from the shelves.

\begin{enumerate}[label=(\alph*)]
    \item List all the possible samples.
    \item Find the sampling distribution for the mode N and the median M
\end{enumerate}

\end{homeworkProblem}
\pagebreak
\begin{homeworkProblem}
     A random sample of 100 observations is to be drawn from a population with a mean of
40 and a standard deviation of 25. The population is a right-skewed distribution.

\begin{enumerate}[label=(\alph*)]
    \item Give the mean and standard deviation of the sampling distribution of mean of x.
    \item Will the sampling distribution of mean of x be approximately normal? Explain.
    \item Find the approximate probability that the mean of the sample will exceed 45.
\end{enumerate}

\solution

\end{homeworkProblem}

\pagebreak
\begin{homeworkProblem}
In an article in the Journal of American Pediatric Health researchers claim that the
weights of healthy babies born in the United States form a distribution that is nearly
Normal with an average weight of 7.25 pounds and standard deviation of 1.75 pounds.
Suppose a researcher selects 50 random samples with 30 newborns in each sample.

\begin{enumerate}[label=(\alph*)]
    \item What is the best estimate for the mean of the sample means?
    \item What is the best estimate of the standard deviation of the sample means?
    \item If we randomly selected 30 newborns from the full population of US newborns, would
you be surprised if their mean weight was 8.30 pounds?
\end{enumerate}
\solution

\end{homeworkProblem}
\pagebreak
\begin{homeworkProblem}
The length of human gestation is well-approximated by a normal distribution with mean $\mu = 280$ days
and standard deviation $\sigma = 8.5$ days. Suppose your final exam is scheduled for May 2
and your pregnant lady teacher has a due date of May 9. Find the probability that she will
give birth on or before the day of the final exam (0.2061).
\\\\
\solution

\end{homeworkProblem}

\end{document}
