Professional Documents
Culture Documents
Statstics and Probability-Merged
Statstics and Probability-Merged
Statstics and Probability-Merged
Definitions :
1.Statistical Experiment: is a planned activity whose set of the results (outcomes) is certain;
but it can’t be said before that; which outcome occurs.
1.2.Sample Space: is the set of all possible outcomes of the experiment. It is denoted by 𝑆
or Ω .
EXAMPLES:
Sample Space :
𝛺 = {𝐻, 𝑇}
Head Tail
Events :
𝐴3 = {∅}
Events:
𝐴 = {𝑇𝑇}
𝐴 = {𝑇𝐻}
𝐴 = {𝐻𝑇}
𝐴 = {𝐻𝐻}
𝐴 = {𝑇𝑇, 𝑇𝐻}
.
. Number of Events: 24 = 16
.
𝐴= 𝛺
Sample space :
Number of Events: 28 = 64
Sample space :
Events:
𝐴 = {𝑇𝑇}
𝐴 = {𝑇𝐻}
𝐴 = {𝐻𝑇}
𝐴 = {𝐻𝐻}
𝐴 = {𝑇𝑇, 𝑇𝐻}
.
. Number of Events: 23 = 8
.
.
𝐴 =Ω
Student:
5. Flip the three coins at the same time. Write the sample space, define the events.
𝛺 =……………………
𝑛(𝛺) = ……………………
Events:
6. Flip a dice:
Sample space :
𝛺 = {1,2,3,4,5,6}
Events:
𝐴 = {1}
𝐴 = {2}
𝐴 = {3}
. Number of Events: 26 = 64
.
.
𝐸 = {1,2,3,4,5,6}
𝑛(𝛺) = 36
Student:
𝑛(𝛺) = ……………………
Events:
Event/Set Operations:
2.The intersection of two events A and B: The set of all elements in both 𝐴 and 𝐵. It is
denoted as 𝐴 ∩ 𝐵.
3.The union of two events A and B: The set of all elements in either 𝐴 and 𝐵. It is denoted as
𝐴 ∪ 𝐵.
P( )
where
n : the number of points in cluster .
N : the number of points in Ω sample space.
4.
5. If are mutually exclusive;
( Because; )
Examples:
1.The experiment : Flip a coin two times.
Sample space :
Student:
Student:
P( )
where
n : the number of points in cluster .
N : the number of points in Ω sample space.
4.
5. If are mutually exclusive;
( Because; )
Examples:
1.The experiment : Flip a coin two times.
Sample space :
Student:
At most two flips are heads
Student:
A random variable associates a real number with each outcome in the sample space. We can
go to Mathematical World from the real World by the random variables. Now; we can study
easier with the ℝ numbers in the mathematical World. Random variables are denoted by the
upper case letters 𝑋, 𝑌, 𝑍. Random Variables values are denoted by the lower case letters
𝑥, 𝑦, 𝑧 . 𝑋 random variable is shown as;
𝑋 : Ω → ℝ
𝑤 → 𝑋(𝑤)
where:
𝐷𝑋 : The set of 𝑋 values. There are two types of random variables: Discrete and Continuous
Random Variables.
Definitions:
Examples:
1-The experiment : Flip a coin
𝑋: Number of tail.
Ω = {𝐻, 𝑇}
ℝ
0 1
ℝ 0 1 2
3- Student:
The experiment : Flip a coin three times. Show the random variable, similar to the
examples. Define some probabilities and calculate them.
4 Student: ( Homework)
The experiment : Flip two coins at the same time. Show the random variable, similar to
the examples. Define some probabilities and calculate them.
**Now, we study with the discrete random variable firstly. GEI
Definition:
Probability function:
Example 1.
𝑫𝒙 = {𝟎, 𝟏} → 𝑫𝒙 countable infinite 𝑿 discrete.
𝑓𝑋 (𝑥) = 𝑃(𝑋 = 𝑥)
𝑋=𝑥 0 1
𝑃(𝑋 = 𝑥) 1 1
2 2
Example 2.
𝑫𝒙 = {𝟎, 𝟏, 𝟐}
𝑓𝑋 (𝑥) = 𝑃(𝑋 = 𝑥)
𝑋=𝑥 0 1 2
𝑃(𝑋 = 𝑥) 1 2 1
4 4 4
𝑓𝑋 (𝑥)
2
4
1
𝑥
4
0 1 2
Example: GEI
The experiment : A dice is tossed
𝑋 : the number of the surface points
𝐷𝑥 = {1,2,3,4,5,6}
1
𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = 6 𝑥 ∈ 𝑫𝒙 = {𝟏, 𝟐, 𝟑, 𝟒, 𝟓, 𝟔}→ 𝑫𝒙 sayılabilir sonlu, 𝑿 kesikli
1 2 3 4 5 6 𝑥
ℝ 1 2 3 4 …..
Properties of the probability function (pf): 𝑋 discrete random variable and 𝑓(𝑥) is its
probability function.
1. 𝑓(𝑥)>0, 𝑥𝜖𝐷𝑥
2. ∑𝑥𝜖𝐷𝑥 𝑓(𝑥)=1
Examples: GEI
a. 𝑐 =?
b. Obtain the probability function, table, graphic.
c. Calculate the probabilities.
Solution:
1
a .∑𝟐−𝟐 𝑐𝑥 2 =1 → 𝑐 = 10
𝑋=𝑥 -2 -1 1 2
𝑃(𝑋 = 𝑥) 4 1 1 4
10 10 10 10
5
c. 𝑃 (𝑋 > 2) = 0 , 𝑃(𝑋 ≥ 1) = 𝑃(𝑋 = 1) + 𝑃(𝑋 = 2) = 𝑓(1) + 𝑓 (2) = 10
Student: GEI
𝑓(𝑥) = 𝑐 𝐷𝑋 = {−1,0,1,2}
d. 𝑐 =?
e. Obtain the probability function, table, graphic.
f. Calculate the probabilities.
𝑏
𝑃(𝑎 < 𝑋 < 𝑏) = 𝑃(𝑎 ≤ 𝑋 ≤ 𝑏) = ∫ 𝑓(𝑥)𝑑𝑥
𝑎
where;
𝑓(𝑥) is called probability density function ( pdf ) of 𝑋 random variable.
Properties of the probability density function (pdf): 𝑋 continuous random variable and
𝑓(𝑥) is its probability density function.
1. 𝑓(𝑥) ≥0
∞
2. ∫−∞ 𝑓(𝑥)𝑑𝑥=1
Examples:
a. 𝑐 =?
b. 𝑃(0 < 𝑋 ≤ 0.5) = ?
c. 𝑃(𝑋 ≥ 1) =?
d. 𝑃(𝑋 ≤ 1) =?
Solution:
∞ 0 1 ∞
a. ∫−∞ 𝑓(𝑥)𝑑𝑥=1→ ∫−∞ 𝑓(𝑥)𝑑𝑥 + ∫0 𝑓(𝑥)𝑑𝑥 + ∫1 𝑓(𝑥)𝑑𝑥 = 1
0 1 ∞ 1
∫−∞ 0𝑑𝑥 + ∫0 𝑐𝑥 2 𝑑𝑥 + ∫1 0𝑑𝑥 = 1→ 0 + ∫0 𝑐𝑥 2 𝑑𝑥 +0=1→ 𝑐 = 3
0.5
b. 𝑃(0 < 𝑋 ≤ 0.5) = ∫0 3𝑥 2 𝑑𝑥 = 1/8
∞ ∞
c. 𝑃(𝑋 ≥ 1) = ∫1 𝑓(𝑥)𝑑𝑥 = ∫1 0 𝑑𝑥 = 0 GEI
1
d. 𝑃(𝑋 ≤ 1) = ∫0 𝑓(𝑥)𝑑𝑥 = 1
2.Student:
𝑋 is continuous random variable, its pdf is given as;
𝑐𝑥 2 , … − 1 ≤ x ≤ 1
𝑓(𝑥) = {
0, … 𝑜𝑡ℎ𝑒𝑟 𝑤𝑖𝑠𝑒𝑠
e. 𝑐 =?
b. 𝑃(𝑋 ≤ 0) =?
𝑃(𝑋 ≤ 2) =?
𝑃(𝑋 ≥ 2) =?
𝑃(0 < 𝑋 ≤ 1) = ?
𝑃(𝑋 ≤ 1.5) =?
𝑃(0 < 𝑋 ≤ 2) = ?
EXPECTED VALUE/ VARIANCES:
Definition:
Let 𝑋 be a random variable with pf 𝑓(𝑥), 𝑔(𝑥) be a function of 𝑋. The expected
value of 𝑔(𝑥),
Definition:
∞
𝐸(𝑋) = ∫ 𝑥 𝑓(𝑥)𝑑𝑥
−∞
2
𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 − 𝐸(𝑋))2 = 𝐸(𝑋 2 ) − (𝐸(𝑋))
∞
𝐸(𝑋 2 ) = ∫−∞ 𝑥 2 𝑓(𝑥)𝑑𝑥 ( for continuous random variable )
Note:
The expected value of 𝑋 random variable is denoted by 𝜇 and the variance of 𝑋 random
variable is denoted by 𝜎 2 . The square root of the variance is called the standard deviation of
1. 𝐸(𝑎) = 𝑎
2. 𝐸(𝑋 + 𝑎) = 𝐸(𝑋) + 𝑎
3. 𝐸(𝑎𝑋) = 𝑎𝐸(𝑋)
1. 𝑉𝑎𝑟(𝑎) = 𝑎
2. 𝑉𝑎𝑟(𝑋 + 𝑎) = 𝑉𝑎𝑟(𝑋)
3. 𝑉𝑎𝑟(𝑎𝑋) = 𝑎2 𝑉𝑎𝑟(𝑋)
a. 𝐸(𝑎𝑋 + 𝑏) = 𝑎𝐸(𝑋) + 𝑏
b. 𝑉𝑎𝑟(𝑎𝑋 + 𝑏) = 𝑎2 𝑉𝑎𝑟(𝑋)
Examples:
1
1. 𝑋 is a random vaiable with pf 𝑓(𝑥) = 3 , 𝐷𝑋 = {−1,0,1}
Solution:
1
1
𝐸(𝑋) = ∑ 𝑥𝑓𝑋 (𝑥) = (−1 + 0 + 1) = 0
3
𝑥=−
1
2)
1 2
𝐸(𝑋 = ∑ 𝑥 2 𝑓𝑋 (𝑥) = ((−1)2 + 0 + 12 ) =
3 3
𝑥=−
2 1
𝑉𝑎𝑟(𝑋) = 3 𝐸(𝑋 3 ) = 3 (−13 + 0 + 13 )=0
𝑋=𝑥 2 3 5
𝑓(𝑥) 2 1 1
4 4 4
𝑓(𝑥) = 𝑐𝑥 𝐷𝑋 = {1,2,3}
𝑃(𝑋 ≤ 3) = ?
1. 𝑋 is a random vaiable with pdf ;
3𝑥 2 , … 0 < x < 1
𝑓(𝑥) = {
0, … 𝑜𝑡ℎ𝑒𝑟 𝑤𝑖𝑠𝑒𝑠
𝐸(𝑋) =? 𝑉𝑎𝑟(𝑋) =?
Solution:
1 1 3
𝐸(𝑋) = ∫0 𝑥 𝑓(𝑥)𝑑𝑥 = ∫0 𝑥 3𝑥 2 𝑑𝑥 = 4
1 1
3
𝐸(𝑋 2 ) = ∫ 𝑥 2 𝑓(𝑥)𝑑𝑥 = ∫ 𝑥 2 3𝑥 2 𝑑𝑥 =
0 0 5
2 3 9
𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 2 ) − (𝐸(𝑋)) = − = 0.0625
5 16
1.What is the value of the 𝑐 constant . Obtain the 𝑐 constant; then calculate the 𝐸(𝑋) =?
𝑉𝑎𝑟(𝑋) =?. Define some probabilities and calculate them.
4
𝑓(𝑥) = 𝑐 ( ), 𝐷𝑋 = {0, 1,2,3,4}
𝑥
2.What is the value of the 𝑐 constant . Obtain the 𝑐 constant; then calculate the 𝐸(𝑋) =?
𝑉𝑎𝑟(𝑋) =?. Define some probabilities and calculate them.
𝑐𝑥, … 0 < x < 2
𝑓(𝑥) = {
0, … 𝑜𝑡ℎ𝑒𝑟 𝑤𝑖𝑠𝑒𝑠
Example:
1.
1
𝑓(𝑥) = 5 𝐷𝑋 = {−2, −1,0,1,2, } . 𝑌 is a random variable defined as 𝑌 = 𝑋 2 .
Solution:
𝑌 = 𝑋 2 → 𝐷𝑌 = {0,1,4}
1
𝑓𝑌 (0) = 𝑃(𝑌 = 0) = 𝑃(𝑋 2 = 0) = 𝑃(𝑋 = 0) =
5
2
𝑓𝑌 (1) = 𝑃(𝑌 = 1) = 𝑃(𝑋 2 = 1) = 𝑃(𝑋 = 1) + 𝑃(𝑋 = −1) =
5
2
𝑓𝑌 (4) = 𝑃(𝑌 = 4) = 𝑃(𝑋 2 = 4) = 𝑃(𝑋 = 2) + 𝑃(𝑋 = −2) =
5
𝑌=𝑦 0 1 4
𝑃(𝑌 = 𝑦) 1 2 2
5 5 5
𝑥2
𝑓(𝑥) = 10 𝐷𝑋 = {−2, −1, ,1,2, } . 𝑌 is a random variable defined as 𝑌 = 𝑋 + 2.
Bernoulli Experiment: The experiment consists of one trial. There are two outcomes called
failure and success. It can result in one of 2 outcomes.
where;
1.Tossing a coin
Sucess: head ( or tail randomly; it means : absent or present )
2. There are black and white balls in a box. Select and record the color of the ball.
𝐸(𝑋 2 ) = ∑ 𝑥 2 𝑓(𝑥) = 02 (1 − 𝑝) + 12 𝑝 = 𝑝
𝑥
dır. Notation:
𝑋~𝐵𝑒𝑟𝑛𝑜𝑢𝑙𝑙𝑖(1, 𝑝).
where;
𝑛
𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = ( ) 𝑝 𝑥 𝑞 𝑛−𝑥 , 𝑥 = 0,1, … , 𝑛
𝑥
The Expected Value and the Variance of 𝑋
𝐸(𝑋) = 𝑛𝑝
𝑉𝑎𝑟(𝑋) = 𝑛𝑝𝑞
dır. Notation:
𝑋~𝐵𝑖𝑛𝑜𝑚(𝑛, 𝑝)
Examples:
1.There are black and white balls in a box. Select and record the color of the ball. Put it back
and re-pick (sampling with replacement).
1.
For an exam have 20 questions with 5 multiple choices.
𝑋: The number of the correctly marked questions.
a. 𝑃(𝑋 ≥ 10) =?
b. 𝐸(𝑋) =?
Solution:
a.
1
𝑋~𝐵𝑖𝑛𝑜𝑚(𝑛 = 20, 𝑝 = )
5
𝑥 20−𝑥
20 1 4
𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = ( ) , 𝑥 = 0,1, … ,20
𝑥 5 5
20 1𝑥 420−𝑥
𝑃(𝑋 ≥ 10)=∑20
𝑥=10 ( )
𝑥 5 5
b.
𝐸(𝑋) = 𝑛𝑝 = 4
Student:
4
𝑝 = 5 : The probability to produce the piece perfectly
Let a Bernoulli experiment has the probability of success 𝑝 repeates until the first success
achieved ( under the same conditions, independently). Where 𝑋 is defined as;
dır. Burada;
The expected value and the varaince of the Geometric Random Variable:
1
𝜇 = 𝐸(𝑋) =
𝑝
1−𝑝
𝜎 2 = 𝑉𝑎𝑟(𝑋) =
𝑝2
Notation:
𝑋~𝐺𝑒𝑜(𝑝)
Examples:
The shooter repeats the trials until the first shot achieved ;
a) Define the 𝑋.
b) 𝐸(𝑋) =? 𝑉𝑎𝑟(𝑋) =?
Solution:
a)
𝑋 : The number of trials.
1 4
𝐸(𝑋) = =
𝑝 3
1−𝑝 4
𝑉𝑎𝑟(𝑋) = =
𝑝2 9
b)
63
𝑃(𝑋 < 4) = 𝑓(1) + 𝑓(2) + 𝑓(3) =
64
c)
1
𝑃(𝑋 ≥ 3) = 1 − 𝑃(𝑋 < 3) = 1 − (𝑓(1) + 𝑓(2)) =
16
2.
There are 7 white and 5 black balls in a box. Select a ball and record the color of the ball. Put
it back and re-pick (sampling with replacement). Where;
Solution:
Poisson Random Variable :
This Distribution is used in the modeling of experiments that give discrete results in
continuous environments (time, area, )
𝑋 : The number of occurrences in a given (0, 𝑡] time interval.
Examples:
𝑒 −𝜆 𝜆𝑥
𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = , 𝑥 = 0,1,2, …
𝑥!
dır.
𝜆: average number of occurences.
Notation:
𝑋~𝑃𝑜𝑖𝑠𝑠𝑜𝑛(𝜆)
The expected value and the varaince of the Geometric Random Variable:
𝜇 = 𝐸(𝑋) = 𝜆
𝜎 2 = 𝑉𝑎𝑟(𝑋) = 𝜆
Examples:
The average number of the patients coming to a hospital’s emergency servise over a 15
minute interval is 4. In this period of time;
𝑒 −4 40
𝑃(𝑋 = 0) = = 0.0183
0!
b)
𝑒 −4 41
𝑃(𝑋 = 1) = = 4 ∗ 0.0183 = 𝟎. 𝟎𝟕𝟑𝟐
1!
=𝟏 − (𝑓(0) + 𝑓(1)
= 𝟏 − (𝑒 −4 + 4𝑒 −4 )
= 𝟏 − (5 ∗ 𝑒 −4 )
= 𝟏 − (5 ∗ 0.0183)
d)
Student:
In a city; there an average 5 traffic accidents in a day. For a certain day what is the probability
that; the number of accidents
a) is 6?
b) is less than 6?
c) is more than 6?
d) is zero?
e) for a certain month, is 100?
Solution:
20.04.2020
Question 6: For 𝑋 continuous random variable has 𝑓𝑋 (𝑥) probability density function with
𝑐
e. Define 𝑓(𝑥) = 𝑐 …. 𝐷𝑋 = (. , . )
f. Obtain 𝑐 constant.
g. Calculate the 𝐸(𝑋), 𝑉𝑎𝑟(𝑋) values.
h. Define 5 probabilities and calculate them.
Question 7:
Define a Bernoulli Experiment and obtain the proability function.
Question 8:
Define a Binomial Experiment.
a. Define 𝑋: “…………………..” like that
b. Obtain the pdf
c. Calculate the 𝐸(𝑋), 𝑉𝑎𝑟(𝑋) values.
d. Define 5 probabilities and calculate them.
Question 9:
Define an experiment for Geometric Random Variable.
a.Define 𝑋: “…………………..” like that
b. Obtain the pdf
c.Calculate the 𝐸(𝑋), 𝑉𝑎𝑟(𝑋) values.
d.Define 5 probabilities and calculate them.
Question 10:
Define an experiment for Poisson Random Variable.
a..Define 𝑋: “…………………..” like that
b. Obtain the pdf
c.Calculate the 𝐸(𝑋), 𝑉𝑎𝑟(𝑋) values.
d.Define 5 probabilities and calculate them.
Some Special Continuous Random Variables:
1 1 𝑥−𝜇 2
𝑒 2 𝜎 ) , −∞
− (
𝑓(𝑥) = < 𝑥 < ∞, −∞ < 𝜇 < ∞, 𝜎 2 > 0
𝜎√2𝜋
𝜇: average ( parameter )
𝜎 2 : variances ( parameter )
e = 2.71825
π = 3.1416
Notation: 𝑋~𝑁(𝜇, 𝜎 2 )
The probability density functions graphs of normal random variables with (𝜎 2 = 9) variances
but different expected values 𝜇 = −5, −2.5,0,3,6.6 . ( Ozturk 2010 ).
0.14
0.12
𝑋~𝑁(6.6,9)
0.1 𝑋~𝑁(3,9)
0.08 𝑋~𝑁(0,9)
0.06
𝑋~𝑁(−2.5,9)
0.04 𝑋~𝑁(−5,9)
0.02
0
-15 -10 -5 0 5 10 15
1.
+∞
∫ 𝑓(𝑥) 𝑑𝑥 = 1
−∞
𝜇 +∞
1
∫ 𝑓(𝑥) 𝑑𝑥 = ∫ 𝑓(𝑥) =
−∞ 𝜇 2
Notation: 𝑍~𝑁(0,1)
The probability density function of Z random variable is given by,
1 1 2
𝑓(𝑧) = 𝑒 −2𝑧 , −∞ < 𝑧 < ∞
√2𝜋
Transformation:
𝑋−𝜇
If 𝑋~𝑁(𝜇, 𝜎 2 ) is normal random variable, 𝑍 = is a standard normal random variable. In
𝜎
this case;
𝑋−𝜇 𝑥−𝜇
𝑃(𝑋 ≤ 𝑥) = 𝑃 ( ≤ )
𝜎 𝜎
= 𝑃(𝑍 ≤ 𝑧)
For the probabilities calculations, the 𝑍 table prepared with the values 0 to nearly 4 is used.
𝑍 table is given as follows;
Examples: Reading the Table
1.
𝑃(𝑍 < 1.5) = 0.9332→ 𝑃(𝑍 > 1.5) = 1 − 0.9332 = 0.0668
4. Student
*𝑃(𝑍 > 1.36) =?
=0.036
6. 𝑃(𝑍 < −1) =?
8. 𝑃(−1.32 < 𝑍 < 2.87) = 𝑃(𝑍 < 2.87) − 𝑃(𝑍 < −1.32)
=𝑃(𝑍 < 2.87) − 𝑃(𝑍 > 1.32)
Transformations from 𝑿 to 𝒁
𝑋−𝜇
𝑋~𝑁(𝜇, 𝜎 2 ) normal random variable→ 𝑍 = standard normal random variable.
𝜎
Percentile:
The 1 − 𝛼𝑡ℎ percentile of a set of measurements is the value (𝑧𝛼 )for which at most 1 − 𝛼%
of the measurements are less than that value.
𝑃(𝑍 > 𝑧𝛼 ) = 𝛼
1.
2. (𝟗𝟕𝟓𝒕𝒉 percentile)
3. (𝟗𝟎𝒕𝒉percentile)
𝑃(𝑍 < 𝑧0.10 ) = 0.90
(1.28 + 1.29)
𝒛𝟎.𝟏𝟎 = = 𝟏. 𝟐𝟖𝟓
2
Examples:
c.Student:
𝑃(𝑋 < 40) =?
d. 95.percentile of 𝑋=?
Solution:
𝑃(𝑍 < 𝑎) = 0.95→ 𝑎 = 𝑧0.05 = 1.645
𝑥 − 35
𝑎 = 1.645 → 1.645 = → 𝑥 = 1.645 ∗ 4 + 35 → 𝑥 = 41.58
4
e. 90.percentile of 𝑋=?
Example: Student
The amount of time it takes to assemble a computer is normally distributed, with a mean of 50
minutes and a standard deviation of 10 minutes. What is the probability that
a.
c. 95.percentile of 𝑋=?
Basic Sampling Theory:
Population: is the set (possibly infinite) of all possible observations. Each observation is a
random variable 𝑋 having some probability distribution.
In real life calculating parameters of populations is usually impossible because populations are
very large. Rather than investigating the whole population, we take a sample, calculate a
statistic related to the parameter of interest, and make an inference.
Statistic: A function of rvs (usually a sample rvs in an estimation) which does not contain any
unknown parameters.
Parameter: Characteristic or measure obtained from a population. (is a numerical measure
that describes a characteristic of a population)
Estimator: The sample statistics used to estimate the population parameter is called the
estimator.
Estimate: The particular value of an estimator.
Population Sample
Mean
Variance
Parameter Estimator
(Statistic)
Sample Mean: Arithmetic average of the velues in the sample. ( estimator for μ: statistic)
∑𝑛𝑖=1 𝑥𝑖
𝑥̅ =
𝑛
2
(∑𝑛𝑗=1 𝑥𝑗 )
∑𝑛𝑗=1(𝑥𝑗 − 𝑥̅ ) 2 ∑𝑛𝑗=1 𝑥𝑗2 −
𝑠2 = = 𝑛
𝑛−1 𝑛−1
2
𝑛 2
(∑𝑛𝑗=1 𝑥𝑗 )
𝑛
∑𝑗=1(𝑥𝑗 − 𝑥̅ ) 2 √∑𝑗=1 𝑥𝑗 − 𝑛
𝑠=√ = = √𝑉𝑎𝑟𝑖𝑎𝑛𝑐𝑒
𝑛−1 𝑛−1
Range:
𝑅 = 𝑥𝑚𝑎𝑥 − 𝑥𝑚𝑖𝑛
Mode: Most repeated value in the sample.
Median:
First of all, the available data is sorted in order of size (small to large).
n+1
𝑥j , j= ; n: odd
𝑚𝑒𝑑𝑖𝑎𝑛 = {𝑥 + 𝑥 2
j j+1 n
, j = ; 𝑛: 𝑒𝑣𝑒𝑛
2 2
Range
𝑅 = 𝑚𝑎𝑥 𝑣𝑎𝑙𝑢𝑒 − min 𝑣𝑎𝑙𝑢𝑒
Example:
Solution:
∑𝑛𝑖=1 𝑥𝑖 45 + ⋯ + 35
𝑥̅ = = = 38
𝑛 10
2
(∑𝑛𝑗=1 𝑥𝑗 )
∑𝑛𝑗=1(𝑥𝑗
− 𝑥̅ ) 2 ∑𝑛𝑗=1 𝑥𝑗2 −
𝑠2 = = 𝑛
𝑛−1 𝑛−1
2
(∑𝑛𝑗=1 𝑥𝑗 ) = 380 (∑𝑛𝑗=1 𝑥𝑗 ) = 144.400
𝑛
(∑ 𝑥𝑗 2 ) = 14.624
𝑗=1
2
(∑𝑛𝑗=1 𝑥𝑗 ) 144.400
∑𝑛𝑗=1 𝑥𝑗2 − 14.624 − 10
𝑠2 = 𝑛 = = 20.44
𝑛−1 9
𝑠 = 4.52
Median=?
First of all, the available data is sorted in order of size (small to large).
𝑋 𝑖 : 30 34 35 35 38 40 40 40 43 45
n 𝑥j +𝑥j+1
j= 𝑛 ç𝑖𝑓𝑡→
2 2
𝑥5 +𝑥6 38+40
j = 5 →median = = 39
2 2
𝑅 = 45 − 30 = 15
Student:
The grades that the students have taken in a particular course are given below.
𝑋 𝑖 : 60 55 67 71 74 32 28 50 55 58 90 100 76 55 63 98 55 𝑖 = 1, … ,17
𝑛 = 17 Sample Size
Obtain the sample mean, sample variances, sample standard deviation, mode, median,
range.
Confidence Intervals-Hypothesis Tests:
Population Sample
Mean
Variance
Parameter Estimator
(Statistic)
2.Interval Estimation: is a range that contains the values used to estimate the parameter.
Where;
1 − 𝛼: 𝐶𝑜𝑛𝑓𝑖𝑒𝑛𝑐𝑒 𝐿𝑒𝑣𝑒𝑙 : The probability of the including the parameter.
Confidence Intervals:
1. 𝝈𝟐 is known.
𝜎2 𝑥̅ − 𝜇
𝑋̅~𝑁 (𝜇, ), 𝑍= ~𝑁(0, 1)
𝑛 𝜎/√𝑛
𝑃(−𝑍𝑇(𝛼⁄2) ≤ 𝑍 ≤ 𝑍𝑇(𝛼⁄2) ) = 1 − 𝛼
𝑥̅ − 𝜇
𝑃 (−𝑍𝑇(𝛼⁄2) ≤ ≤ 𝑍𝑇(𝛼⁄2) ) = 1 − 𝛼
𝜎/√𝑛
𝜎 𝜎
𝑃 (𝑥̅ − 𝑍𝑇(𝛼⁄2) ≤ 𝜇 ≤ 𝑥̅ + 𝑍𝑇(𝛼 ⁄2) )=1−𝛼 𝑤𝑖𝑡ℎ (1 − 𝛼) confidence level
√𝑛 𝑛
√
Confidence interval for 𝜇
𝑥̅ −𝜇
𝑡 = 𝑠/ ~𝑡𝑛−1
√𝑛
Basic Definitions:
3.Null-Alternative Hypothesis:
𝐻0 → null hypothesis
𝐻1 ya da 𝐻𝑠 → Alternative Hypothesis
Example:
4.One tailed hypothesis:
𝐻0 : 𝜇 = 5 ya da 𝐻0 : 𝜇 = 5
𝐻1 : 𝜇 < 5 𝐻1 : 𝜇 > 5
6.Test Statistic: The sample statistic on which we base our decision to reject or not reject the
null hypothesis.
7.Rejection Region: Range of values such that, if the test statistic falls in that range, we will
decide to reject the null hypothesis, otherwise, we will not reject the null hypothesis.
Hypothesis Test for Population Mean μ
1) Determining 𝐻0 and 𝐻1
0.4
0.35
0.3
0.4 0.25
0.35 0.2
0.3
0.15
0.25
0.1
0.2
0.05
0.15
0
-4 -3 -2 -1 0 1 2 3 4
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4
1)Determining 𝐻0 and 𝐻1
2)Calculate the test statistic value.
0.4 0.4
0.35 0.35
0.3 0.3
0.25 0.25
0.2 0.2
0.15 0.15
0.1 0.1
0.05 0.05
0
-4 -3 -2 -1 0 1 2 3 4 0
-4 -3 -2 -1 0 1 2 3 4
reject
1.
A manufacturer of sports equipment has developed a new synthetic fishing line that the
company claims has a mean breaking strength of 8 kilograms with a standard deviation of 𝝈 =
𝟎. 𝟓 kilogram. Test the hypothesis that 𝝁 = 𝟖 kilograms against the alternative that , 𝝁 ≠ 𝟖
kilograms if a random sample of 𝒏 = 𝟓𝟎 lines is tested and found to have a mean breaking
strength of 𝒙 = 𝟕. 𝟖 kilograms. Use a 𝜶 = 𝟎. 𝟎𝟏 level of significance.
1.
𝐻0 : 𝜇 = 8
𝐻1 : 𝜇 ≠ 8
2. Calculate the test statistic value.
𝑥̅ − 𝜇 7.8 − 8
𝑍𝑐 = = = −𝟐. 𝟖𝟑
𝜎/√𝑛 0.5/√50
3.
0.005
0.005
−𝑍𝑇(𝛼/2) 𝑍𝑇(𝛼/2)
−2.575 𝐻0 is rejected.
Decision: 𝑧𝑐 = −2.83 < −2.575 𝑯𝟎 is rejected.
Confidence Interval:
𝜎 𝜎
𝑃 (𝑥̅ − 𝑍𝑇(𝛼⁄2) ≤ 𝜇 ≤ 𝑥̅ + 𝑍𝑇(𝛼⁄2) ) = 0.99
√𝑛 √𝑛
𝜎 0.5
𝑥̅ ∓ 𝑍𝑇(𝛼⁄2) = 7.8 ∓ 2.575
√𝑛 √50
Random sample of 𝒏 = 𝟏𝟎𝟎 recorded deaths in the United States during the past year showed
an average life span of ̅ = 𝟕𝟏. 𝟖 years. Assuming a population standard deviation of σ= 8.9
𝒙
years, does this seem to indicate that the mean life span today is greater than 𝝁 > 𝟕𝟎 years?
Use a 0.05 level of significance. Obtain the confidence interval.
a.
1.
𝐻0 : 𝜇 = 70
𝐻1 : 𝜇 > 70
2. Calculate the test statistic value.
𝑥̅ − 𝜇 71.8 − 70
𝑍𝑐 = = = 𝟐. 𝟎𝟐
𝜎/√𝑛 8.9/√100
0.4
0.35
0.3
0.25
𝛼
0.2
0.15 𝛼
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4
𝑍𝑇(𝛼) =
𝟏.645
𝜎 𝜎
𝑃 (𝑥̅ − 𝑍𝑇(𝛼⁄2) ≤ 𝜇 ≤ 𝑥̅ + 𝑍𝑇(𝛼⁄2) ) = 0.99
√𝑛 √𝑛
𝒁𝑻(𝟎.𝟎𝟐𝟓) = 𝟏. 𝟗𝟔
𝜎 8.9
𝑥̅ ∓ 𝑍𝑇(0.025) = 71.8 ∓ 1.96
√𝑛 √100
The Edison Electric Institute has published figures on the number of kilowatt hours used
annually by various home appliances. It is claimed that a vacuum cleaner uses an average of 46
kilowatt hours per year. If a random sample of 𝒏 = 𝟏𝟐 homes included in a planned study
indicates that vacuum cleaners use an average of 𝒙 = 𝟒𝟐 kilowatt hours per year with a standard
deviation of 𝑺 = 𝟏𝟏. 𝟗 kilowatt hours, does this suggest at the 0.05 level of significance that
vacuum cleaners use, on average, less than 𝝁 = 𝟒𝟔 kilowatt hours annually? Assume the
population of kilowatt hours to be normal.
Solution:
a.
1.
𝐻0 : 𝜇 = 46
𝐻1 : 𝜇 < 46
2. Calculate the test statistic value.
𝑥̅ − 𝜇 42 − 46
𝑡𝑐 = = = −𝟏. 𝟏𝟔
𝑠/√𝑛 11.9/√12
3. K.B
0.4
0.35
0.3
0.25
0.2 𝛼=0.05
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4
−𝑡𝑇(𝛼,𝑛−1)
= −1.796
𝑯𝟎 can’t be rejected.
4. A new drug is being tried on 𝒏 = 𝟖 people with heart disease. Average of the blood pressure
of these patients are obtained as 𝒙 = 𝟏𝟏, 𝑺 = 𝟑. 𝟐𝟎𝟕 by the sample.
Çözüm:
3.207 3.207
𝑃 (11 − 2.365 ≤ 𝜇 ≤ 11 + 2.365 )= 1−𝛼 (1 − 𝛼)
√8 √8
b. A researcher claims that; the population mean 𝜇 is different from 12 . Test the hypothesis.
1.
𝐻0 : 𝜇 = 12
𝐻1 : 𝜇 ≠ 12
2.
𝑥̅ − 𝜇 11 − 12
𝑡𝑐 = = = −𝟏. 𝟏𝟑
𝑠/√𝑛 3.207/√8
3.
−𝑡𝑇(𝛼,𝑛−1) 𝑡𝑇(𝛼,𝑛−1)
2 2
) )
𝑡𝑐 = −1.13 >
−𝑡𝑇(𝛼,𝑛−1) = −2.365 𝐻0
2
can’t be rejected. .
Çözüm:
a.
𝑥 = 35.62, 𝜎 = 0.45 , 𝑛 = 40
1 − 𝛼 = 0.95 𝛼 = 0.05 ;
𝒁𝑻(𝟎.𝟎𝟐𝟓) = 𝟏. 𝟗𝟔
𝜎 𝜎
𝑃 (𝑥̅ − 𝑍𝑇(𝛼⁄2) ≤ 𝜇 ≤ 𝑥̅ + 𝑍𝑇(𝛼⁄2) ) = 0.95
√𝑛 √𝑛
0.45 0.45
𝑃 (35.62 − 1.96 ≤ 𝜇 ≤ 35.62 + 1.96 ) = 0.95
√40 √40
𝝁: [𝟑𝟓. 𝟒𝟖, 𝟑𝟓. 𝟕𝟔]
𝜎 𝜎 𝜎 0.45
(𝑥̅ + 𝑍𝑇(𝛼⁄2) ) − (𝑥̅ − 𝑍𝑇(𝛼⁄2) ) = 2𝑍𝑇(𝛼⁄2) = 2 ∗ 1.96 ∗ = 𝟎. 𝟐𝟖
√𝑛 √𝑛 √𝑛 √40
𝜎 0.45
b. 2𝑍𝑇(𝛼⁄2) = 0.30 → 2 ∗ 𝑍𝑇(𝛼⁄2) ∗ = 0.30
√𝑛 √40
𝑍𝑇(𝛼⁄2) = 2.1
0.4
0.35
0.3
1 − 𝛼/2
0.25
0.2
0.15
𝛼/2
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4
𝑍𝑇(𝛼/2)
= 𝟐. 𝟏
𝛼
1− = 0.9821 → 𝜶 = 𝟎. 𝟎𝟑𝟓𝟖
2
𝜎
c. 2𝑍𝑇(𝛼⁄2) = 0.1 → 𝑛 =?
√𝑛
0.45
2 ∗ 1.96 ∗ = 0.1
√𝑛
𝒏 ≅ 𝟑𝟏𝟏
𝜎
𝑃 (𝜇 < 𝑥̅ + 𝑍𝑇(𝛼) ) = 0.95
√𝑛
𝜎
𝑃 (𝜇 > 𝑥̅ − 𝑍𝑇(𝛼) ) = 0.95
√𝑛
𝒁𝑻(𝟎.𝟎𝟓) = 𝟏. 𝟔𝟒𝟓
0.45
𝑃 (𝜇 < 35.62 + 1.645 ) = 0.95
√40
𝑷(𝝁 < 𝟑𝟓. 𝟕𝟑𝟕) = 𝟎. 𝟗𝟓
f.
1.
𝐻0 : 𝜇 = 40
𝐻1 : 𝜇 < 40
2.
𝑥̅ − 𝜇 35.62 − 40
𝑍𝑐 = = = −𝟔𝟏. 𝟓𝟓
𝜎/√𝑛 0.45/√40
0.4
0.35
0.3
0.25
0.2
0.15
𝛼
0.1
0.05
−𝑍𝑇(𝛼)
-4 -3 -2 -1 0 1 2 3 4
Special Case :
When; 𝑛 > 30 z random variable is used instead of 𝑡 random variable.
5.
It is claimed that the average durability of dental fillings made using a certain medicine is
different from 5 years. 𝒏 = 𝟒𝟏 of the dental fillings made using the relevant drug were randomly
selected. Sample mean and the standard deviation are obtained as 𝒙 = 𝟓. 𝟗, 𝑺 = 𝟏. 𝟕𝟒 . 𝛼 =
0.01 , test the hypothesis. Obtaib the confidence interval.
1) 𝐻0 : 𝜇 = 5
𝐻1 : 𝜇 ≠ 5
𝑥̅ −𝜇 5.9−5
2) 𝑍𝑐 = 𝑠/ = 1.74/√41 = 3.33
√𝑛
3)
0.005
0.005
−𝑍𝑇(0.005) = −2.575 𝑍𝑇(0.005) = 2.575
𝑍𝑐 = 3.33 > 𝑍𝑇(𝛼⁄2=0.005) = 2.575 𝐻0 is rejected. Confidence interval;
𝑠 𝑠
𝑃 (𝑥̅ − 𝑍𝑇(𝛼⁄2) ≤ 𝜇 ≤ 𝑥̅ + 𝑍𝑇(𝛼⁄2) ) = 0.99
√ 𝑛 √𝑛
5.2003
𝑠 1.74
𝑥̅ ∓ 𝑍𝑇(𝛼⁄2) = 5.9 ∓ 2.575
√ 𝑛 √41
5.5997
𝜇: [5.2003, 5.5997]
EXAMPLES:
1.
In a research report, Richard H. Weindruch of the UCLA Medical School claims that mice with
an average life span of 32 months will live to be about 40 months old when 40% of the calories
in their diet are replaced by vitamins and protein. Is there any reason to believe that μ < 40 if
̅ = 𝟑𝟖
𝒏 = 𝟔𝟒 mice that are placed on this diet have an average life of 𝒙 months with a
standard deviation of ay 𝒔 = 𝟓. 𝟖 months? Obtain the confidence interval. 𝜶 = 𝟎. 𝟎𝟓
2. An electrical firm manufactures light bulbs that have a lifetime that is approximately
normally distributed with a mean of 800 hours and a standard deviation of 40 hours
𝑿~𝑵(𝝁 = 𝟖𝟎𝟎, 𝝈 = 𝟒𝟎)
Test the hypothesis that 𝐻0 : 𝜇 = 800 hours against the alternative, 𝑯𝟏 : 𝝁 ≠ 𝟖𝟎𝟎 hours, if a
random sample of 𝒏 = 𝟑𝟎 bulbs has an average life of 𝒙̅ = 𝟕𝟖𝟖 hours. Obtain the confidence
interval. 𝜶 = 𝟎. 𝟎𝟏
.