Adding more exercises throughout
This commit is contained in:
@@ -4,25 +4,187 @@
|
||||
<title>Confidence Intervals</title>
|
||||
|
||||
<introduction>
|
||||
<p> Text before the first section. </p>
|
||||
<p>
|
||||
Text before the first section.
|
||||
</p>
|
||||
</introduction>
|
||||
|
||||
|
||||
<section xml:id="sec-CLT" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>Central Limit Theorem</title>
|
||||
<title>Central Limit Theorem</title>
|
||||
|
||||
<p> Text of section. </p>
|
||||
<p>
|
||||
Text of section.
|
||||
</p>
|
||||
|
||||
<exercises xml:id="exercises-CLT">
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose a coin has probability 0.4 of coming up heads, and we flip the coin 100 times.
|
||||
Let <m>S</m> be the number of heads.
|
||||
Estimate the probability that <m>34 \leq S \leq 44</m>.
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose a fair die is rolled 100 times, and let <m>m</m> be the average value of the rolls.
|
||||
Estimate the probability that <m>3.45 \leq m \leq 3.55</m>.
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<introduction>
|
||||
<p>
|
||||
The heights of men in the US have a mean of 69 in and a variance of about 9 in<m>^2</m>, and the heights of women in the US have a mean of 63.5 in with a variance of 6.25 in<m>^2</m>.
|
||||
</p>
|
||||
</introduction>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose the heights of 30 men are sampled, and a sample mean <m>m</m> is taken.
|
||||
Find the expected value and variance of <m>m</m>.
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Estimate the probability that <m>m \geq 69.5</m>.
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
What if the sampled group was women?
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
</exercise>
|
||||
</exercises>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<section xml:id="sec-Confidence-Intervals" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>Confidence Intervals</title>
|
||||
<title>Confidence Intervals</title>
|
||||
|
||||
<p> Text of section. </p>
|
||||
<p>
|
||||
Text of section.
|
||||
</p>
|
||||
|
||||
<exercises xml:id="exercises-Confidence-Intervals">
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose we flip a coin 100 times and count 60 heads.
|
||||
Let <m>p</m> be the (unknown) probability that the coin comes up heads on a flip.
|
||||
Give an approximate 95% confidence interval for the value of <m>p</m>.
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<introduction>
|
||||
<p>
|
||||
Suppose in a sample of 100 people, 12 are left-handed.
|
||||
</p>
|
||||
</introduction>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Give a 95% confidence interval for the proportion <m>p</m> of left-handed people.
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Give a 90% confidence interval.
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
The weights of five mice are measured and recorded below.
|
||||
Give a 95% confidence interval for the sample mean weight of mice.
|
||||
(Pretend 5 measurements is large enough for the CLT to apply.)
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<title></title>
|
||||
|
||||
<tabular>
|
||||
<row header="yes">
|
||||
<cell halign="center">mouse <m>i</m></cell>
|
||||
<cell halign="center">1</cell>
|
||||
<cell halign="center">2</cell>
|
||||
<cell halign="center">3</cell>
|
||||
<cell halign="center">4</cell>
|
||||
<cell halign="center">5</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="center">weight <m>\widetilde{w}_i</m> (g)</cell>
|
||||
<cell halign="center">26</cell>
|
||||
<cell halign="center">32</cell>
|
||||
<cell halign="center">33</cell>
|
||||
<cell halign="center">20</cell>
|
||||
<cell halign="center">29</cell>
|
||||
</row>
|
||||
</tabular>
|
||||
</table>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
The heights of five plants are measured and recorded below.
|
||||
Give a 95% confidence interval around the sample mean for the heights of the plants.
|
||||
(Pretend 5 measurements is large enough for the CLT to apply.)
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<title></title>
|
||||
|
||||
<tabular>
|
||||
<row header="yes">
|
||||
<cell halign="center">plant <m>i</m></cell>
|
||||
<cell halign="center">1</cell>
|
||||
<cell halign="center">2</cell>
|
||||
<cell halign="center">3</cell>
|
||||
<cell halign="center">4</cell>
|
||||
<cell halign="center">5</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="center">height <m>\widetilde{h}_i</m> (in)</cell>
|
||||
<cell halign="center">15</cell>
|
||||
<cell halign="center">14</cell>
|
||||
<cell halign="center">18</cell>
|
||||
<cell halign="center">21</cell>
|
||||
<cell halign="center">17</cell>
|
||||
</row>
|
||||
</tabular>
|
||||
</table>
|
||||
</statement>
|
||||
</exercise>
|
||||
</exercises>
|
||||
</section>
|
||||
|
||||
|
||||
</chapter>
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- TODO make sure to include EV/Var of all standard distributions, perhaps include a table? -->
|
||||
|
||||
<chapter xml:id="ch-Expected-Value" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>Expected Value and Variance</title>
|
||||
|
||||
@@ -880,6 +879,80 @@
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Calculate the covariance of <m>X</m> and <m>Y</m>:
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<title></title>
|
||||
|
||||
<tabular halign="center">
|
||||
<row header="yes" bottom="minor">
|
||||
<cell right="minor"></cell>
|
||||
<cell right="minor"><m>X = 1</m></cell>
|
||||
<cell><m>X = 2</m></cell>
|
||||
</row>
|
||||
|
||||
<row bottom="minor">
|
||||
<cell right="minor"><m>Y = 0</m></cell>
|
||||
<cell right="minor">0.12</cell>
|
||||
<cell>0.24</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell right="minor"><m>Y = 1</m></cell>
|
||||
<cell right="minor">0.3</cell>
|
||||
<cell>34</cell>
|
||||
</row>
|
||||
</tabular>
|
||||
</table>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Calculate the covariance of <m>X</m> and <m>Y</m>:
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<title></title>
|
||||
|
||||
<tabular halign="center">
|
||||
<row header="yes" bottom="minor">
|
||||
<cell right="minor"></cell>
|
||||
<cell right="minor"><m>X = 0</m></cell>
|
||||
<cell right="minor"><m>X = 1</m></cell>
|
||||
<cell><m>X = 2</m></cell>
|
||||
</row>
|
||||
|
||||
<row bottom="minor">
|
||||
<cell right="minor"><m>Y = 0</m></cell>
|
||||
<cell right="minor">0.08</cell>
|
||||
<cell right="minor">0.16</cell>
|
||||
<cell>0.1</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell right="minor"><m>Y = 1</m></cell>
|
||||
<cell right="minor">0.14</cell>
|
||||
<cell right="minor">0.2</cell>
|
||||
<cell>0.32</cell>
|
||||
</row>
|
||||
</tabular>
|
||||
</table>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose we roll a fair, 4-sided die two times.
|
||||
Let <m>X</m> be the sum of the rolls, and let <m>Y</m> be the product of the rolls.
|
||||
Find the covariance of <m>X</m> and <m>Y</m>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[Note: Somewhat tedious.]
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
@@ -4,45 +4,332 @@
|
||||
<title>Hypothesis Testing</title>
|
||||
|
||||
<introduction>
|
||||
<p> Text before the first section. </p>
|
||||
<p>
|
||||
Text before the first section.
|
||||
</p>
|
||||
</introduction>
|
||||
|
||||
|
||||
<section xml:id="sec-One-Sample-Tests" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>One Sample Tests</title>
|
||||
<title>One Sample Tests</title>
|
||||
|
||||
<p> Text of section. </p>
|
||||
<p>
|
||||
Text of section.
|
||||
</p>
|
||||
|
||||
<exercises xml:id="exercises-One-Sample-Tests">
|
||||
<exercise>
|
||||
<introduction>
|
||||
<p>
|
||||
In each of the following scenarios, determine whether we should use a 1-tailed test or a 2-tailed test.
|
||||
</p>
|
||||
</introduction>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
We have a coin which we've flipped many times, seeing an above-average number of heads.
|
||||
We suspect the coin comes up heads more often than a fair coin would.
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
We find a coin on the street and wonder whether or not it's a fair coin.
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
We suspect there will be a difference in average weight of mice caught during the summer versus during the winter.
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
In a medical study, a group of patients are gathered and the proportion experiencing particular symptoms is measured.
|
||||
A new drug intended to eliminate these symptoms is administered, after which the proportion experiencing symptoms is measured again.
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose we find a coin and wonder whether it's fair.
|
||||
As a first test, we decide to flip the coin 200 times and count the number of heads.
|
||||
If we see 112 heads, should we accept or reject the null hypothesis of a fair coin at a significance level of 0.05?
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose we have a coin which we suspect comes up heads more often than a fair coin would.
|
||||
As a first test, we decide to flip the coin 200 times and count the number of heads.
|
||||
If we see 112 heads, should we accept or reject the null hypothesis of a fair coin at a significance level of 0.05?
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose we find a six-sided die and wonder whether it's fair.
|
||||
As a first test, we decide to roll the die 100 times and count the number of times it comes up 1.
|
||||
If we roll 22 1's, should we accept or reject the null hypothesis of a fair die at a significance level of 0.05?
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose a particular plant when grown outdoors has an average height of 39 in with a variance of 20 in<m>^2</m>.
|
||||
We suspect that growing this plant in a greenhouse will increase its height.
|
||||
A sample of 50 plants grown in a greenhouse has an average height of 40 in.
|
||||
Is this significant enough data to reject the null hypothesis of equal means at the <m>p = 0.05</m> significance level?
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
</exercises>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<section xml:id="sec-Two-Sample-Tests" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>Two Sample Tests</title>
|
||||
<title>Two Sample Tests</title>
|
||||
|
||||
<p> Text of section. </p>
|
||||
<p>
|
||||
Text of section.
|
||||
</p>
|
||||
|
||||
<exercises xml:id="exercises-Two-Sample-Tests">
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
A farmer is testing an experimental new plant fertilizer that is supposed to increase the weight of a particular apple variety.
|
||||
A control sample of 25 apples grown using the usual fertilizer have a mean weight of 75 grams and a sample variance of 90 grams<m>^2</m> (for an individual apple).
|
||||
An experimental sample of 25 apples grown using the new fertilizer have a mean weight of 79 grams and a sample variance of 90 grams<m>^2</m>.
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
We have an established factory which produces coins that are close to fair.
|
||||
We're opening up a second factory, and we'd like to ensure the machines are calibrated to produce coins which behave similarly to the ones produced in the established factory.
|
||||
We pick one sample coin from each factory, and flip each sample coin 100 times.
|
||||
The coin from the established factory flips 52 heads in 100 flips.
|
||||
The coin from the new factory flips 62 heads in 100 flips.
|
||||
Is this strong enough evidence to reject the null hypothesis that the two factories produce similar coins at a 0.05 significance level?
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
</exercises>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<section xml:id="sec-Power" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>Power of a Test</title>
|
||||
<title>Power of a Test</title>
|
||||
|
||||
<p> Text of section. </p>
|
||||
<p>
|
||||
Text of section.
|
||||
</p>
|
||||
|
||||
<exercises xml:id="exercises-Power">
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose we find a coin and wonder whether it's fair.
|
||||
As a first test, we decide to flip the coin 200 times and count the number of heads, <m>S</m>.
|
||||
What values of <m>S</m> would be extreme enough to reject the null hypothesis of a fair coin? If the coin actually has a 0.6 probability of coming up heads, what is the power of this test?
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose we have a coin which we suspect comes up heads more often than a fair coin would.
|
||||
As a first test, we decide to flip the coin 200 times and count the number of heads, <m>S</m>.
|
||||
What values of <m>S</m> would be extreme enough to reject the null hypothesis of a fair coin? If the coin actually has a 0.6 probability of coming up heads, what is the power of this test?
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<introduction>
|
||||
<p>
|
||||
Suppose we find a six-sided die and wonder whether it's fair.
|
||||
As a first test, we decide to roll the die 100 times and count the number of times it comes up 1.
|
||||
The expected number of 1's is 50/3, with a variance of 125/9.
|
||||
</p>
|
||||
</introduction>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Using a normal approximation, what is the smallest number of 1's greater than 50/3 that would be extreme enough to reject the null hypothesis of a fair die?
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Using a normal approximation, what is the greatest number of 1's less than 50/3 that would be extreme enough to reject the null hypothesis of a fair die?
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose that this die is weighted so that it rolls a 1 with probability 0.2.
|
||||
What would be the power of our test?
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose we roll the die 100 times and see 23 1's.
|
||||
Use the maximum likelihood value for the probability of rolling a 1 to calculate the power of the test.
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose a particular plant when grown outdoors has an average height of 39 in with a variance of 20 in<m>^2</m>.
|
||||
We suspect that growing this plant in a greenhouse will increase its height.
|
||||
We take the average height of a sample of 50 plants grown in a greenhouse.
|
||||
What is the minimum average height of this sample that would be extreme enough to reject the null hypothesis of equal means at the <m>p = 0.05</m> significance level? If the plants, when grown in a greenhouse, would truly have an average height of 41 in, what is the power of our test?
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
</exercises>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<section xml:id="sec-Chi-Squared" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title><m>\chi^2</m> Test</title>
|
||||
<title><m>\chi^2</m> Test</title>
|
||||
|
||||
<p> Text of section. </p>
|
||||
<p>
|
||||
Text of section.
|
||||
</p>
|
||||
|
||||
<exercises xml:id="exercises-Chi-Squared">
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
A store owner wants to determine how much shelf space to allocate to each of the drinks that they sell.
|
||||
They survey their customers about their favorite drinks.
|
||||
Is the data below consistent with the null hypothesis that each type of drink will be equally preferred?
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<title></title>
|
||||
|
||||
<tabular>
|
||||
<row header="yes" bottom="minor">
|
||||
<cell halign="center">drink type</cell>
|
||||
<cell halign="center">water</cell>
|
||||
<cell halign="center">soda</cell>
|
||||
<cell halign="center">tea</cell>
|
||||
<cell halign="center">coffee</cell>
|
||||
<cell halign="center">energy drinks</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="center">favorite</cell>
|
||||
<cell halign="center">28</cell>
|
||||
<cell halign="center">17</cell>
|
||||
<cell halign="center">15</cell>
|
||||
<cell halign="center">26</cell>
|
||||
<cell halign="center">14</cell>
|
||||
</row>
|
||||
</tabular>
|
||||
</table>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<introduction>
|
||||
<p>
|
||||
A particular drug is administered in 100 independent trials.
|
||||
In each trial, the drug is administered to four people, and we count how many respond to the drug.
|
||||
The table below shows how many trials have each different count of people who respond to the drug.
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<title></title>
|
||||
|
||||
<tabular>
|
||||
<row header="yes" bottom="minor">
|
||||
<cell halign="center"># who respond to drug</cell>
|
||||
<cell halign="center">0</cell>
|
||||
<cell halign="center">1</cell>
|
||||
<cell halign="center">2</cell>
|
||||
<cell halign="center">3</cell>
|
||||
<cell halign="center">4</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="center"># of trials</cell>
|
||||
<cell halign="center">3</cell>
|
||||
<cell halign="center">11</cell>
|
||||
<cell halign="center">31</cell>
|
||||
<cell halign="center">34</cell>
|
||||
<cell halign="center">21</cell>
|
||||
</row>
|
||||
</tabular>
|
||||
</table>
|
||||
</introduction>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Is the data consistent with a binomial distribution with parameter <m>p = 0.7</m>?
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
What is the total number of people who have been administered the drug? What is the total number who have responded to it? What is the maximum likelihood estimation for the probability <m>p</m> that a person will respond to the drug?
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Is the data consistent with a binomial distribution with the MLE value of <m>p</m>?
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
</exercise>
|
||||
</exercises>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</chapter>
|
||||
+253
-10
@@ -4,25 +4,268 @@
|
||||
<title>Linear Regression</title>
|
||||
|
||||
<introduction>
|
||||
<p> Text before the first section. </p>
|
||||
<p>
|
||||
Text before the first section.
|
||||
</p>
|
||||
</introduction>
|
||||
|
||||
|
||||
<section xml:id="sec-Correlation" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>Correlation</title>
|
||||
<title>Correlation</title>
|
||||
|
||||
<p> Text of section. </p>
|
||||
<p>
|
||||
Text of section.
|
||||
</p>
|
||||
|
||||
<exercises xml:id="exercises-Correlation">
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Calculate the correlation of <m>X</m> and <m>Y</m>:
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<title></title>
|
||||
|
||||
<tabular halign="center">
|
||||
<row header="yes" bottom="minor">
|
||||
<cell right="minor"></cell>
|
||||
<cell right="minor"><m>X = 1</m></cell>
|
||||
<cell><m>X = 2</m></cell>
|
||||
</row>
|
||||
|
||||
<row bottom="minor">
|
||||
<cell right="minor"><m>Y = 0</m></cell>
|
||||
<cell right="minor">0.12</cell>
|
||||
<cell>0.24</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell right="minor"><m>Y = 1</m></cell>
|
||||
<cell right="minor">0.3</cell>
|
||||
<cell>34</cell>
|
||||
</row>
|
||||
</tabular>
|
||||
</table>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Calculate the correlation of <m>X</m> and <m>Y</m>:
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<title></title>
|
||||
|
||||
<tabular halign="center">
|
||||
<row header="yes" bottom="minor">
|
||||
<cell right="minor"></cell>
|
||||
<cell right="minor"><m>X = 0</m></cell>
|
||||
<cell right="minor"><m>X = 1</m></cell>
|
||||
<cell><m>X = 2</m></cell>
|
||||
</row>
|
||||
|
||||
<row bottom="minor">
|
||||
<cell right="minor"><m>Y = 0</m></cell>
|
||||
<cell right="minor">0.08</cell>
|
||||
<cell right="minor">0.16</cell>
|
||||
<cell>0.1</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell right="minor"><m>Y = 1</m></cell>
|
||||
<cell right="minor">0.14</cell>
|
||||
<cell right="minor">0.2</cell>
|
||||
<cell>0.32</cell>
|
||||
</row>
|
||||
</tabular>
|
||||
</table>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose we roll a fair, 4-sided die two times.
|
||||
Let <m>X</m> be the sum of the rolls, and let <m>Y</m> be the product of the rolls.
|
||||
Find the correlation of <m>X</m> and <m>Y</m>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[Note: Somewhat tedious.]
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
</exercises>
|
||||
</section>
|
||||
|
||||
|
||||
<section xml:id="sec-Linear-Regression" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>Linear Regression</title>
|
||||
<title>Linear Regression</title>
|
||||
|
||||
<p> Text of section. </p>
|
||||
<p>
|
||||
Text of section.
|
||||
</p>
|
||||
|
||||
<exercises xml:id="exercises-Linear-Regression">
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
A survey of local companies collects information about marketing budgets <m>X</m> and revenue <m>Y</m> (each measures in thousands of dollars), shown below.
|
||||
A linear regression gives the best linear fit as <m>Y = 18.28 X + 29.69</m>.
|
||||
What is the coefficient of determination <m>r^2</m>?
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<title></title>
|
||||
|
||||
<tabular>
|
||||
<row header="yes" bottom="minor">
|
||||
<cell halign="right"><m>x_i</m></cell>
|
||||
<cell halign="right"><m>y_i</m></cell>
|
||||
<cell halign="right"><m>(y_i - \text{avg})^2</m></cell>
|
||||
<cell halign="right"><m>\text{pred } y_i</m></cell>
|
||||
<cell halign="right"><m>\text{res}^2</m></cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="right">200</cell>
|
||||
<cell halign="right">4300</cell>
|
||||
<cell halign="right">2073600</cell>
|
||||
<cell halign="right">3686</cell>
|
||||
<cell halign="right">377377</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="right">420</cell>
|
||||
<cell halign="right">7700</cell>
|
||||
<cell halign="right">3841600</cell>
|
||||
<cell halign="right">7707</cell>
|
||||
<cell halign="right">53</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="right">270</cell>
|
||||
<cell halign="right">4500</cell>
|
||||
<cell halign="right">1537600</cell>
|
||||
<cell halign="right">4965</cell>
|
||||
<cell halign="right">216495</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="right">380</cell>
|
||||
<cell halign="right">7000</cell>
|
||||
<cell halign="right">1587600</cell>
|
||||
<cell halign="right">6976</cell>
|
||||
<cell halign="right">572</cell>
|
||||
</row>
|
||||
|
||||
<row bottom="minor">
|
||||
<cell halign="right">300</cell>
|
||||
<cell halign="right">5200</cell>
|
||||
<cell halign="right">291600</cell>
|
||||
<cell halign="right">5514</cell>
|
||||
<cell halign="right">98401</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="right">sum:</cell>
|
||||
<cell halign="right">28700</cell>
|
||||
<cell halign="right">9332000</cell>
|
||||
<cell halign="right">28848</cell>
|
||||
<cell halign="right">692898</cell>
|
||||
</row>
|
||||
</tabular>
|
||||
</table>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
A sample of 100 measurements are taken and a best fit line is calculated, resulting in the data below (the final line shows the sums for each column).
|
||||
Find the coefficient of determination.
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<title></title>
|
||||
|
||||
<tabular>
|
||||
<row header="yes" bottom="minor">
|
||||
<cell halign="center"><m>x_i</m></cell>
|
||||
<cell halign="center"><m>y_i</m></cell>
|
||||
<cell halign="center"><m>\text{pred } y_i</m></cell>
|
||||
<cell halign="center"><m>(y - \text{avg})^2</m></cell>
|
||||
<cell halign="center"><m>\text{res}^2</m></cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="center">38.00</cell>
|
||||
<cell halign="center">121.00</cell>
|
||||
<cell halign="center">93.17</cell>
|
||||
<cell halign="center">11.83</cell>
|
||||
<cell halign="center">774.33</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="center">87.00</cell>
|
||||
<cell halign="center">241.00</cell>
|
||||
<cell halign="center">238.95</cell>
|
||||
<cell halign="center">13586.23</cell>
|
||||
<cell halign="center">4.22</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="center">30.00</cell>
|
||||
<cell halign="center">61.00</cell>
|
||||
<cell halign="center">69.37</cell>
|
||||
<cell halign="center">4024.63</cell>
|
||||
<cell halign="center">70.12</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="center">35.00</cell>
|
||||
<cell halign="center">85.00</cell>
|
||||
<cell halign="center">84.25</cell>
|
||||
<cell halign="center">1555.51</cell>
|
||||
<cell halign="center">0.57</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="center">⋮</cell>
|
||||
<cell halign="center">⋮</cell>
|
||||
<cell halign="center">⋮</cell>
|
||||
<cell halign="center">⋮</cell>
|
||||
<cell halign="center">⋮</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="center">33.00</cell>
|
||||
<cell halign="center">108.00</cell>
|
||||
<cell halign="center">78.30</cell>
|
||||
<cell halign="center">270.27</cell>
|
||||
<cell halign="center">882.19</cell>
|
||||
</row>
|
||||
|
||||
<row bottom="minor">
|
||||
<cell halign="center">26.00</cell>
|
||||
<cell halign="center">32.00</cell>
|
||||
<cell halign="center">57.47</cell>
|
||||
<cell halign="center">8545.15</cell>
|
||||
<cell halign="center">648.91</cell>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell halign="center">sum:</cell>
|
||||
<cell halign="center">12444.00</cell>
|
||||
<cell halign="center">12444.00</cell>
|
||||
<cell halign="center">515206.64</cell>
|
||||
<cell halign="center">29789.80</cell>
|
||||
</row>
|
||||
</tabular>
|
||||
</table>
|
||||
</statement>
|
||||
</exercise>
|
||||
</exercises>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
</chapter>
|
||||
Reference in New Issue
Block a user