Download probability and statistics and more Lecture notes Information Technology in PDF only on Docsity!
AN INTRODUCTION TO PROBABILITY
AND STATISTICS
Kemal G¨ursoy Melike Baykal-G¨ursoy Ayse G¨ursoy
June 23, 2015
ii
x CONTENTS
List of Figures
List of Tables
- 1 Meaning of Statistics Preface xv
- 1.1 Introduction
- 1.2 Why We Care about Statistics
- 1.3 Descriptive Statistics
- 1.3.1 Frequency Distribution
- 1.4 Location Measures
- 1.4.1 Average
- 1.4.2 Weighted Average
- 1.4.3 Geometric Mean
- 1.4.4 Harmonic Mean
- 1.4.5 Mode
- 1.4.6 Median
- 1.4.7 Quantiles
- 1.5 Spread Measures
- 1.5.1 Range
- 1.5.2 Interquartile Range
- 1.5.3 Mean Absolute Deviation
- 1.5.4 Variance
- 1.5.5 Standard Deviation
- 1.5.6 Coefficient of Skewness
- 1.5.7 Coefficient of Variation
- 1.6 Covariance and Correlation
- 1.6.1 Covariance
- 1.6.2 Correlation
- 1.7 Index Numbers
- 1.7.1 Simple Index
- 1.7.2 Simple Aggregate Index
- 1.7.3 Aggregate Index
- 1.8 Exercises
- 2 Probability Theory iv CONTENTS
- 2.1 Introduction
- 2.2 Odds Ratio
- 2.3 Conditional Probability
- 2.4 Random Variables
- 2.4.1 Cumulative Distribution Function
- 2.5 Discrete Random Variables
- 2.5.1 Probability Mass Function
- 2.5.2 Expected Value of Discrete Random Variables
- 2.5.3 Variance of Discrete Random Variables
- 2.5.4 Moments of Discrete Random Variables
- 2.5.5 Bernoulli Random Variable
- 2.5.6 Binomial Random Variable
- 2.5.7 Geometric Random Variable
- 2.5.8 Negative Binomial Random Variable
- 2.5.9 Multinomial Random Variable
- 2.5.10 Poisson Random Variable
- 2.6 Continuous Random Variables
- 2.6.1 Probability Density Function
- 2.6.2 Expected Value of Continuous Random Variables
- 2.6.3 Variance of a Continuous Random Variable
- 2.6.4 Moments of a Continuous Random Variable
- 2.6.5 Uniform Random Variable
- 2.6.6 Exponential Random Variable
- 2.6.7 Gaussian Random Variable
- 2.6.8 Standard Normal Random Variable
- 2.6.9 Gamma Random Variable
- 2.6.10 Chi-Square Random Variable
- 2.6.11 Beta Random Variable
- 2.6.12 Laplace Random Variable
- 2.6.13 Cauchy Random Variable
- 2.6.14 Weibull Random Variable
- 2.6.15 Student’s t-Distribution
- 2.6.16 F Distribution
- 2.7 Some Properties of Expectation
- 2.7.1 Minimizers of Certain Expectations
- 2.8 Some Approximations
- 2.8.1 Poisson Approximation to Binomial
- 2.8.2 Normal Approximation to Binomial
- 2.9 Exercises
- 3 Functions of Random Variables CONTENTS v
- 3.1 Univariate Functions
- 3.2 Bivariate Functions
- 3.3 Multivariate Functions
- 3.4 Some Well-Known Functional Forms
- 3.5 Covariance and Correlation
- 3.6 Mean and Variance of a Finite Sum
- 3.7 Bivariate Normal
- 3.8 Multivariate Normal
- 3.9 Moment Generating Function
- 3.10 Conditioning
- 3.11 Minimum Mean Squared Error
- 3.12 Convergence
- 3.12.1 Convergence in Probability
- 3.12.2 Convergence with Probability One
- 3.12.3 Convergence in Distribution
- 3.13 Law of Large Numbers
- 3.14 Central Limit Theorem
- 3.15 Exercises
- 4 Sampling and Its Distributions
- 4.1 Sampling
- 4.2 Random Sampling
- 4.3 Asymptotic Behavior of a Sample
- 4.4 Student’s t-Distribution
- 4.5 Asymptotic Multivariate Sample
- 4.6 Central Limit Theorem Revisited
- Sequence 4.7 Linear Transformation of a Random
- 4.8 Continuous Transformation of a Random Sequence
- 4.9 Exercises
- 5 Parameter Estimation
- 5.1 Introduction
- 5.2 Sufficient Statistic
- 5.3 Likelihood Function
- 5.4 Fisher’s Information Index
- 5.5 Minimum Variance Unbiased Estimator
- 5.5.1 Cramer-Rao Lower Bound
- 5.6 Efficient Estimator
- 5.7 Method of Moments
- 5.8 Maximum Likelihood Method vi CONTENTS
- 5.9 Invariance
- 5.10 Interval Estimators
- 5.10.1 Confidence Interval for the Mean
- 5.10.2 Confidence Interval for the Difference of Means
- Success 5.10.3 Confidence Interval for the Proportion of
- Proportions 5.10.4 Confidence Interval for the Difference of
- 5.10.5 Confidence Interval for the Variance
- 5.11 Stochastic Simulation
- 5.11.1 Monte-Carlo Simulation
- 5.12 Exercises
- 6 Hypothesis Testing
- 6.1 Classical Hypothesis Testing
- 6.1.1 Hypothesis Testing for Mean
- 6.1.2 Hypothesis Testing for Mean Under Normality
- 6.1.3 Large Sample Hypothesis Test for Mean
- 6.2 p-Value of a Hypothesis Test
- Populations 6.3 Comparing Means of Two Normal
- 6.3.1 Independent Populations
- 6.3.2 Dependent Populations
- 6.4 Goodness of Fit Test
- 6.4.1 Chi-Square Test
- 6.4.2 Contingency Tables
- 6.4.3 Kolmogorov-Simirnov Test
- 6.5 Power of a Test
- 6.5.1 Neyman-Pearson Lemma
- 6.6 Likelihood Ratio Test
- 6.6.1 Asymptotic Likelihood Ratio
- 6.7 Exercises
- 7 Nonparametric Statistics
- 7.1 Introduction
- 7.1.1 Quantile as a Parameter
- 7.2 Sign Test
- 7.3 Wilcoxon Test
- 7.3.1 Mann-Whitney-Wilcoxon Test
- 7.4 Kruskal-Wallis Test
- 7.5 Friedman Test CONTENTS vii
- 7.6 Exercises
- 8 Bayesian Statistics
- 8.1 Bayesian Estimation
- 8.1.1 Bayesian Decision Function
- 8.1.2 Bayesian Interval Estimator
- 8.2 Bayesian Hypothesis Testing
- 8.3 Mixture Priors
- 8.4 Sequential Bayesian Statistics
- 8.5 Exercises
- 9 Information Theory
- 9.1 Meaning of Information
- 9.2 Probabilistic Construction of Information
- 9.3 Properties
- 9.4 Exercises
- 10 Linear Regression Model
- 10.1 Introduction
- 10.2 Linear Regression Model
- 10.3 Inferences about Linear Regression Model
- 10.3.1 Predicting a Response
- 10.3.2 Slope and Correlation
- 10.4 Multilinear Regression Model
- 10.4.1 Confidence Interval for the Average Response
- 10.4.2 Prediction Interval for an Individual Response
- 10.4.3 Validity Test for the Reduced Multilinear Model
- 10.4.4 Testing for the Multilinear Model Validity
- 10.4.5 Testing for the Necessity of an Input Variable
- 10.5 Linearized Regression Models
- 10.5.1 Exponential Regression Model
- 10.5.2 Logarithmic Regression Model
- 10.5.3 Logistic Regression Model
- tribution 10.5.4 Estimating the Success Probability for a Bernoulli Dis-
- 10.6 Exercises
- 11 Analysis of Variance viii CONTENTS
- 11.1 Introduction
- 11.2 Analysis of Variance Method
- 11.3 Completely Random Experiment Design Model
- 11.3.1 Comparing Means
- 11.3.2 Estimating Treatment Mean
- 11.4 Randomized Block Experiment Design Model
- 11.4.1 ANOVA for Randomized Block Design
- 11.4.2 Comparing Means of Treatments and Blocks
- 11.4.3 Estimating Means of Treatments and Blocks
- 11.4.4 Two-Way ANOVA with Replications
- 11.5 Simultaneous Confidence Intervals
- 11.6 Exercises
- 12 Experiment Design
- 12.1 Introduction
- 12.2 Properties of Experiment Design
- 12.2.1 Blocked Experiment Design
- 12.3 Analysis of Covariance
- 12.4 Response Surface Design
- 12.5 Exercises
- Appendix A Preliminaries
- A.1 Introduction
- A.2 Numbers
- A.3 Sets
- A.3.1 Counting Methods
- A.3.2 Set Operations
- A.4 Complex Numbers
- A.4.1 Fundamental Theorem of Algebra
- A.4.2 Euler Formula
- A.5 Quarternion
- A.6 Functions
- A.7 Limits
- A.8 Derivative
- A.8.1 Mean Value Theorem for Derivative
- A.8.2 L’Hospital Rule
- A.8.3 Some Properties of the Differentiation Operator
- A.8.4 Chain Rule
- A.9 Integral CONTENTS ix
- A.9.1 Some Properties of the Integral Operator
- A.9.2 Mean Value Theorem for Integral
- A.10 Inverse Function
- A.11 Multivariate Functions
- A.11.1 Partial Derivatives
- A.12 Complex Functions
- A.13 Linear Algebra
- A.14 Exercises
- Appendix B Tables for Commonly Used cdfs
- B.1 Standard Normal Distribution.
- B.2 Student’s t-Distribution.
- B.3 χ^2 Distribution.
- B.4 F-Distribution.
- B.5 Standardized Range Distribution
- Bibliography
- Index
- 1.1 Histogram
- 1.2 Frequency Polygon
- 1.3 Pie Chart
- 1.4 Ogive
- 1.5 Box Plot
- 2.1 Standard Uniform pdf
- 2.2 Standard Normal pdf
- 3.1 Bivariate Normal pdf
- 5.1 Confidence Level on Standard Normal pdf
- 5.2 Confidence Level on Chi-Square pdf
- 5.3 Buffon’s Needle
- 10.1 Best Fitted Line
- 10.2 Plot of the Raw Data
- 1.1 Frequency Distribution
- 1.2 Relative Frequency Distribution
- 1.3 Contingency Table
- 1.4 Relative Frequency Table
- 1.5 Simple Index
- 1.6 Simple Aggregate Index
- 2.1 Fair Coin Toss Probability Distribution
- 2.2 Fair Coin Toss Probability Distribution Revisited
- 2.3 Coin Toss Probability Distribution
- 2.4 Probability Mass Function
- 2.5 Probability Distribution of a Bernoulli Trial
- 2.6 pmf of a Bernoulli Trial
- 6.1 Decision Table
- 6.2 Contingency Table
- 6.3 Contingency Table for Exercise
- 10.1 Bivariate Data Preparation
- 10.2 Data for Exercise
- 11.1 ANOVA Table for Completely Randomized Experiments
- 11.2 ANOVA Table for Example 11.1
- 11.3 ANOVA Table for Randomized Block Experiments
- 11.4 ANOVA Table for Example 11.2
- 11.5 Two-Way ANOVA Table with Replications
- 11.6 Data Table for Example 11.3
- 11.7 Pairwise Sample Mean Differences for Example 11.3
- 12.1 Latin Square Design
- 12.2 Data Table for Example 12.3
- 12.3 ANOVA Table for Example 12.3
xiv LIST OF TABLES
xvi PREFACE
Chapter 1
Meaning of Statistics
“Where all the children are above average...” - Garrison Keillor.
1.1 Introduction
Once upon a time, governments collected facts and kept records about their populations, such as number of births and deaths in a day, age and gen- der of the people, marriages, business transactions, etc., in order to utilize these facts to make proper decisions, so that they collect taxes from their population, or, could raise armies to go to war with their adversaries. The knowledge of collecting, organizing, processing and analyzing facts, in order to acquire useful information to make proper decisions, is known as statistics. It is obvious that all humans need to know statistics to carry out their daily activities by making reliable decisions based on facts. In this day and age, the advent of technology makes it possible to collect immense amount of data continuously and process them to make almost instantaneous decisions. You may see many examples of these data collection technologies in our daily lives, such as Google Search trends or crowd-sourced traffic incident reports.
1.2 Why We Care about Statistics
This field of statistics can be separated into three major areas. The first one is called the descriptive statistics, the second one is called the inferential statistics, and the third one is called the experiment design. Descriptive statistics refers to the body of knowledge for organizing and
1
1.3. DESCRIPTIVE STATISTICS 3
Historically, model builders have been using Occam’s razor, which dictates that model building must be done with a very sharp instrument that cuts out all the unnecessary complexities and vaguenesses, in order to provide the simplest useful model. Evidence based scientific models heavily use causality (cause and effect relationship), yet causal relationships are only embedded in the field of study of statistics, which seeks out probabilistic associations, based on the evidence. Thus, the person who utilizes statistics is the one with the responsibility to identify causality in the statistical model, otherwise one can easily make false statements, based on available evidence. In this day and age, the technology is contributing very much to increase the efficiency of processing large data sets, such that computers are becoming much more economical to use and also effective to handle immense amount of data processing. Computer software is instrumental to do data processing and statistical analysis. Among many others, Excel, SPSS, S-Plus, R and SAS are com- monly available for statistical analysis. Some of these software packages are also used for data mining by practitioners. Data mining refers to auto- matically extracting patterns of interest from data-bases. Excel is a widely available spreadsheet software, even though it is not a dedicated statistical software such as SAS. Practitioners are encouraged to learn and use statistical softwares, such as R, which is conveniently available as a freeware from the following website: http://www.r-project.org, and learn the similarities, as well as the differ- ences, among them.
1.3 Descriptive Statistics
It is a common desire to understand the environment, based on observations. Statistics provides instruments to carry out this process of understanding, in order to facilitate probabilistic decision making. The collection of entities that we are trying to understand is called a population. Sometimes we are able to observe the whole population, some- times it is impossible to do so. If we cannot observe the whole population, then we utilize a sample, coming from this population, as a representative of the unknown population characteristics. Thus, we observe the sample, ac- quire information about the sample characteristics, and project this sample information to the unknown population characteristics that we are trying to understand, with some degree of acceptable risk of making the wrong judge- ment. The desire to observe, collect, and process data benefits from effective
4 CHAPTER 1. MEANING OF STATISTICS
and efficient procedures. The descriptive statistics provides means to pro- cess, organize and represent the data, so that the processed data can provide information in a simple to understand form. We want to describe the data set by utilizing statistical measures (nu- merical values), in order to extract the necessary information for our decision making.
1.3.1 Frequency Distribution
The processing of the raw data set begins with organizing data into clusters or groups of similar observations, known as classes or categories, such that this sorting and arranging the values of the data set leads to a clearer picture of the observations. One common way of placing data in classes (categories) is to order the numerical values in a data set from its smallest value (minimum) to its largest value (maximum) and then break this range of values in the data set into mutually exclusive (disjoint), yet collectively exhaustive intervals of the values. That is, each and every one of these classes will capture some proportion of the ordered data values with no common (shared) observation, and collectively these classes will capture all possible values in the data set. If the data set consist of nonnumerical observations, then we can assign cardinal numbers (identifiers) to different characteristics. For example the sex of a group of individuals can be categorized by male and female and we can assign the number 1 to male and the number 2 to female category, or we may as well assign the number 2 to male and the number 1 to female category, with no order among these numbers (or, any two distinct numbers can be assigned to identify these two distinguishable characteristics). But, even with cardinal numbers, it is convenient to preserve the natural order among numbers. Here, we introduce class boundaries by assigning a lower limit and an upper limit for the values in each class, and call the distance between the upper limit and the lower limit of a class as the class range, or class interval. Usually the midpoint in a class interval is called as the class mark. After we allocate all the values in a data set in these classes, we count the number of values in each one of these classes, and we call it the class frequency (the number of observations in each class). The frequency distribution is a relationship between the values in each and every one of these classes with their class frequencies, it is a function such that the class boundaries are its domain and the class frequencies are its range. A mid-point value of a class is known as the class mark. We can identify a frequency distribution function by its graphical representation, also known as a histogram. A histogram is a bar-graph of frequencies, that identifies a frequency distribution as the hight of a bar representing the frequency of a