1 Introduction to Biostatistics (PUBHLTH 540) Multiple Random Variables
2 Multiple Random Variables Linear Combinations of Random Variables Linear Combinations of Random Variables –Expected Value –Variance Stochastic Models Stochastic Models Covariance of two Random Variables Covariance of two Random Variables Independence Independence Correlation Correlation
3 SPH&HS, UMASS Amherst 3 An Example Choose a Simple Random Sample with Replacement of size n=2 from a Population of N=3 Choose a Simple Random Sample with Replacement of size n=2 from a Population of N=3 Observe: Observe: –1 Response (i.e. Age) on each Subject in the Sample Question: Question: –What is the average age of subjects in the population? Use the sample mean to estimate the Population Average Age Use the sample mean to estimate the Population Average Age DaisyLilyRose Introducing….
4 SPH&HS, UMASS Amherst 4 Population
5 Population of N=3 Note: Population mean Variance. ID (s) Subject Response (Age) 1Daisy25 2Lily32 3Rose33
6 Pick SRS with Replacement of n=2 a random variable representing the 1 st selection ID (s) SubjectResponse 1Daisy25 2Lily32 3Rose33 i=1,…,n=2 a random variable representing the 2nd selection
7 Use as an Estimator: Sample Mean A Linear Estimator- a sum of random variables When n=2,
8 Linear Combination of Random Variables Example: Sample Mean
9 Models for Response Models for Response 3 (=N) 2 1 ID (s) Lily Rose DaisyResponseSubject Non-Stochastic model (Deterministic) Stochastic model
10 SPH&HS, UMASS Amherst 10 Finite Population Pick a SRS with replacement of size n=2 Stochastic model
11 SPH&HS, UMASS Amherst 11 Finite Population with replacement Stochastic model
12 SPH&HS, UMASS Amherst 12 Finite Population with replacement Stochastic model
13 SPH&HS, UMASS Amherst 13 Sampling- n=2 with replacement Random Variables Linear Combination of Random Variables Stochastic model
14 SPH&HS, UMASS Amherst 14 Sampling- n=2 with replacement Realized Values
15 SPH&HS, UMASS Amherst 15 Other Possible Samples with replacement
16 SPH&HS, UMASS Amherst 16 Other Possible Samples with replacement
17 Sample (t)Probability 11/925 21/ / / /932 61/ / /93332 All Possible Samples
18 Sample (t)Probability 11/ / / / / / / / / Expected Values
19 Sample (t)Probability 11/ / / / / / / / /
20 Sample (t)Probability 11/ / / / / / / / /
21 Covariance of Two Random Variables
22 Sample (t)Probability 11/ / / / / / / / / Based on simple random sampling with replacement
23 Variance Matrix When n=2, and SRS with replacement: When n=2, and SRS with replacement: Identity Matrix
24 Variance Matrix for n Random Variables
25 Covariance of Random Variables When SRS without Replacment (n=2) Sample (t)Probability 11/ / / / / /
26 Covariance of two random variables when sampling without replacement
27 Estimating the Covariance Estimate the variance: assuming srs assuming srs Estimate the covariance: assuming srs assuming srs
28 Independence Two random variables, Y and Z are independent if Two random variables, Y and Z are independent if P(Y=y|Z=z)=P(Y=y) P(Y=y|Z=z)=P(Y=y) P(Y=y|Z=z) means the probability that Y has a value of y, given Z has a value of z (see Text, sections 6.1 and 6.2)
29 Example: SRS with rep n=2 Areandindependent? Does? ID (s) SubjectResponse1Daisy25 2Lily32 3Rose33
30 SPH&HS, UMASS Amherst 30 Sampling n=2 (with rep) Areandindependent? Yes
31 SPH&HS, UMASS Amherst 31 Sampling n=2 (with rep) Areandindependent? Yes
32 SPH&HS, UMASS Amherst 32 Sampling n=2 (with rep) Areandindependent? Yes
33 Example: SRS without rep n=2 Areandindependent? Does? ID (s) SubjectResponse1Daisy25 2Lily32 3Rose33
34 SPH&HS, UMASS Amherst 34 Sampling n=2 (without replacement) Areandindependent? No
35 SPH&HS, UMASS Amherst 35 Areandindependent? No Sampling n=2 (without replacement)
36 SPH&HS, UMASS Amherst 36 Sampling n=2 (without replacement) Areandindependent? No
37 Relationship between Independence and Covariance If two random variables are independent, then their covariance is 0. If two random variables are independent, then their covariance is 0. If the covariance of two random variables is zero, the two may (or may not) be independent If the covariance of two random variables is zero, the two may (or may not) be independent
38 Expected Value of a Linear Combination of Random Variables Write linear combinations using vector notation. Write linear combinations using vector notation. Constants Random variables
39 where Example: SRS of size n:
40 Example 2: Suppose two independent SRS w/o replacement are selected from populations of boy and girl babies, and the weight recorded. Let us represent the boy weight by Y and the girl weight by X. Suppose sample results are given as follows: Boysn=25Girlsn=40 Sample Mean Variance An estimate is wanted of the average birth weight in Europe, where for every 1000 births, 485 are girls, while 515 are boys. Write a linear combination that can be used to construct an estimator.
41 Variance of a Linear Combination of Random Variables ConstantsRandom variables Example: Sample mean, n=2 srs with replacement
42 Matrix Multiplication Hence
43 Practice: Variance of a Linear Combination of Random Variables Constants Random variables Example: Sample mean, n=2 srs withOUT replacement from a population of N
44 Correlation (see 17.1, 17.2 in text) The correlation between two random variables is defined as The correlation between two random variables is defined as Based on a simple random sample, we estimate the correlation by Based on a simple random sample, we estimate the correlation by