Chapter 24.   Probability & Distributions


2018학년도 2학기

       반도체 공학과 공학수학2 (GEDB005) 강의교안  (2018학년도용)

    주교재: Erwin Kreyszig, Engineering Mathematics10th Edition

    부교재: 최신공학수학 I 과 II, 한빛출판사 및 (영문) 다변량 Calculus (이상구, 김응기 et al)   (http://www.hanbit.co.kr/EM/sage/)

    강의시간: E12 (금 12:00 - 14:45), 반도체관 400126호 담당교수: 김응기 박사 

 

주차

주교재

부교재

11

(newly added) Conditional Probability and Independence, Bayes' theorem

24.5: Random Variables. Probability Distributions

24.6: Mean and Variance of a Distribution

https://youtu.be/ACWuV16tdhY 

https://youtu.be/Hj1pgap4UOY 

https://youtu.be/JbYtinw-CqI 

web

http://matrix.skku.ac.kr/2018-album/R-Sage-Stat-Lab-1.html 

 


   Week 11


(newly added)

Conditional Probability and Independence


1. Conditional Probability

Let  be an arbitrary event in sample space  with . The conditional probability of  given , written , is defined as follow :

       (where, )

Let  be an event for . The conditional probability satisfies the axioms of probability space;

① For any event 

② If , then 

③ 



Example

Find ,

(1)                            (2)

Solution

(1) 

(2) 

그림입니다.        그림입니다.

                (a)                                       (b)


Example

In a certain college,  of students failed calculus,  of students failed engineering mathematics and  of students failed both calculus and engineering mathematics. A student is selected at random.

(i) If he failed engineering mathematics, what is the probability that he failed calculus?

(ii) If he failed calculus, what is the probability that he failed engineering mathematics?

(ii) what is the probability that he failed calculus or engineering mathematics?

Solution

 and 

      ,   ,   

(i) The probability that a student failed calculus, given that he has failed engineering mathematics is

      

(ii) The probability that a student failed engineering mathematics, given that he has failed calculus is

      

(iii) 


Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

1/2

2/5



2. Multiplication Theorem for Conditional Probability


The multiplicative theorem can be obtained from the definition of conditional probability.

In general, the following is satisfied for event  ;

   


(a) Independent Events 

Two events  and  are said to be mutually independent if and only if

      .



Example

If  and  are independent events, then  and are independent events.

Proof

     

                

                


Example

A woman is dealt  cards one after the other from an ordinary desk of cards. What is the probability  that they are all clovers?

Solution

The first card is a clover is .

The second card is a clover is .

The third card is a clover is .

 


Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

11/850


(b) Independent Events and Dependent Events 

If  and  are independent events, then .

If  and  are dependent events, then .


Example

A box contains  screws, three of which are defective. Two screws are drawn at random. Find the probability that neither of the two screws is defective.

Solution

We consider the events

    : First drawn screw nondefective.

   : Second drawn screw nondefective.

The events are independent, and the answer is

   

   

If we sample without replacement, then . If  has occurred, then there are  screws left in the box,  of which are defective. Thus  and Multiplication Theorem yields the answer

      


Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

49/100




Evaluate

7/15



3. Partition


A partition of a set   is a set of nonempty subsets of  such that every element  in  is in exactly one of these subsets.

Equivalently, a family of sets  is a partition of  if and only if all of the following conditions hold:

   ① 

   ② 

   ③ 

Suppose the events  from a partition of a sample space .



4. Total probability


Suppose the events  is a partition of a sample space . The events  are mutually exclusive and their union is . Let  be any other event. Then

where,  are mutually exclusive. Accordingly,

.

On the other hand, the total probability is obtained by the multiplication theorem of probability

      

Also, for any , the conditional probability of , given  is defined by

     

The following formula of total probability

      

If  is used, the following equation

        where, 

is called Bayes theorem.


In the Bayes theorem,  is the priori probability of event , and  is the posteriori probability of event .

 

5. Bayes’ Theorem


Suppose the events   is a partition of a sample space  and  is any event. Then for any 

      

Proof

 is mutually exclusive event

   

         

         

     Conditional probability for any event 

   ,  

   .


Example

Three machine  produce respectively   and  of the total number of items of a factory. The percentages of defective output of these machines are  and . An item is selected at random, find the probability that item is found defective and 

Solution

 is the event that an item is defective.

      


Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

29/1000

9/29


24.5 Random Variable


1. Random Variable


The quantity that we observe in an experiment will be denoted by  and called a random variable (or stochastic variable) because the value it will assume in the next trial depends on chance, on randomness.

If we count (cars on a road, defective screws in a production, tosses until a die shows the first Six), we have a discrete random variable and distribution. If we measure (electric voltage, rainfall, hardness of steel), we have a continuous random variable and distribution. Precise definitions follow. In both cases the distribution of X is determined by the distribution function

(1)                                

this is the probability that in a trial,  will assume any value not exceeding .


Definition Random Variable

A random variable  is a function defined on the sample space  of an experiment. Its values are real numbers. For every number  the probability

      

with which X assumes  is defined.


From (1) we obtain the fundamental formula for the probability corresponding to an

interval ,

(2)                           

This follows because (“ assumes any value not exceeding ”) and (“ assumes any value in the interval ”) are mutually exclusive events, so that

by (1) and 

      

                      

and subtraction of on both sides gives (2).

 

2. Discrete Random Variable and Probability Distribution


A random variable  and its distribution are discrete if  assumes only finitely many or at most countably many values  called the possible values of , with positive probabilities  whereas the probability  is zero for any interval  containing no possible value.


The discrete distribution of  is also determined by the probability function  of , defined by

(3)                           ()


From this we get the values of the distribution function  by taking sums,

(4)                           

where for any given  we sum all the probabilities  for which  is smaller than or equal to that of .


For the probability corresponding to intervals we have from (2) and (4)

(5)                 ( discrete).

This is the sum of all probabilities  for which satisfies . From this and  we obtain the following formula.

(6)                                                 (sum of all probabilities)


a) Probability Mass Function

Let  be a discrete random variable on a sample space  with a finite image set; . We make  into a probability space by defining the probability of  to be  which we write . This  on , defined by  is the probability function or probability mass function of  and is given in the form of a table.

Sum

Pro

 



b) Properties of Probability Mass Function

Let  be a discrete random variable. The function  is the probability mass function or discrete probability function of ; it satisfies the following conditions of 

(i) 

(ii) 

(iii) 


c) Cumulative Distribution Function

The distribution function[or cumulative distribution function] of  is the probability mass function defined by

         .

The cdf  of a discrete r.v.  can be obtained by

      

 is a step function.


d) Cumulative Distribution Function

(1) 

(2) 

(3)     

       is the monotone increasing function of 

(4)  is the right continuous function

(5) If  is the discrete type then 

 

Example

In the experiment of tossing a fair coin three times. If  is the r.v. giving the number of heads obtained, find probability function and distribution function.

Solution

 is head,  is a tail.

In three toss, the number of heads are

.

Sample space is .

     

      

     

     


    The probability function of  is

     

     


     The distribution function of  is

     

       ,   

     

     

     

     

    The distribution function  of  is

     


Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

[1/8, 3/8, 3/8, 1/8]

[1/8, 1/2, 7/8, 1]



3. Continuous Random Variable and Probability Distribution


Continuous random variables appear in experiments in which we measure. By definition, a random variable  and its distribution are of continuous type or, briefly, continuous, if its distribution function [defined in (1)] can be given by an integral

(7)                            .

Differentiation gives the relation of  to  as

(8)                               

for every  at which is continuous.

From (2) and (7) we obtain the very important formula for the probability corresponding to an interval:

(9)                         .

This is the analog of (5).

From (7) and  we also have the analog of (6):

(10)                         .


a) Probability Density Function


Let  be a continuous random variable whose image set;  is a continuous of numbers such as an interval. The set  is an events in   and therefore the probability  is

.

 is a probability function and probability density function of .


b) Properties of Probability Density Function


Let  be a continuous random variable. The function  is the probability density function or continuous probability function of ; it satisfies the following conditions

(1)        (2)          (3) 

 

c) Cumulative Distribution Function


Let  be a continuous random variable. The distribution function or cumulative distribution function  of  is

.

If  is a continuous random variable with distribution , then

.

 


d) Properties of Cumulative Distribution Function


(1)  where ,  is the probability of .

(2) ,      

(3) ,       

(4)   for all 

(5)     

       is the monotone increasing function of 

(6) 

(7) If  is the continuous type then

.


Example

Let  be a continuous random variable with probability density function

.

(i) Find 

(ii) Find a cumulative distribution function.

Solution

(i) 

(ii) The cumulative distribution function is

      


Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

1/4




Evaluate

1/4*s^2

0

1



5. Expected Value


The expected value means average.  and  are the expected value.

This  on , defined by  is the probability function or probability mass function of .

sum

Pro

 

(i)         (ii) 


The expected value  of  is

   


Properties of the Expected Value

(1)         (2)       (3) 



Example

Let  have the pmf

then find .

Solution


Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

[1/6, 1/6, 1/6, 1/6, 1/6, 1/6]

7/2


Example

In the experiment of tossing a fair coin two times. If  is the r.v. giving the number of heads obtained, find  and .

Solution

 is head,  is a tail.

In two toss, the number of heads are

.

Sample space is .

 

The probability function of  is

 

     

Total

 

The probability mass function of  is

     


Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

[1/4, 1/2, 1/4]

1

3/2



Example

Let  have the pdf

then find  and .

Solution

Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

2

16/3



Variance

The variance of a r.v.  denoted by  or  is defined by

Proof

      


Remark

The standard deviation of a r.v.  denoted by , is the positive square root of .



Properties of the Variance

(1)         (2)       (3) 



Mean and Variance


The mean (or expected value) of a r.v. , denoted by  or , is defined by


The variance of a r.v. , denoted by  or , is defined by

Example

Let  be a continuous random variable with probability density function

where  is constant.

(i) Determine .

(ii) Find the mean  of 

(iii) Find the variance  of 

Solution

(i) 

    

         

(ii) 

(iii) 

    


Example

Let  be a continuous random variable with probability density function

.

Find the mean  and the variance of .

Solution


Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

2/3

1/2

1/18




Evaluate

4

33/2

1/2


Example

Find the mean and variance, if they exist, of each of the following distributions.

(a) 

(b) 

Solution

(a) 

   

   

Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

1/2

3/10

1/20


(b) 

   

   


Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

2

6

2


Example

For each of the following distributions, compute .

(a) 


(b) 


Solution

(a) 

   

   

   


Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

1/2

3/10

1/20

11/25*sqrt(5)


(b) 


(b) 

   

   

   

   


Sage Coding

http://math3.skku.ac.kr/  http://sage.skku.edu/  http://mathlab.knou.ac.kr:8080/




Evaluate

2

6

2

13/8



   http://matrix.skku.ac.kr/sglee/ 


[한빛 아카데미] Engineering Mathematics with Sage:

[저자] 이상 구, 김영 록, 박준 현, 김응 기, 이재 화


Contents

 A. 공학수학 1 – 선형대수, 상미분방정식+ Lab

Chapter 01 벡터와 선형대수 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-1.html 


Chapter 02 미분방정식의 이해 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-2.html 

Chapter 03 1계 상미분방정식 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-3.html    

Chapter 04 2계 상미분방정식 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-4.html 

Chapter 05 고계 상미분방정식 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-5.html 

Chapter 06 연립미분방정식, 비선형미분방정식 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-6.html

Chapter 07 상미분방정식의 급수해법, 특수함수 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-7.html  

Chapter 08 라플라스 변환 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-8.html

 

B. 공학수학 2 - 벡터미적분, 복소해석 + Lab

Chapter 09 벡터미분, 기울기, 발산, 회전 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-9.html

Chapter 10 벡터적분, 적분정리 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-10.html

Chapter 11 푸리에 급수, 적분 및 변환 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-11.html

Chapter 12 편미분방정식 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-12.html

Chapter 13 복소수와 복소함수, 복소미분 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-13.html

Chapter 14 복소적분 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-14.html

Chapter 15 급수, 유수 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-15.html

Chapter 16 등각사상 http://matrix.skku.ac.kr/EM-Sage/E-Math-Chapter-16.html

 





Copyright @ 2018 SKKU Matrix Lab. All rights reserved.
Made by Manager: Prof. Sang-Gu Lee and Dr. Jae Hwa Lee
*This research was supported by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (2017R1D1A1B03035865).