chapter 1 data and statistics - thuweb.thu.edu.tw/wenwei/www/courses/statistics/basic... · web...

135
Chapter 1 Data and Statistics Motivation: the following kinds of statements in newspaper and magazine appear very frequently, Sales of new homes are accruing at a rate of 70300 homes per year. The unemployment rate has dropped to 4.0%. The Dow Jones Industrial Average closed at 10000 Census The above numerical descriptions are very familiar to most of us since we use it in everyday life. As a matter of fact, these are part of statistics. Therefore, statistics is in our everyday life. We now give a description about statistics. Definition of statistics: Statistics is the art and science of collecting, analyzing, presenting, interpreting and predicting data. Objective of this course: using statistics is to give the managers and decision makers a better understanding of the business and economic environment and thus enable them to make more informed and better decision. 1.1 Data (I) Basis components of a data set: Usually, a data set consists the following components: Element: the entities on which data are collected. Variable: a characteristic of interest for the element. Observation: the set of measurements collected for a particular element. Example 1: We have a data set for the following 5 stocks: 1

Upload: others

Post on 25-Mar-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Chapter 1 Data and StatisticsMotivation: the following kinds of statements in newspaper and magazine appear very frequently, Sales of new homes are accruing at a rate of 70300 homes per year. The unemployment rate has dropped to 4.0%. The Dow Jones Industrial Average closed at 10000 Census

The above numerical descriptions are very familiar to most of us since we use it in everyday life. As a matter of fact, these are part of statistics. Therefore, statistics is in our everyday life. We now give a description about statistics.

Definition of statistics:Statistics is the art and science of collecting, analyzing, presenting, interpreting and predicting data.

Objective of this course: using statistics is to give the managers and decision makers a better understanding of the business and economic environment and thus enable them to make more informed and better decision.

1.1 Data

(I) Basis components of a data set:

Usually, a data set consists the following components:Element: the entities on which data are collected.Variable: a characteristic of interest for the element.Observation: the set of measurements collected for a particular element.

Example 1:We have a data set for the following 5 stocks:

Stock Annual Sales (in million)

Earnings per share ($)

Exchange (where to trade)

Cache Inc. 86.6 0.25 OTC

1

Page 2: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Koss Corp 36.1 0.89 OTCPar Technology 81.2 0.32 NYSEScientific Tech. 17.3 0.46 OTCWestern Beef 273.7 0.78 OTC

Note: OTC stands for “over the counter” while NYSE stands for “New York Stock Exchange”.

In the above data set,

Elements Cache Inc., Koss Corp, Par Technology, Scientific Tech, Western Beef

Variables Annual Sales, Earnings per share, ExchangeObservations (86.6,0.25,OTC),(36.1,0.89,OTC),(81.2,0.32,NYSE),

(17.3,0.46,OTC),(273.7,0.78,OTC)

(II) Qualitative and Quantitative Data:

Qualitative data: labels or names used to identify an attribute of each element.Quantitative data: indicating how much or how many

Example 1 (continue):Qualitative data: OTC, OTC, NYSE, OTC and OTCQuantitative data: 86.6, 36.1, 81.2, 17.3, 273.7, 0.25, 0.89, 0.32, 0.46 and 0.78

The variable “Exchange” is referred to as a qualitative variable.The variables “Annual Sales” and “Earnings per share” are referred to as quantitative variables.

Note: quantitative data are always numeric, but qualitative data may be either numeric or nonnumeric, for example, id numbers and automobile license plate numbers are qualitative data.

Note: ordinary arithmetic operations are meaningful only with quantitative data and are not meaningful with qualitative data.

(III) Cross-Sectional and Time Series Data:

Cross-sectional data: data collected at the same or approximately the same point in

2

Page 3: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

time.Time series data: data collected over several time periods.

Online Exercise:Exercise 1.1.1Exercise 1.1.2

1.2 Data Source:There are two sources for data collection, one is existing sources and the other is statistical studies.

(I) Existing Sources:There are two existing sources:Company: some of the data commonly available from the internal information sources of most company including employee records, production records, inventory records, sale records, credit records and customer profile, etc…Government Agency: Department of Labor, Bureau of the Census, Federal Reserve Board, Office of Management and Budget, Department of Commerce.

(II) Statistical Studies:A statistical study can be conducted to obtain the data not readily available from existing sources. Such statistical studies can be classified as either experimental or observational. Experimental Study: attempt is made to control or influence the variables of interest, for example, drug test and industrial product test. Observational Study: no attempt is made to control or influence the variable of interest, for example, survey.

Online Exercise:Exercise 1.2.1

1.3 Descriptive Statistics:There are two classes of descriptive statistics, one class includes table and graph and the other class includes numerical measures and index numbers.

(I) Tabular and Graphical Approaches:

3

Page 4: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Example 1(continue): Tabular approach for stock data:

Exchange Frequency PercentOTC 4 80%

NYSE 1 20%

5 100%Graphical approach for stock data:

(II) Numerical Measures and Index Numbers:

Some numerical quantities can be used to provide important information about the data, for example, the average or mean. Index numbers are widely used in business, for example, the Consumer Price Index (CPI) and te Dow Jones Industrial Average (DJIA).

Online Exercise:Exercise 1.3.1Exercise 1.3.2

1.4 Statistical Inference:

Descriptive statistics introduced in section 1.4 can provide important and intuitive information about the data of interest. However, these statistical measures are mainly exploratory. For more detailed, rigorous and accurate results, the statistical inference

4

Page 5: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

procedure is required. To conduct a statistical inference, data need to be drawn from a set of elements of interest. We now introduce some basic components in the statistical inference procedure. They are:

Population: the set of all elements of interest in a particular study.Sample: a subset of the population.

Data from a sample can be used to make estimates and test hypotheses about the characteristics of a population

Example 2:

Suppose there are 100000 bulbs produced in a bulbs factory.

Objective: want to know the average lifetime of the 100000 bulbs.

The 100000 bulbs are the population of interest. In practice, it is not possible (also not realistic) to test 100000 bulbs for the lifetime. One workable way is to draw a sample, say 100 bulbs, and then test for their lifetime. Suppose the average lifetime of the 100 bulbs is 750 hours. Then, the estimate (guess) of the average lifetime of the 100000 bulbs is 750 hours.

Note: the process of making estimates and testing hypotheses about the characteristics of a population is referred to as statistical inference.

Online Exercise:Exercise 1.4.1

Chapter 2 Descriptive Statistics: Table and Graph

The logical flow of this chapter: Summarizing qualitative data using tables and graphs (2.1) Summarizing quantitative data using tables and graphs (2.2) Exploratory data analysis using simple arithmetic and easy-to-

draw graphs such that the data can be summarized quickly.

5

Page 6: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

2.1 Summarizing Qualitative Data:

For qualitative data, we can use frequency distribution and relative frequency. We now introduce frequency distribution, relative frequency and percent frequency.

Frequency distribution: tabular summary of data indicating the number of data values in each of several nonoverlapping classes.

Relative frequency: (frequency of a class)/n, where n is the total number of the data.

Percent frequency: (relative frequency)× 100%.

Based on the frequency distribution, relative frequency, and percent frequency of the data, we can use table and graphs to display these frequencies.

Example:

Forbes investigates the degrees of 25 best paid CEO (chief executive officer).

Tabular summary:

Degrees Frequency Relative Frequency Percent Frequency

None 2 0.08 8

Bachelor 11 0.44 44

Master 7 0.28 28

Doctorate 5 0.20 20

Total 25 1.00 100

Graphical display:

6

Page 7: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Bar Graph:

Pie Graph:

Note: most statisticians recommend that from 5 to 20 classes be used in a frequency distribution; classes with smaller frequencies should normally be grouped!!

Online Exercise:Exercise 2.1.1Exercise 2.1.2

7

Page 8: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

2.2 Summarizing Quantitative Data:

Determine the classes:

For quantitative data, we need to define the classes first. There are 3 steps to define the classes for a frequency distribution:

Step 1: Determine the number of nonoverlapping classes, usually 5 to 20 classes.

Step 2: Determine the width of each class,

Note: the number of classes and the approximate class are determined by trial and error!!

Step 3: Determine the class limits: the smallest possible data value should be larger than the lower class limit while the largest possible data value should be smaller than the upper class limit.

Example:

Suppose we have the following data (in days):12 14 19 18 15 15 18 17 20 2722 23 22 21 33 28 14 18 16 13

We applied the above procedure to this data.

Step 1:We choose 5 to be the number of classes.Step 2:

.

Therefore, we use 5 as the class width.Step 3:The 5 classes we choose are

10-14 15-19 20-24 25-29 30-34

8

Page 9: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Note: the lower class limit in the first class (10) is smaller than the smallest data value 12. Also, the upper class limit in the last class (34) is smaller than the largest data value 33.

Summarizing quantitative data:

Tabular summary:

In addition to frequency, relative frequency and percent frequency, another tabular summary of quantitative data is the cumulative frequency distribution.

Cumulative frequency distribution: the number of data items with values less than or equal to the upper class limit of each class.

Graphical display:

In addition to histogram, another graphical display of quantitative data is ogive.

Ogive: the number of data items with values less than or equal to the upper class limit of each class.

Example (continue):

Classes Frequency Relative Frequency Percent Frequency

10-14 4 0.2 20

15-19 8 0.4 40

20-24 5 0.25 25

25-29 2 0.1 10

30-34 1 0.05 5 Total 20 1 100

Classes Cumulative Frequency

Cumulative Relative Frequency

Cumulative Percent Frequency

4 0.2 20

9

Page 10: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

4+8=12 0.2+0.4=0.6 20+40=60

4+8+5=17 0.2+0.4+0.25=0.85 20+40+25=85

4+8+5+2=19 0.2+0.4+0.25+0.1=0.95 20+40+25+10=95

4+8+5+2+1=20 0.2+0.4+0.25+0.1+0.05=1 20+40+25+10+5=100

The histogram is

The ogive plot is

Online Exercise:Exercise 2.2.1

10

Page 11: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Exercise 2.1.2

2.3 Exploratory Data Analysis:

Stem-and-leaf display is a useful exploratory data analysis tool which can provide an idea of the shape of the distribution of a set of quantitative data.

Example:

Suppose the following data are the midterm scores of 10 students,17, 22, 93, 82, 95, 87, 66, 68, 71, 52.

Then, the stem-and-leaf display is 1 7 2 2 3 4 5 2 6 6 8 7 1 8 2 7 9 3 5

Online Exercise:Exercise 2.3.1

Chapter 3 Descriptive Statistics: Numerical

Methods

Suppose are all the elements in the population and are the sample drawn from , where N is referred to as the population size and n is the sample size. In this chapter, we introduce several numerical measures to obtain important information about the population. These numerical measures computed from a sample are called sample statistics while those numerical measures computed from a population are called population parameters.

11

Page 12: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

In practice, it is not realistic or not possible to obtain population parameter from a population, for example, the average lifetime of 100000 bulbs. Therefore, the sample statistic can be used to estimate the population parameter, for example, the average lifetime of 100 bulbs can be used to estimate the average lifetime of 100000 bulbs..

3.1 Measure of Location:

Example:Suppose the following data are the scores of 10 students in a quiz,

1, 3, 5, 7, 9, 2, 4, 6, 8, 10.Some measures need to be used to provide information about the performance of the 10 students in this quiz.

(I) Mean:

Sample mean: (sample statistic)

Population mean: (population parameter)

Basically, the mean can provide the information about the “center” of the data. Intuitively, it can measure the rough “location” of the data.

Example (continue):

(II) Median:

The data are arranged in ascending (or descending) order. Then, 1. As the sample size is odd, the median is the middle value.2. As the sample size is even, the median is the mean of the middle two numbers.

Example (continue):

12

Page 13: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

If the data are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11. Then,

Note: the median is less sensitive to the data with extreme values than the mean. For example, in the previous data, suppose the last data has been wrongly typed, the data become 1, 3, 5, 7, 9, 2, 4, 6, 8, 100. Then the median is still 5.5 while the mean becomes 14.5.

(III) Mode: The data value occurs with greatest frequency (not necessarily to be numerical).

Note: if the data have exactly two modes, we say that the data are bimodal. If the data have more than two modes, we say that the data are multimodal.

(IV) Percentile:The pth percentile is a value such as at least p percent of the data have this value or less.

Note: 50th percentile = median!!

The procedure to calculate the pth percentile:1. Arrange the data in ascending order.

2. Compute an index i,

3. (a) If i is not an integer, round up, i.e., the next integer value greater than i denote the position of the pth percentile. (b) If i is an integer, the pth percentile is the average of the data values in positions i and i+1.

Example (continue):

Please find 40th percentile and 26th percentile for the previous data.

[Solution]

Step 1: the data in ascending order are

13

Page 14: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

1, 2, 3, 4, 5, 6, 7, 8, 9, 10.Step 2: For 40 th percentile,

.

For 26 th percentile,

Step 3:

40th percentile

and26th percentile

(V) Quartiles:When dividing data into 4 parts, the division points are referred to as the quartile!!That is,

the first quartile or 25th percentilethe second quartile or 50th percentile

the third quartile or 75th percentile

Example (continuous):Find the first quartile and the third quartile for the previous example.

Step 2: For the first quartile,

.

For the third quartile,

Step 3:

and

Online Exercise:Exercise 3.1.1

14

Page 15: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Exercise 3.1.2

3.2 Measure of Dispersion:

Example:Suppose there are two factories producing the batteries. From each factory, 10 batteries are drawn to test for the lifetime (in hours). These lifetimes are:

Factory 1: 10.1, 9.9, 10.1, 9.9, 9.9, 10.1, 9.9, 10.1, 9.9, 10.1Factory 2: 16, 5, 7, 14, 6, 15, 3, 13, 9, 12.

The mean lifetimes of the two factories are both 10. However, by looking at the data, it is obvious that the batteries produced by factory 1 are much more reliable than the ones by factory 2. This implies other measures for measuring the “dispersion” or “variation” of the data are required.

(I) Range:

range=(largest value of the data)-(smallest value of the data).

Example (continue):

Range of lifetime data for factory 1=10.1-9.9=0.2Range of lifetime data for factory 2=16-3=13The range of battery lifetimes for factory 1 is much smaller than the one for

factor 2.

Note: the range is seldom used as the only measure of dispersion. The range is highly influenced by an extremely large or an extremely small data value.

(II) Interquartile Range:Interquartile is the difference between the third and the first quartiles. That is,

.

Example:

15

Page 16: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

The first quartile and the third quartile for the data from factory 1 are 9.9 and 10.1, respectively, and 6 and 14 for the data from factory 2. Therefore,

IQR (factory 1)=10.1-9.9=0.2IQR (factory 2)=14-6=8.

The interquartile of battery lifetimes for factory 1 is much smaller than the one

for factor 2.

(III) Variance and Standard Deviation:population deviation about the mean: sample deviation about the mean: Intuitively, the population deviation and the sample deviation can measure how far the data is from the “center” of the data. Then, population variance and sample variance are the sum of square of the population deviation and sample deviation,

and

,

respectively. The population standard deviation and sample standard deviation are the square root of population variance and sample variance:

and ,

respectively. Large sample variance or sample standard deviation implies the data are “dispersed” or are highly varied.

Note:

Example:

16

Page 17: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

The sample variance of battery lifetimes for factory 2 is 190 times larger than

the one for factor 1.The sample standard deviation for the data from factories 1 and 2 are

and ,

respectively.

(IV) Coefficient of Variation:The coefficient of variation is another useful statistic for measuring the dispersion of the data. The coefficient of variation is

The coefficient of variation is invariant with respect to the scale of the data. On the other hand, the standard deviation is not scale-invariant. The following example demonstrates the property.

Example:

In the battery data from factory 1, suppose the measurement is in minutes rather than hours. Then, the data are 606, 594, 606, 594, 594, 606, 594, 606, 594, 606. Thus, the standard deviation becomes 6.3245 which is 60 times larger than the one 0.1054 based on the original data measured in hours. However, no matter the data are measured in hours and minutes, the coefficient of variation is

Note: since the coefficient of variation is scale-invariant, it is very useful for comparing the dispersion of different data. For example, in the previous battery data, if the lifetime of the batteries from factory 1 and factory 2 are measured in minutes and hours, respectively, the standard deviation for factory 1, 6.3245, would be larger than for factory 2, 4.5946. However, the coefficient of variation for factory 1, 1.054 is still much smaller than the one for factory 2, 45.946.

Online Exercise:Exercise 3.2.1Exercise 3.2.2

17

Page 18: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

3.3 Exploratory Data Analysis:

(I) Five-Number Summary:

The five number summary can provide important information about both the location and the dispersion of the data. They are Smallest value First quartile Median Third quartile Largest value

Example (continue):

The original data (in hours) are:Factory 1: 10.1, 9.9, 10.1, 9.9, 9.9, 10.1, 9.9, 10.1, 9.9, 10.1Factory 2: 16, 5, 7, 14, 6, 15, 3, 13, 9, 12.

The five-number summary for the data from both factories is

Smallest Median LargestFactory 1 9.9 9.9 10 10.1 10.1Factory 2 3 6 10.5 14 16

(II) Box Plot:

The box-plot is commonly used graphical method to provide information about both the location and dispersion of the data. Especially, as the interest is the comparison of the data from different populations, the box-plot can provide insight. The box-plot is

1.5IQR 1.5IQR

lower IQR upper

18

Page 19: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

limit limit

Note: data outside upper limit and lower limit are called outliers.

Example (continue):

The box-plot for the data from the two factories is

Online Exercise:Exercise 3.3.1

3.4 Measures of Relative Location:

z-score is the quantity which can be used to measure the relative location of the data. Z-score, referred to as the standardized value for observation i, is defined as

.

Note: is the number of standard deviation from the mean .

Example (continue):

19

Page 20: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Factory 1:

10.1 9.9 10.1 9.9 9.9 10.1 9.9 10.1 9.9 10.10.948 -0.948 0.948 -0.948 -0.948 0.948 -0.948 0.948 -0.948 0.948

Factory 2:

16 5 7 14 6 15 3 13 9 121.305 -1.088 -0.652 0.870 -0.870 1.088 -1.523 0.652 -0.217 0.435

There are two results related to the location of the data. The first result is Chebyshev’s theorem. Chebyshev’s Theorem: For any population, within k standard deviation of mean, there are at least

of the data, where k is any value greater than 1.

Based on Chebyshev’s theorem, for any data set, it could be roughly estimated that at

least of data within k sample standard deviation of mean.

Example (continue):

As k=2, based on Chebyshev’s theorem, at least

of the data are estimated within 2 standard deviations of mean. For the data from factory 1 and factory 2, all the data are within 2 sample deviations of mean, i.e., all the data have z-score with absolute values smaller than 2.

The second result is based on the empirical rule. The rule is especially applicable as the data have a bell-shaped distribution. The empirical rule is

Approximately 68% of the data will be within one standard deviation of the mean ( ).

20

Page 21: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Approximately 95% of the data will be within one standard deviation of the mean ( ).

Almost all of the data will be within one standard deviation of the mean ().

Example (continue):

For data from factory 1, all the data are within one standard deviation of the mean while 60% of the data are within one standard deviation of the mean for the data from the factory2. The result based on the empirical rule is not applicable to the two data set since the two data sets are not bell-shaped. However, for the following data,

2.11 -0.83 -1.43 1.35 -0.42 -0.69 -0.65 -0.29 -0.54 1.92

0.53 -0.27 1.7 0.88 1.25 0.32 -2.18 0.68 0.85 0.34

The histogram of the above data given below indicates the data is roughly bell-shaped.

Approximately 65% of the data are within one standard deviation of the mean, which is similar to the result based on the empirical rule (68%).

Detecting Outliers:To identify the outliers, we can use either the box-plot or the z-score. The outliers identified by the box-plot are those data outside the upper limit or lower limit while

21

Page 22: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

the outliers identified by z-score are those with z-score smaller than –3 or greater than 3. Note: the outliers identified by box-plot might be different from those identified by using z-score .

Online Exercise:Exercise 3.4.1

3.5 The Weighted Mean and Grouped Data:

Weighted Mean:

.

Note: when data values vary in importance, the analyst must choose the weight that best reflects the importance of each data value in the determination of the mean.

Example 1:

The following are 5 purchases of a raw material over the past 3 months.Purchase Cost per Pound ($) Number of Pounds

1 3.00 12002 3.40 5003 2.80 27504 2.90 10005 3.25 800

Find the mean cost per pound.

[solutions:]

and

22

Page 23: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Then,

Population Mean for Grouped Data:

,

where the midpoint for class k,

the frequency for class k in the population,

the population size.

Sample Mean for Grouped Data:

,

where the frequency for class k in the sample,

the sample size.

Population Variance for Grouped Data:

Sample Variance for Grouped Data:

23

Page 24: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Example 2:

The following are the frequency distribution of the time in days required to complete year-end audits:

Audit Time (days) Frequency10-14 415-19 820-24 525-29 230-34 1

What is the mean and the variance of the audit time?

[solutions:]

and

Thus,

and

Online Exercise:Exercise 3.5.1

24

Page 25: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Chapter 4 Association Between Two Variables

In this chapter, we introduce several methods to measure the association. They are:

Crosstabulations and scatter diagrams Numerical measures of association

4.1 Crosstabulations and Scatter Diagrams:The crosstabulation (table) and the scatter diagram (graph) can help us understand the relationship between two variables.

1. Crosstabulations

Example:

Objective: explore the association of the quality and the price for the restaurants in the Los Angeles area.

The following table is the crosstabulation of the quality rating (good, very good and excellent) and the mean price ($10-19, $20-29, $30-39, and $40-49) data collected for a sample 300 restaurants located in the Los Angeles area.

Meal Price

Quality Rating

$10-19 $20-29 $30-39 $40-49 Total

Good 42 40 2 0 84

Very Good 34 64 46 6 150

Excellent 2 14 28 22 66

Total 78 118 76 28 300

The above crosstabulation provides insight abut the relationship between the

25

Page 26: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

variables, quality rating and mean price. It seems higher meal prices appear to be associated with the higher quality restaurants and the lower meal prices appear to be associated with the lower quality restaurants. For example, for the most expensive restaurants ($40-49), none of these restaurants is rated the lowest quality but most of them are rated highest quality. On the other hand, for the least expensive restaurants

($10-19), only 2 of these restaurants are rated the highest quality ( ) but

over half of them are rated lowest quality.

2. Scatter Diagram

Suppose we have the following scatter diagrams for the weights and heights of the students:

The left scatter diagram indicates the positive relationship between weight and height while the right scatter diagram implies the negative relationship between the two variables. The middle scatter diagram shows that there is no apparent relationship between the weight and height.

Online Exercise:Exercise 4.1.1

4.2 Numerical Measures of Association:

26

Page 27: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

There are several numerical measures of association. We first introduce the covariance of two variables.

(I) Covariance:Suppose we have two populations,

population 1: and population 2: .Also, let

sample 1: and sample 2: are drawn from population 1 and population 2, respectively.

Let and be the population means of populations 1 and 2, respectively. Let

and

be the sample means of samples 1 and 2, respectively.

Then, the population covariance is

,

while the sample covariance

.

Intuitively, would be very large (positive) as the observations in two population are larger or smaller than the sample means simultaneously. That is, the observations are positively correlated. On the other hand, would be very small (negative) as the observations in one population are larger than the sample mean while the ones in the other population are smaller than the sample mean. Therefore, the observations are negative correlated. Finally, would be close to 0 as the observations in one population being larger than the sample mean while the ones in the other population are sometimes larger but sometimes smaller than the sample mean, i.e., the observations in the two populations are not correlated.

Example: .

Let be the total money spent on advertisement for some product and iz be the sales

27

Page 28: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

volume (1 unit 1000 packs).

2 5 1 3 4 1 5 3 4 2

iz 50 57 41 54 54 38 63 48 59 461 12 20 0 3 26 24 0 8 5

.

Note: is not scale invariant. For example, in the above example, if the sales volume is 1 unit 1 pack. Then, would be 5000, 5700, 4100, 5400, 5400, 3800, 6300, 4800, 5900, 4600. Thus, will be 1100, which 1000 times larger than the original one. It is not plausible since the correlation between the total money on advertisement and the sales volume would change as the measurement unit changes. The quantity introduced next is scale-invariant and can be used to measure the correlation of two populations.

(II) Correlation Coefficient:Let : population standard deviation for

: population standard deviation for : sample standard deviation for : sample standard deviation for .

Then, the population correlation coefficient is

,

while the sample correlation coefficient is

.

Note: and

Example (continue):

28

Page 29: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

and

Then,

.

Note: is scale-invariant. For example, even the sales volume is measured in 1 pack per unit, the value of is still the same, 0.93.

Example:

Let .

1 2 3 4 5

iz 2 4 6 8 10Then,

,

.

Thus,

.

Note: when there is a perfect positive linear relationship between variable x and z, then . might indicate a positive linear relationship.

Online Exercise:Exercise 4.2.1

29

Page 30: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Chapter 5 Introduction to Probability

5.1. Experiments, Counting Rules, and Probabilities

Experiment: any process that generates well-defined outcomes.Example:

Experiment OutcomesToss a coin Head, TailRoll a dice 1, 2, 3, 4, 5, 6

Play a football game Win, Lose, TieRain tomorrow Rain, No rain

Sample Space: the set of all experimental outcomes, denoted by S

Example:

Experiment Sample SpaceToss a coin S={Head, Tail}Roll a dice S={1, 2, 3, 4, 5, 6}

Play a football game S={Win, Lose, Tie}Rain tomorrow S={Rain, No rain}

Counting Rules: the rules for counting the number of the experimental outcomes.

We have the following counting rules:

Multiple Step Experiment: Permutations Combinations

1. Multiple Step Experiment:

30

Page 31: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Example: Step 1 Step 2 Experimental Outcomes (throw dice) (throw coin) 1 (1,T),(1,H)

2 (2,T),(2,H)

3 (3,T),(3,H)

4 (4,T),(4,H)

5 (5,T),(5,H)

6 (6,T),(6,H)

The total number of experimental outcomes=

Counting rule for multiple step experiments: If there are k-steps in an experiment which there are possible outcomes on the first step, possible outcomes on the second step, and so on, then the total number of experimental outcomes is given by

2. Permutations: n objects are to be selected from a set of N objects, where the order is important.

Example:

Suppose we take 3 balls from 5 balls, 1, 2, 3, 4 and 5. Then,

two permutations (different orders)

31

THTHTHTHTHTH

Page 32: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Example: n=3 □ □ □

5•4•3

N•(N-1)•……•(N-n+1)

n

↓ N=5 5 4 3

Example: n

□ □ …………… □

N • (N-1) • (N-2) •……•[N-(n-1)]=

n

32

N-1

Page 33: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Counting rule for permutation:As n objects are taken from N objects, then the total number of permutations is given by

where

3. Combinations:

n objects are to be selected from a set of N objects, where the order is not important.

Example: □ □ □ 1 combination, but 6 permutations.

Example: □ □

•4= 20

10 combinations

33

Page 34: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

20 permutations

Example:

□ □ □

= 5•4•3=60

5 • 4 • 3

1 combinations, total 10 combinations.

34

3!=6

Page 35: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Example:

n

□ □ …………… □

permutations

n

□ □ …………… □

1 combination

n • n-1 • • 1

Counting rule for combination:As n objects are taken from N objects, then the total number of

35

N-1

n-1

n-1

Page 36: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

combinations is given by

Online Exercise:Exercise 5.1 .1 Exercise 5.1 .2

5.2. Events and Their Probability

Modern probability theory: a probability value that expresses our degree of belief that the experimental outcome will occur is specified.

Basic requirement for assigning probabilities:1. Let denote the i’th experimental outcome and be its

probability .2. If there are n experimental outcomes,

Example:

Roll a fair dice. Let be the outcome the point is i. Then,

Event: an event is a collection (set) of sample points (experimental outcomes).

Example:

the event that the points are even. the event that the points are odd.

and

Probability of an event: the probability of any event is equal to the sum of the sample points in the event.

36

Page 37: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Example:

.

Note:

Online Exercise:Exercise 5 .2.1

5.3. Some Basic Relationships of Probability: the complement of A, the event containing all sample points that are not in A.

the union of A and B, the event containing all sample points belonging to A or

B or Both. the intersection of A and B, the event containing all sample points belonging to

both A and B.

Example:

, and . Then, .

Note: two events having no sample points in common is called mutually exclusive events. That is, if A and B are mutually exclusive events, then

Example:

, and are mutually exclusive events.

Results:

1.

2. If A and B are mutually exclusive events, then

37

Page 38: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

and .

3. (addition law) For any two events A and B,

[Intuition of addition law]:

Example:

1.

2.

3. We can also use the addition law, then

Ⅰ Ⅱ Ⅲ

A B

38

Page 39: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Online Exercise:Exercise 5 .3.1 Exercise 5 .3. 2

5.4. Conditional Probability

A|B: event A given the condition that event B has

occurred.

Example:

{2}| : point 2 occurs given that the point is known to be even.

the conditional probability of A given B (as the event B has

occurred, the chance of the event A then occurs!!)

Formula of the conditional probability:

and

.

Example:

Note: Note: Independent Events:

39

Page 40: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

or A and B are independent events.

.

Dependent Events:

or A and B are dependent events.

.

Intuitively, if events A and B are independent, then the chance of event A occurring is the same no matter whether event B has occurred. That is, event A occurring is “independent” of event B occurring. On the other hand, if events A and B are dependent, then the chance of event A occurring given that event B has occurred will be different from the one with event B not occurring.

Example:

A: the event of a police officer getting promotion.M: the event of a police officer being man.W: the event of a police officer being woman.

The above result implies the chance of a promotion knowing the candidate being male is twice higher than the one knowing the one being female. In addition, the chance of a promotion knowing the candidate being female (0.15) is much lower than the overall promotion rate (0.27). That is, the promotion event A is “dependent” on the gender event M or W.

A promotion is related to the gender.Note: as events A and B are independent.

Online Exercise:

40

Page 41: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Exercise 5. 4.1 Exercise 5. 4.2

5.5. Bayes’ Theorem

Example 1:

B: test (positive) A: no AIDS: test (negative) : AIDS

From past experience and records, we know

That is, we know the probability of a patient having no AIDS, the conditional probability of test positive given having no AIDS (wrong diagnosis), and the conditional probability of test positive given having AIDS (correct diagnosis).

Our object is to find , i.e., we want to know the probability of a patient

having not AIDS even known that this patient is test positive.

Example 2:

the finance of the company being good. the finance of the company being O.K. the finance of the company being bad.

good finance assessment for the company. O.K. finance assessment for the company. bad finance assessment for the company.

From the past records, we know

That is, we know the chances of the different finance situations of the company and the conditional probabilities of the different assessments for the company given the finance of the company known, for example, indicates 90% chance

41

Page 42: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

of good finance year of the company has been predicted correctly by the finance assessment.

Our objective is to obtain the probability , i.e., the conditional probability that the finance of the company being good in the coming year given that good finance assessment for the company in this year.

To find the required probability in the above two examples, the following Bayes’s theorem can be used.

Bayes’s Theorem (two events):

[Derivation of Bayes’s theorem (two events)]:

We want to know . Since

,

and ,

thus,

Example 1:

Then, by Bayes’s theorem,

A B Ac

B∩A B∩Ac

42

Page 43: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

A patient with test positive still has high probability (0.7519) of no AIDS.

Bayes’s Theorem (general):Let be mutually exclusive events and

,then

,

.

[Derivation of Bayes’s theorem (general)]:

Since,

and

,

thus,

B∩A1 B∩A2 B∩An

A1 A2 ……………….. An

B∩A1 B∩A2 B∩An B

B∩A1 B∩A2 …………… B∩An

43

Page 44: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Example 2:

A company with good finance assessment has very high probability (0.95) of

good finance situation in the coming year.

Online Exercise:Exercise 5. 5.1

Chapter 6 Probability Distribution

6.1. Random Variable

Example:

Suppose we gamble in a casino and the possible result is as follows.

Win

Lose

Tie

3

-4

0

30

-40

0

Outcome Token (X) Money (Y)

44

Page 45: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

In this example, the sample space is , containing 3 outcomes. X is

the quantity representing the token obtained or lose under different result while Y is the one representing the money obtained or lost.

In the above example, X and Y can provide a numerical summary corresponding to the experimental outcome. A formal definition for these numerical quantities is in the following.

Definition (random variable): A random variable is a numerical description of the outcome of an experiment.

Example:

In the previous example, X: the random variable representing the token obtained or lose corresponding to

different outcomes.Y: the random variable representing the money obtained or lose corresponding to

different outcomes.

X has 3 possible values corresponding to 3 outcomes

Y has 3 possible values corresponding to 3 outcomes .

Note that ,

since

That is, Y is 10 times of X under all possible experimental outcomes.

There are two types of random variables. They are:Discrete random variable: a quantity assumes either a finite

number of values or an infinite sequence of values, such as 0, 1, 2,

45

Page 46: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Continuous random variable: a quantity assumes any numerical value in an interval or collection of intervals, such as time, weight, distance, and temperature.

Example:

Let the sample space .

Let Z be the random variable representing the delay flight time, defined as

For example, corresponds to the outcome that the flight time is 0.5 hour (30 minutes) late.

Online Exercise:Exercise 6 . 1.1

6.2. Probability Distribution

Definition (probability distribution): a function describes how probabilities are distributed over the values of the random variable.

(I): Discrete Random Variable:

Example:

Suppose the probability for the outcomes in the gamble example is

46

Page 47: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Let be some function corresponding to the probability of the gambling outcomes for random variable X, defined as

is referred as the probability distribution of random variable X.Similarly, the probability distribution of random variable Y is

◆Required conditions for a discrete probability distribution:Let be all the possible values of the discrete random variable X. Then, the required conditions for to be the discrete probability distribution for X are (a)

(b)

Example:

In the gambling example, is a discrete probability distribution for the random variable X since

(a) .(b) . Similarly, is also a discrete probability distribution for the random variable Y.

Note: the discrete probability distribution describes the probability of a discrete random variable at different values.

47

Page 48: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

(II): Continuous Random Variable:

For a continuous random variable, it is impossible to assign a probability to every numerical value since there are uncountable number of values in an interval. Instead, the probability can be assigned to a small interval. The probability density function can describe how the probability distributes in the small interval.

Example:

In the delay flight time example, suppose the probability of being late within 0.5 hours is two times of the one of being late more than 0.5 hour, i.e.,

.

Then, the probability density function for the random variable Z is

The area corresponding to the interval is the probability of the random variable Z taking values in this interval. For example, the probability of the flight time being late within 0.5 hour (the random variable Z taking value in the interval [0,0.5]). is

.Similarly, the probability of the flight time being late more than 0.5 hour (the random

48

Page 49: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

variable Z taking value in the interval (0.5,1]). is

.

On the other hand, If the probability of being late within 0.5 hours is the same as the one of being late more than 0.5 hour, i.e.,

,

then, the probability density function for the random variable Z is

Note that the probability density function corresponds to the probability of the random variable taking values in some interval. However, the probability density function evaluated at some value, not like the probability distribution, can not be used to describe the probability of the random variable Z taking this value.

Required conditions for a continuous probability density:Let the continuous random variable Z taking values in [a,b]. Then, the required conditions for to be the continuous probability distribution for Z are (a)

(b)

Note: . That is, the area under the

graph of corresponding to a given interval is the probability of the random variable Z taking value in this interval.

Example:

In the flight time example, is a discrete probability distribution for the random variable Z since

(a) .

(b) .

Similarly, is also a discrete probability distribution for the random variable Z.

49

Page 50: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Online Exercise:Exercise 6 . 2.1

6.3. Expected Value and Variance:

(I): Discrete Random Variable:

(a) Expected Value:

Example:

X: the random variable representing the point of throwing a fair dice. Then,

Intuitively, the average point of throwing a fair dice is

.

The expected value of the random variable X is just the average,

.

Formula for the expected value of a discrete random variable:Let be all the possible values of the discrete random variable X and is the probability distribution. Then, the expected value of the discrete random variable X is

Example:

In the gambling example, the expected value of the random variable X is

50

Page 51: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

.

Therefore, on the average, the gambler will lose for every bet.

Similarly, the expected value of the random variable Y is

.

(b) Variance:

Example:

Suppose we want to measure the variation of the random variable X in the dice example. Then, the square distance between the values of X and its mean E(X)=3.5 can be used, i.e., can be used. The average square distance is

.

Intuitively, large average square distance implies the values of X scatter widely.

The variance of the random variable X is just the average square distance (the expected value of the square distance). The variance for the dice example is

Formula for the variance of a discrete random variable:Let be all the possible values of the discrete random variable X and is the probability distribution. Let be the expected value of X. Then, the variance of the discrete random variable X is

Example:

51

Page 52: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

In the gambling example, the variance of the random variable X is

.

Similarly, the variance of the random variable Y is

(II): Continuous Random Variable:

(a) Expected Value:

Example:

Z: the random variable representing the delay flight time taking values in [0,1].

Then, the probability density function for Z is

Intuitively, since there is equal chance for any delay time in [0,1], 0.5 hour seems to be a sensible estimate of the average delay time.

The expected value of the random variable Z is just the average delay time.

.

Formula for the expected value of a continuous random variable:Let the continuous random variable X taking values in [a,b] and

52

Page 53: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

is the probability density function. Then, the expected value of the continuous random variable X is

.

Example:

In the flight time example, suppose the probability density function for Z is

Then, the expected value of the random variable Z is

.

Therefore, on the average, the flight time is hour.

(b) Variance:

Example:

Suppose we want to measure the variation of the random variable Z in the flight time example. Suppose is the probability density function for Z. Then, the square

distance between the values of Z and its mean can be used, i.e.,

can be used. The average square distance is

.

The variance of the random variable Z is just the average square distance (the expected value of the square distance). The variance for the flight time example is

.

Formula for the variance of a continuous random variable:Let the continuous random variable X taking values in [a,b] and

53

Page 54: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

is the probability distribution. Let be the expected value of X. Then, the variance of the continuous random variable X is

Example:

In the flight time example, suppose is the probability density function for Z. Then, the variance of the random variable Z is

Online Exercise:Exercise 6 . 3.1 Exercise 6 . 3.2

Chapter 7 Discrete Probability Distribution

7.1. The Binomial Probability Distribution

Example:

representing the number of heads as flipping a fair coin twice.

.

□ □

T T (1 combination)

□ □

54

Page 55: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

H T

T H (2 combinations)

□ □

H H (1 combination)

, representing the number of heads as flipping a fair coin 3 times.

□ □ □

T T T (1 combination)

□ □ □ H T T

T H T (3 combinations)

T T H

□ □ □ H H T

H T H (3 combinations)

T H H

□ □ □

55

Page 56: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

H H H (1 combination)

, representing the number of heads as flipping a fair coin n times.

Then,

n

□ □ …………… □

T T…………….T

(1 combination)

n

□ □ …………… □

H T……..……..T

n T H……… T

(n combinations)

T T …………..H

56

Page 57: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Note: the number of combinations is equivalent to the number of ways as drawing i balls (heads) from n balls (n flips).

Example:

representing the number of successes over 3 trials.

Suppose the probability of the success is while the probability of failure is .

Then,

□ □ □

F F F

(1 combination)

□ □ □ S F F

F S F

(3 combinations) F F S

□ □ □ S S F

S F S

(3 combinations) F S S

57

Page 58: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

□ □ □

S S S

(1 combination)

, representing the number of successes over n trials.

Then,

n

□ □ …………… □

F F…………….F

(1 combination)

n

□ □ ……… □

S F…….. .F

n F S……… F

(n combinations)

F F … .S

58

Page 59: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

From the above example, we readily describe the binomial experiment.

Properties of Binomial Experiment X: representing the number of successes over n independent

identical trials. The probability of a success in a trial is p while the probability of

a failure is (1-p).

Binomail Probability Distribution:Let X be the random variable representing the number of successes of a Binomial experiment. Then, the probability distribution function for X is

.

Properties of Binomial Probability Distribution:A random variable X has the binomial probability distribution with parameter , then

and .

[Derivation:]

59

Page 60: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

The derivation of is left as exercise.

How to obtain the binomail probability distribution: (a)Using table of Binomail distribution.(b)Using computer

by some software, for example, Excel or Minitab. by some computing resource in the internet, for example,

http://home.kimo.com.tw/g894730/stat/ca1/index.htmlor http://140.128.104.155/wenwei/stat-life/stat/ca1/index.html

Online Exercise:Exercise 7 . 1.1 Exercise 7 . 1.2

7.2. The Poisson Probability Distribution:

Properties of Poisson Experiment: X : representing the number of occurrences in a continuous

interval. expected value of occurrences in this interval. The probability of an occurrence is the same for any two

intervals of equal length!! The expected value of occurrences in an interval is proportional to the length of this interval.

The occurrence or nonoccurrence in any interval is independent of the occurrence or nonoccurrence in any other interval.

60

Page 61: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

The probability of two or more occurrences in a very small interval is close to 0

Poisson Probability Distribution:Let X be the random variable representing the number of occurrences of a Poisson experiment in some interval. Then, the probability distribution function for X is

,

where

and is some parameter.

Properties of Poisson Probability Distribution:A random variable X has the Poisson probability distribution with parameter , then

and .

The derivations of the above properties are similar to the ones for the binomial random variable and are left as exercises.

Example:

Suppose the average number of car accidents on the highway in one day is 4. What is the probability of no car accident in one day? What is the probability of 1 car accidence in two days?

[solution:]

It is sensible to use Poisson random variable representing the number of car accidents on the high way. Let X representing the number of car accidents on the high way in one day. Then,

and .

61

Page 62: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Then,

Since the

average number of car accidents in one day is 4, thus the average number of car accidents in two days should be 8. Let Y represent the number of car accidents in two days. Then,

and.

Then,

Example:

Suppose the average number of calls by 104 in one minute is 2. What is the probability of 10 calls in 5 minutes?

[solution]:

Since the average number of calls by 104 in one minute is 2, thus the average number of calls in 5 minutes is 10. Let X represent the number of calls in 5 minutes. Then,

and.

Then,

.

How to obtain the Poisson probability distribution: (c) Using table of Poisson distribution.(d)Using computer

by some software, for example, Excel or Minitab. by some computing resource in the internet, for example,

http://home.kimo.com.tw/g894730/stat/ca1/index.htmlor http://140.128.104.155/wenwei/stat-life/stat/ca1/index.html

62

Page 63: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Online Exercise:Exercise 7 . 2.1 Exercise 7 . 2.2

7.3. The Hypergeometric Probability Distribution:

Example:

Suppose there are 50 officers, 10 female officers and 40 male officers. Suppose 20 of them will be promoted. Let X represent the number of female promotions. Then,

63

Page 64: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Therefore, the probability distribution function for X is

Hypergeometric Probability Distribution:There are N elements in the population, r elements in group 1 and the other N-r elements in group 2. Suppose we select n elements from the two groups and the random variable X represent the number of elements selected from group 1. Then, the probability distribution function for X is

Note: is the number of combinations as selecting i elements from

group 1 while is the number of combinations as selecting n-i

elements from group2. is the total number of combinations as

selecting n elements from the two groups while is the total

number of combinations as selecting i and n-i elements from groups 1 and 2, respectively.

How to obtain the hypergeometric probability distribution: (e) Using table of Poisson distribution.

64

Page 65: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

(f) Using computer by some software, for example, Excel or Minitab. by some computing resource in the internet, for example,

http://home.kimo.com.tw/g894730/stat/ca1/index.htmlor http://140.128.104.155/wenwei/stat-life/stat/ca1/index.html

Online Exercise:Exercise 7 . 3.1

Chapter 8 Continuous Probability Density

8.1. The Uniform Probability Density:

Example:

X: the random variable representing the flight time from Taipei to Kaohsiung.Suppose the flight time can be any value in the interval from 30 to 50 minutes. That

is, .

Question: if the probability of a flight time within any time interval is the same as the one within the other time interval with the same length. Then, what density is sensible for describing the probability?

Recall that the area under the graph of corresponding to any interval is the

probability of the random variable X taking values in this interval. Since the probabilities of X taking values in any equal length interval are the same, then the the areas under the graph of corresponding to any equal length interval are the same. Thus, will take the same value over any equal length area. For example,

within one minute interval, then

Therefore, we have

Note: since we know , then by the property that

65

Page 66: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

.

In the above example, the probability density has the same value in the interval the random variable taking value. This probability density is referred as the uniform probability density function.

Uniform Probability Density Function:A random variable X taking values in [a,b] has the uniform probability density function if

.

The graph of is

Properties of Uniform Probability Density Function:A random variable X taking values in [a,b] has the uniform probability density function , then

[Derivation]:

66

Page 67: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

The derivation of is left as an exercise.

Example:

In the flight time example, then

Online Exercise:Exercise 8 . 1.1 Exercise 8 . 1.2

8.2. The Normal Probability Density

The normal probability density, also called the Gaussian density, might be the most commonly used probability density function in statistics.

Normal Probability Density Function:A random variable X taking values in has the normal probability density function if

,

where

The graph of is

67

Page 68: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Properties of Normal Density Function:

(a)

and

(b)

(c) X is a random variable with the normal density function. X is denoted by

(d)The standard deviation determine the width of the curve. The normal density with larger standard deviation would be more dispersed than the one with smaller standard deviation. In the following graph, two normal density functions have the same

68

Page 69: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

means but different standard deviations, one is 1 (the solid line) and the other is 2 (the dotted line):

(e) The normal density is symmetric with respect to mean. That is,

(f) The probability of a normal random variable follows the empirical rule introduce previously. That is,

i.e., the probability of X taking values within one standard deviation is about 0.68, within two standard deviations about 0.95, and within three standard deviation about 1.

Standard Normal Probability Density Function:A random variable Z, taking values in has the standard normal probability density function if

,

where.

Note: we denote Z as

69

Page 70: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

The probability of Z taking values in some interval can be found by the normal table. The probability of Z taking values in [0,z], can be obtained by the normal table. That is,

The graph is given below:

Example:

70

Page 71: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Example:

. What is x?

[solutions:]

Computing Probabilities for any Normal Random Variable: Once the probability of the standard normal random variable can be obtained, the probability of any normal random variable (not standard) can be found via the following important rescaling:

Example:

Let . Please find .

[solutions:]

Then,

Online Exercise:Exercise 8 . 2.1 Exercise 8 . 2.2

8.3 The Exponential Density:

The exponential random variable can be used to describe the life time of a machine,

71

Page 72: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

industrial product and Human being. Also, it can be used to describe the waiting time of a customer for some service.

Exponetial Probability Density Function:A random variable X taking values in has the exponential probability density function if

,

where .The graph of is

Properties of Exponential Density Function:Let X be the random variable with the exponential density function

and the parameter . Then1.

,

for any .2.

and

.

[derivation:]

72

Page 73: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

The derivation of 2 is left as exercise.

Note: is called the survival

function.

Example:

Let X represent the life time of a washing machine. Suppose the average lifetime forthis type of washing machine is 15 years. What is the probability that this washing machine can be used for less than 6 years? Also, what is the probability that this washing machine can be used for more than 18 years?

[solution:]

X has the exponential density function with Then,

Thus, for this washing machine, it is about 30% chance that it can be used for quite a long time or a short time.

Relationship Between Poisson and Exponential Random Variable:Let Y be a Poisson random variable representing the number of occurrences in an time interval of length t with the probability distribution

where is the mean number of occurrences in this time interval. Then, if X represent the time of one occurrence, X has the

exponential density function with mean (t).

73

Page 74: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

The intuition of the above result is as follows. Suppose the time interval is [0,1] (in hour) and . Then, on the average, there are 4 occurrences during 1 hour period.

Thus, the mean time for one occurrence is (hour). The number of

occurrences can be described by a Poisson random variable (discrete) with mean 4 while the time of one occurrence can be described by an exponential random variable

(continuous) with mean .

Example:

Suppose the average number of car accidents on the highway in two days is 8. What is the probability of no accident for more than 3 days?

[solutions:]

The average number of car accidents on the highway in one day is . Thus, the

mean time of one occurrence is .

Let Y be the Poisson random variable with mean 4 representing the number of car

accidents in one day while X be the exponential random variable with mean

representing the time of one accident occurrence. Thus,

Online Exercise:Exercise 8 . 3.1

Appendix: Poisson and Normal Approximations

(I) Poisson Approximation:

74

Page 75: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Example:

Let X be the binomial random variable over 250 trials with . Then, it might not be easy to obtain

directly. However, if we only want to obtain an approximation, Poisson approximation is a good choice.

Poisson approximation:Let X be a binomial random variable over n trials and let

Let Y be a Poisson random variable with mean np. Then, the probability of X taking value i can be approximated by the probability of Y taking value i. That is,

Example:

In the above example, the Poisson random variable with mean can be used for approximation. Thus,

Note that the exact probability is

.

Therefore, the normal approximation is reasonably accurate.

(II) Normal Approximation:

Normal approximation:Let X be a binomial random variable over n trials and the probability of success be p. Let Y be the normal random variable with mean np and variance np(1-p). Then, the probability of X taking value i can be

approximated by the probability of Y taking values in .

75

Page 76: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

That is,

.

Note: the probability can be obtained by

transforming Y to the standard normal random variable Z.

Example:

Let X be the binomial random variable over 100 trials and let the probability of a success be 0.1. What is the probability of 12 successes by normal approximation?

[solutions:]

The normal random variable with mean and variance can be used for approximation. Thus,

Note that the exact probability is

.

Therefore, the normal approximation is reasonably accurate.

Note: Let X be a binomial random variable over n trials and the probability of success be p and let Y be the normal random variable with mean np and variance np(1-p). Then,

,

where Z is the standard normal random variable. Similarly,

76

Page 77: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Example:

In the previous example, what is the probability of at most 13 successes by normal approximation?

[solution:]

Note that the exact probability is

.

Therefore, the normal approximation is reasonably accurate.

Review 1 Chapter 1:

1. Elements, Variable, and Observations:

Example:

Table 1.1 (p. 5) in the textbook!!

25 elements (25 companies): Advanced Comm. Systems, Ag-Chem Equipment Co.,…,Webco Industries Inc..

5 variables : Exchange, Ticker Symbol, Annual Sales, Share Price, Price/Earnings Ratio.

25 observations: (OTC, ACSC, 75.10, 0.32, 39.10), (OTC, AGCH,

77

Page 78: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

321.10, 0.48, 23.40),…, (AMEX, WEB, 153.50, 0.88, 7.50).

2. Type of Data: Qualitative Data and Quantitative Data

(a) Qualitative data may be nonnumeric or numeric.(b) Quantitative data are always numeric.(c) Arithmetic operations are only meaningful with quantitative data.

Example (continue):

Qualitative variables: Exchange, Ticker Symbol.Quantitative variables: Annual Sales, Share Price, Price/Earnings Ratio.

Chapter 2: Figure 2.22, p. 66.

1. Summarizing qualitative data:

Frequency distribution, relative frequency distribution, and percent frequency distribution.

Bar plot and Pie plot. Example:

Below you are given the grades of 20 students. D C E B B B A D B CB E C B C B B D B C

Then, Grades Frequency Relative

FrequencyPercent

FrequencyE 2 2/20=0.1 10D 3 3/20=0.15 15C 5 5/20=0.25 25B 9 9/20=0.45 45A 1 1/20=0.05 5

Total 20 1 100

78

Page 79: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

2. Summarizing qualitative data:

Frequency distribution, relative frequency distribution, percent frequency distribution, cumulative frequency distribution, cumulative relative frequency distribution, cumulative percent frequency distribution

Histogram, Ogive, and stem-and leaf display.

Example:

Suppose we have the following data:30 79 59 65 40 64 52 53 5739 61 47 50 60 48 50 58 67

Suppose the number of nonoverlapping classes is determined to be 5. Please construct the frequency distribution table (including frequency, percent frequency, cumulative frequency, and cumulative percent frequency) for the data.

[solution:]

The class width is 10.Thus,

Class Frequency Percent Frequency

Cumulative Frequency

Cumulative Percent

Frequency30-39 2 (2/18)100=11 2 1140-49 3 (3/18)100=17 5 2850-59 7 (7/18)100=39 12 6760-69 5 (5/18)100=28 17 9570-79 1 (1/18)100=5 18 100

Chapter 3: Key Formulas, pp. 128-129.

79

Page 80: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Example:

Suppose we have the following data:Rent 420-439 440-459 460-479 480-499 500-519

Frequency 8 17 12 8 7Rent 520-539 540-559 560-579 580-599 600-619

Frequency 4 2 4 2 6What are the mean rent and the sample variance for the rent?

[solution:]

, where is the frequency of class i is the midpoint of

class i and n is the sample size. Then,Rent 420-439 440-459 460-479 480-499 500-519

8 17 12 8 7429.5 449.5 469.5 489.5 509.5

Rent 520-539 540-559 560-579 580-599 600-6194 2 4 2 6

529.5 549.5 569.5 589.5 609.5Thus,

and .

For the sample variance,

Chapter 4:

Tabular and Graphical Methods: Crosstabulation (qualitative and quantitative data) and Scatter Diagram (only quantitative data).

Numerical Method: Covariance and Correlation Coefficient.

80

Page 81: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Chapter 5:

1. Multiple Step Experiments, Permutations, and Combinations:

Example:

How many committees consisting of 3 female and 5 male students can be selected from a group of 5 female and 8 male students?

[solution:]

2. Event, Addition Law, Mutually Exclusive Events and Independent Event:

Example:

Assume you are taking two courses this semester (S and C). The probability that you will pass course S is 0.835, the probability that you will pass both courses is 0.276. The probability that you will pass at least one of the courses is 0.981. (a) What is the probability that you will pass course C?(b) Is the passing of the two courses independent event?(c) Are the events of passing the courses mutually exclusive? Explain.

[solution:]

(a)Let A be the event of passing course S and B be the event of passing course C. Thus,

.

.

81

Page 82: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

(b)

Thus, events A and B are not independent. That is, passing of two courses are not independent events. (c) Since , events A and B are not mutually exclusive.

Review 2 Chapter 4

Bayes’ Theorem:

Example:

In a random sample of Tung Hai University students 50% indicated they are business majors, 40% engineering majors, and 10% other majors. Of the business majors, 60% were female; whereas, 30% of engineering majors were females. Finally, 20% of the other majors were female. Given that a person is female, what is the probability that she is an engineering major?

[solution:]

Let A1: the students are engineering majorsA2: the students are business majors A3: the students are other majors.

B: the students are female.

Originally, we know

82

Page 83: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

.Then, by Bayes’ theorem,

Chapter 5

1. Random Variables, Discrete Probability Function, Expected Value and Variance

Example:

The probability distribution function for a discrete random variable X is

where k is some constant. Please find (a) k. (b) (c) and

[solution:]

(a)

.

(b)

.

(c)

83

Page 84: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

and

2. Continuous Probability Density Function, Expected Value and Variance.

Example:

The probability density function for a continuous random variable X is

where a, b are some constants. Please find

(a) a, b if (b) .

[solution:]

(a)

and

Solve for the two equations, we have

.

84

Page 85: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

(b)

Thus,

Chapter 6

1. Uniform Probability Density Function, Normal Probability Density Function, and Exponential Probability Density Function:

Example:

The number of customers arriving at Taiwan Bank is Poisson distributed with a mean, 4 customers/per minute. (a) Within 2 minutes, what is the probability that there are 3 customers?(b)What is the probability density function for the time between the

arrival of the next customer?

[solution:]

(a) LetY: the number of customers arriving within 2 minutes. Then,

and

.

Thus,

.

85

Page 86: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

(b)

X: the time between the arrival of the next customer

The average time between arrival of the next customer is

.

X has the exponential density function with mean ,

.

Review 2 Chapters 3, 4Measures of Location, Dispersion, Exploratory Data Analysis, Measure of Relative Location, Weighted and Grouped Mean and Variance, Association between Two Variables

Example:

The flashlight batteries produced by one of the manufacturers are known to have an average life of 60 hours with a standard deviation of 4 hours. (a) At least what percentage of batteries will have a life of 54 to 66 hours?(b)At least what percentage of the batteries will have a life of 52 to 68

hours?

86

Page 87: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

(c) Determine an interval for the batteries’ lives that will be true for at least 80% of the batteries.

[solution:]

Denote

(a)

Thus, by Chebyshev’s theorem, within 1.5 standard deviation, there is at least

of batteries.(b)

Thus, by Chebyshev’s theorem, within 1.5 standard deviation, there is at least

of batteries.(c)

Thus, within standard deviation, there is at least 80% of batteries. Therefore,

.

Chapter 5Basic Relationships of Probability, Conditional Probability and Bayes’ Theorem

Example:

The following are the data on the gender and marital status of 200 customers of a company.

87

Page 88: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

Male FemaleSingle 20 30

Married 100 50

(a) What is the probability of finding a single female customer?(b) What is the probability of finding a married male customer?(c) If a customer is female, what is the probability that she is single?(d) What percentage of customers is male?(e) If a customer is male, what is the probability that he is married?(f) Are gender and martial status mutually exclusive? Explain.(g) Is martial status independent of gender? Explain.

[solution:]

A1: the customers are singleA2: the customers are married B1: the customers are male.B2: the customers are female.

(a)

(b)

(c)

.

Since

,

.

88

Page 89: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

(d)

(e)

.

(f)Gender and martial status are not mutually exclusive since

(f)Gender and martial status are not independent since

.

Example:

In a recent survey in a Statistics class, it was determined that only 60% of the students attend class on Thursday. From past data it was noted that 98% of those who went to class on Thursday pass the course, while only 20% of those who did not go to class on Thursday passed the course.

(a) What percentage of students is expected to pass the course?(b)Given that a student passes the course, what is the probability that

he/she attended classes on Thursday.

[solution:]

A1: the students attend class on ThursdayA2: the students do not attend class on Thursday B1: the students pass the courseB2: the students do not pass the course

(a)

89

Page 90: Chapter 1 Data and Statistics - THUweb.thu.edu.tw/wenwei/www/Courses/statistics/Basic... · Web viewBayes’s Theorem (two events): [Derivation of Bayes’s theorem (two events)]:

(b) By Bayes’ theorem,

Chapter 6

3. Random Variables, Discrete Probability Function and Continuous Probability Density

Example:

The probability distribution function for a discrete random variable X is

where k is some constant. Please find (a) k. (b)

[solution:]

(a)

.

(b)

.

90