Stats for Engineers Lecture 6 Answers for Question sheet 1 are now online Answers for Question...
-
Upload
allison-fox -
Category
Documents
-
view
220 -
download
0
Transcript of Stats for Engineers Lecture 6 Answers for Question sheet 1 are now online Answers for Question...
Stats for Engineers Lecture 6
Answers for Question sheet 1 are now onlinehttp://cosmologist.info/teaching/STAT/
Answers for Question sheet 2 should be available Friday evening
Summary From Last Time
Continuous Random Variables
π (πβ€ πβ€π )=β«π
π
π (π₯ β² )ππ₯ β²
Probability Density Function (PDF)
Exponential distribution π (π¦ )={ππβπ π¦ , π¦>00 ,β§π¦<0
Probability density for separation of random independent events with constant rate
Normal/Gaussian distribution
π
mean standard deviation
β«ββ
β
π (π₯ )ππ₯=1
π (β1.5<π<β0.7 )π (π₯)
1 2 3 4 5 6
12%
3% 3%
82%
0%0%
Normal distribution
Consider the continuous random variable X = the weight in pounds of a randomly selected new-born baby. Suppose that X can be modelled with a normal distribution with mean ΞΌ = 7.57 and standard deviation = 1.06.
If the standard deviation were = 1.26 instead, how would that change the graph of the pdf of X?
Question from Derek Bruff
1. The graph would be narrower and have a greater maximum value.
2. The graph would be narrower and have a lesser maximum value.
3. The graph would be narrower and have the same maximum value.
4. The graph would be wider and have a greater maximum value.
5. The graph would be wider and have a lesser maximum value.
6. The graph would be wider and have the same maximum value.
π
β«ββ
β
π (π₯ )ππ₯=1
π (π<π<π)=β«π
π
π (π₯ )ππ₯
BUT: for normal distribution cannot integrate analytically.
If , then
Instead use tables for standard Normal distribution: π (π§ )= 1
β2ππβπ§ 2
2
Change of variable The probability for X in a range around is for a distribution is given by The probability should be the same if it is written in terms of another variable . Hence
β π (π¦ )= π (π₯ ) ππ₯ππ¦.
Why does this work?
i.e. change to
βπ₯=π+π π§
ΒΏ1
β2ππβ π§ 2
2 N(0, 1) - standard Normal distribution
ΒΏ π2
2
ππ₯
π (π₯)
βππ₯ππ§
=π
Use Normal tables for [also called ]
Q ( z )=π (π β€ π§ )=β«ββ
π§
π (π₯ )ππ₯
Outside of exams this is probably best evaluated using a computer package (e.g. Maple, Mathematica, Matlab, Excel); for historical reasons you still have to use tables.
πΈ
π§
Symmetries
If , which of the following is NOT the same as ?
1βπ (π>0.7 )-
π (π >β0.7 )
1βπ (π >β0.7) -
1βπ (π <β0.7) - =
=
=
(e)
Between and
Using interpolation
Q (1.356 )=Aπ (1.35 )+Bπ (1.36)Fraction of distance between1.35 and 1.36:
= 0.6
= 0.4
Q (1.356 )=0.4π (1.35 )+0.6π (1.36)
=0.9125
(f)
What is ?
Use table in reverse:
.
Interpolating as before
between 0.84 and 0.85
π=π΄Γ0.084+π΅Γ0.085
8
2
βπ=0.82Γ0.084+0.18Γ0.085
1. 2. 3. 4.
43%
2%
19%
36%
Using Normal tables
The error (in Celsius) on a cheap digital thermometer has a normal distribution, with What is the probability that a given temperature measurement is too cold by more than C?
1. 0.06182. 0.93823. 0.12364. 0.0735
Using Normal tables
The error (in Celsius) on a cheap digital thermometer has a normal distribution, with That is the probability that a given temperature measurement is too cold by more than C?
Answer:
Want
ΒΏπ (π>1.54)ΒΏ
ΒΏ1βπ (π<1.54)
ΒΏ1βQ(1.54 )
ΒΏ1β0.9382=0.0618
(g) Finding a range of values within which lies with probability 0.95:
The answer is not unique; but suppose we want an interval which is symmetric about zero i.e. between and .
βπ π
0.95
0.05/2=0.0250.025
π
So is where
0.975
0.025+0.95
Use table in reverse:
Q (π )=0.975
βπ=1.96
95% of the probability is inthe range
β1.96<π<1.96
P=0.025
P=0.025
In general 95% of the probability lies within of the mean
The range is called a 95% confidence interval.
1 2 3 4
20%
45%
2%
32%
Normal distribution
If has a Normal distribution with mean and standard deviation , which of the following could be a graph of the pdf of ?
Question from Derek Bruff
1. Too wide2. OK3. Wrong mean4. Too narrow
1. 2. 3. 4.
Normal distribution
If has a Normal distribution with mean and standard deviation , which of the following could be a graph of the pdf of ?
1. 2. 3. 4.
Too wide Correct Wrong mean Too narrow
i.e. Mean at , 95% inside (5% outside) of i.e.
Example: Manufacturing variability
The outside diameter, X mm, of a copper pipe is N(15.00, 0.022) and the fittings for joining the pipe have inside diameter Y mm, where Y ~ N(15.07, 0.0222).
(i) Find the probability that X exceeds 14.99 mm.
(ii) Within what range will X lie with probability 0.95?
(iii) Find the probability that a randomly chosen pipe fits into a randomly chosen fitting (i.e. X < Y).
XY
Example: Manufacturing variability
The outside diameter, X mm, of a copper pipe is N(15.00, 0.022) and the fittings for joining the pipe have inside diameter Y mm, where Y ~ N(15.07, 0.0222).
(i) Find the probability that X exceeds 14.99 mm.
Answer:
π (π>14.99 )=π (π> 14.99β15.00.02 )
ΒΏπ (π>β0.5 )
ΒΏπ (π<0.5 )=π(0.5)
Reminder:
β0.6915
Example: Manufacturing variability
The outside diameter, X mm, of a copper pipe is N(15.00, 0.022) and the fittings for joining the pipe have inside diameter Y mm, where Y ~ N(15.07, 0.0222).
(ii) Within what range will X lie with probability 0.95?
Answer
From previous example
βπ=15Β±1.96Γ0.02
β14.96mm<π<15.04mm
i.e. lies in with probability 0.95
1. 2. 3. 4.
71%
11%4%
14%
Where is the probability
We found 95% of the probability lies within
What is the probability that 15.04mm?
1. 0.0252. 0.053. 0.954. 0.975
P=0.025
P=0.025
Example: Manufacturing variability
The outside diameter, X mm, of a copper pipe is N(15.00, 0.022) and the fittings for joining the pipe have inside diameter Y mm, where Y ~ N(15.07, 0.0222).
(iii) Find the probability that a randomly chosen pipe fits into a randomly chosen fitting (i.e. X < Y).
Answer
For we want ).
To answer this we need to know the distribution of , where and bothhave (different) Normal distributions
Means and variances of independent random variables just add.
Distribution of the sum of Normal variates
A special property of the Normal distribution is that the distribution of the sum of Normal variates is also a Normal distribution. [stated without proof]
βππ 1+π 2=ππ 1
+ππ 2π π 1+π 2
2 =π π 1
2 +π π 2
2Etc.
If are independent and each have a normal distribution
If are constants then:
E.g. π 1+ π 2βΌπ (π1+π2 ,π12+π2
2)π 1βπ 2βΌπ (π1βπ2 ,π 1
2+π22)
Example: Manufacturing variability
The outside diameter, X mm, of a copper pipe is N(15.00, 0.022) and the fittings for joining the pipe have inside diameter Y mm, where Y ~ N(15.07, 0.0222).
(iii) Find the probability that a randomly chosen pipe fits into a randomly chosen fitting (i.e. X < Y).
Answer
For we want ).
π β πβΌπ (ππ βππ ,π π2 +π π
2 )ΒΏπ (15.07β15,0.022+0.0222)=π (0.07,0 .000884 )
Hence ΒΏπ (π>β2.35 )ΒΏπ (π<2.35 )β0.991
=
1 2 3 4
16% 16%
55%
14%
Which of the following would make a random pipe more likely to fit into a random fitting?
The outside diameter, X mm, of a copper pipe is N(15.00, 0.022) and the fittings for joining the pipe have inside diameter Y mm, where Y ~ N(15.07, 0.0222).
1. Decreasing mean of Y2. Increasing the variance of X3. Decreasing the variance of X4. Increasing the variance of Y
XY
Which of the following would make a random pipe more likely to fit into a random fitting?
The outside diameter, X mm, of a copper pipe is N(15.00, 0.022) and the fittings for joining the pipe have inside diameter Y mm, where Y ~ N(15.07, 0.0222).
XY
Common sense.
π (π<π )=π (π>0 )=π (π>0βππ
π π)=π (π<
ππ
π π)
Larger probability if - larger (bigger average gap between pipe and fitting)- smaller (less fluctuation in gap size)
, so is smaller if variance of is decreased
Answer
Or use
Normal approximations
Central Limit Theorem: If are independent random variables with the same distribution, which has mean and variance (both finite), then the sum tends to the distribution as . Hence: The sample mean is distributed approximately as .
For the approximation to be good, n has to be bigger than 30 or more for skewed distributions, but can be quite small for simple symmetric distributions.
The approximation tends to have much better fractional accuracy near the peak than in the tails: donβt rely on the approximation to estimate the probability of very rare events.
It often also works for the sum of non-independent random variables,i.e. the sum tends to a normal distribution (but the variance is harder to calculate)
Answer:
The total weight of passengers is the sum of individual weights.Assuming independent:
Example:
The mean weight of people in England is ΞΌ=72.4kg, with standard deviation 15kg.
The London Eye at capacity holds 800 people at once.
What is the distribution of the weight of the passengers at any random time when the Eye is full?
by the central limit theorem
ΒΏπ (58000 kg ,180000kg2)i.e. Normal with ,
[usual caveat: people visiting the Eye unlikely to actually have independent weights, e.g. families, school trips, etc.]
1 2 3 4 5 6 7 8
0%
13%
31%
0%
38%
0%
13%
6%
Course Feedback
Which best describes your experience of the lectures so far?
1. Too slow2. Speed OK, but struggling to understand
many things3. Speed OK, I can understand most things4. A bit fast, I can only just keep up5. Too fast, I donβt have time to take notes
though I still follow most of it6. Too fast, I feel completely lost most of the
time7. I switch off and learn on my own from the
notes and doing the questions8. I canβt hear the lectures well enough (e.g.
speech too fast to understand or other people talking)
Stopped prematurely, not many answers
1 2 3 4 5
65%
7%12%
14%
2%
Course Feedback
What do you think of clickers?
1. I think they are a good thing, help me learn and make lectures more interesting
2. I enjoy the questions, but donβt think they help me learn
3. I think they are a waste of time4. I think they are a good idea, but
better questions would make them more useful
5. I think they are a good idea, but need longer to answer questions
1 2 3 4 5
20%
4%
16%14%
47%
Course Feedback
How did you find the question sheets so far?
1. Challenging but I managed most of it OK
2. Mostly fairly easy3. Had difficulty, but workshops helped
me to understand4. Had difficulty and workshops were
very little help5. Iβve not tried them
Normal approximation to the Binomial If and is large and is not too near 0 or 1, then is approximately
Approximating a range of possible results from a Binomial distribution
e.g. if
π (π β€6 )=π (π=0 )+π (π=1 )+β¦+π (π=6 )=0.8281
ββ«ββ
6.5πβ
(π₯βπ )2
2π2
β2π π2=Q ( 6.5βππ ) π=ππ=5
βQ( 1.5β2.5 )=Q (0.9487 )=0.8286 [not always so accurateat such low !]
1 2 3
60%
27%
13%
If what is the best approximation for?
i.e. If , , , what is the best approximation for ?
Quality control example: The manufacturing of computer chips produces 10% defective chips. 200 chips are randomly selected from a large production batch. What is the probability that fewer than 15 are defective?
Answer: mean variance .
So if is the number of defective chips, approximately
Hence
This compares to the exact Binomial answer . The Binomial answer is easy to calculate on a computer, but the Normal approximation is much easier if you have to do it by hand. The Normal approximation is about right, but not accurate.
ΒΏπ (π<β1.296 )=1βπ (π <1.296 )ΒΏ1β[0.9015+0.6Γ (0.9032β0.9015 )]β0.097