# Multiple random variables

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Multiple random variables Multiple random variables We essentially always consider multiple random variables at once. The key concepts: Joint, conditional and marginal distributions, and independence of RVs. Let X and Y be discrete random variables. Joint distribution: p XY (x,y) = Pr(X = x and Y = y) Marginal distributions: p X (x) = Pr(X = x) = y p XY(x,y) p Y (y) = Pr(Y = y) = x p XY(x,y) Conditional distributions: p X Y=y (x) = Pr(X =x Y = y) = p XY (x,y) / p Y (y)

2 Example Sample a couple who are both carriers of some disease gene. X = number of children they have Y = number of affected children they have p XY (x,y) p Y (y) x y p X (x) Pr( Y = y X = 2 ) x p XY (x,y) p Y (y) y p X (x) y Pr( Y=y X=2 )

3 Pr( X = x Y = 1 ) x p XY (x,y) p Y (y) y p X (x) x Pr( X=x Y=1 ) Independence Random variables X and Y are independent if p XY (x,y) = p X (x) p Y (y) for every pair x,y. In other words/symbols: Pr(X = x and Y = y) = Pr(X = x) Pr(Y = y) for every pair x,y. Equivalently, Pr(X =x Y = y) = Pr(X = x) for all x,y.

4 Example Sample a subject from some high-risk population. X = 1 if the subject is infected with virus A, and = 0 otherwise Y = 1 if the subject is infected with virus B, and = 0 otherwise x p XY (x,y) 0 1 p Y (y) y p X (x) Continuous random variables Continuous random variables have joint densities, f XY (x,y). The marginal densities are obtained by integration: f X (x) = f XY (x, y) dy and f Y (y) = f XY (x, y) dx Conditional density: f X Y=y (x) =f XY (x, y)/f Y (y) X and Y are independent if: f XY (x,y) = f X (x) f Y (y) for all x,y.

5 z y The bivariate normal distribution x The bivariate normal distribution y!3!2! !3!2! x

6 IID More jargon: Random variables X 1, X 2, X 3,..., X n are said to be independent and identically distributed (iid) if they are independent, they all have the same distribution. Usually such RVs are generated by repeated independent measurements, or random sampling from a large population. Means and SDs Mean and SD of sums of random variables: E( i X i )= i E(X i ) no matter what SD( i X i )= i {SD(X i)} 2 if the X i are independent Mean and SD of means of random variables: E( i X i / n) = i E(X i )/n no matter what SD( i X i /n) = i {SD(X i)} 2 /n if the X i are independent If the X i are iid with mean µ and SD σ: E( i X i / n) =µ and SD( i X i / n) =σ/ n

7 Example Independent SD(X + Y) = 1.4 y x x+y Positively correlated SD(X + Y) = 1.9 y x x+y Negatively correlated SD(X + Y) = 0.4 y x x+y Sampling distributions

8 Populations and samples We are interested in the distribution of measurements in an underlying (possibly hypothetical) population. Examples: Infinite number of mice from strain A; cytokine response to treatment. All T cells in a person; respond or not to an antigen. All possible samples from the Baltimore water supply; concentration of cryptospiridium. All possible samples of a particular type of cancer tissue; expression of a certain gene. We can t see the entire population (whether it is real or hypothetical), but we can see a random sample of the population (perhaps a set of independent, replicated measurements). Parameters We are interested in the population distribution or, in particular, certain numerical attributes of the population distribution, called parameters. Examples: Population distribution mean median SD proportion = 1 proportion > 40! geometric mean µ 95th percentile Parameters are usually assigned greek letters (like θ, µ, and σ).

9 Sample data We make n independent measurements (or draw a random sample of size n ). This gives X 1, X 2,..., X n independent and identically distributed (iid), following the population distribution. Statistic: A numerical summary (function) of the X s. For example, the sample mean, sample SD, etc. Estimator: A statistic, viewed as estimating some population parameter. We write: X =ˆµ as an estimator of µ, S =ˆσ as an estimator of σ, ˆp as an estimator of p, ˆθ as an estimator of θ,... Parameters, estimators, estimates µ The population mean A parameter A fixed quantity Unknown, but what we want to know X x The sample mean An estimator of µ A function of the data (the X s) A random quantity The observed sample mean An estimate of µ A particular realization of the estimator, X A fixed quantity, but the result of a random process.

10 Estimators are random variables Estimators have distributions, means, SDs, etc. Population distribution X 1, X 2,..., X 10 X µ! Sampling distribution Population distribution Distribution of X n = ! n = 10 µ n = 25 The sampling distribution depends on: The type of statistic The population distribution n = 100 The sample size

11 Bias, SE, RMSE Population distribution Dist n of sample SD (n=10)! µ Consider ˆθ, an estimator of the parameter θ. Bias: E(ˆθ θ) =E(ˆθ) θ. Standard error (SE): RMS error (RMSE): SE(ˆθ) =SD(ˆθ). E{(ˆθ θ) 2 } = (bias) 2 +(SE) 2. The sample mean Population distribution Assume X 1, X 2,..., X n are iid with mean µ and SD σ. µ! Mean of X = E(X) =µ Bias = E(X) µ = 0. SE of X = SD(X )=σ/ n. RMS error of X: (bias)2 +(SE) 2 = σ/ n.

12 If the population is normally distributed Population distribution If X 1, X 2,..., X n are iid Normal(µ,σ), then X Normal(µ, σ/ n). µ! Distribution of X! n µ Example Suppose X 1, X 2,..., X 10 are iid Normal(mean=10,SD=4) Then X Normal(mean=10, SD 1.26). Let Z =(X 10)/1.26. Pr(X > 12)? % 10 12! Pr(9.5 < X < 10.5)? 31% ! Pr( X 10 > 1)? 43% !

13 Central limit theorm If X 1, X 2,..., X n are iid with mean µ and SD σ, and the sample size (n) is large, then X is approximately Normal(µ, σ/ n). How large is large? It depends on the population distribution. (But, generally, not too large.) Example 1 Population distribution Distribution of X n = ! n = 10 µ n = n =

14 Example 2 Population distribution Distribution of X n = n = 25! 0 µ n = n = Example 2 (rescaled) Population distribution Distribution of X n = n = 25! 0 µ n = n =

15 Example 3 Population distribution Distribution of X n = n = {X i } iid Pr(X i = 0) = 90% Pr(X i = 1) = 10% E(X i ) = 0.1; SD(X i ) = n = n = 500 X i Binomial(n, p) X = proportion of 1 s The sample SD Why use (n 1) in the sample SD? (Xi X) 2 S = n 1 If {X i } are iid with mean µ and SD σ, then E(S 2 )=σ 2 E{ n 1 n S 2 } = n 1 n σ 2 < σ 2 In other words: Bias(S 2 ) = 0 Bias ( n 1 n S 2 )= n 1 n σ 2 σ 2 = 1 n σ2

16 The distribution of the sample SD If X 1, X 2,..., X n are iid Normal(µ, σ), then the sample SD S satisfies (n 1) S 2 /σ 2 χ 2 n 1 (When the X i are not normally distributed, this is not true.) " 2 distributions df=9 df=19 df= Example Distribution of sample SD (based on normal data) n=25 n=10 n=5 n=3!

17 A non-normal example Population distribution Distribution of sample SD n = µ! n = n = n = Inference about one group

18 Review If X 1,..., X n have mean µ and SD σ, then E(X) = µ SD(X) =σ/ n no matter what if the X s are independent If X 1,..., X n are iid Normal(mean=µ, SD=σ), then X Normal(mean = µ, SD = σ/ n). If X 1,..., X n are iid with mean µ and SD σ and the sample size n is large, then X Normal(mean = µ, SD = σ/ n). Confidence intervals Suppose we measure some response in 100 male subjects, and find that the sample average ( x) is 3.52 and sample SD (s) is Our estimate of the SE of the sample mean is 1.61/ 100 = A 95% confidence interval for the population mean (µ) is roughly 3.52 ± (2 0.16) = 3.52 ± 0.32 = (3.20, 3.84). What does this mean?

19 Confidence intervals Suppose that X 1,..., X n are iid Normal(mean=µ, SD=σ). Suppose that we actually know σ. Then X Normal(mean=µ, SD=σ/ n) How close is X to µ? ( ) X µ Pr σ/ n 1.96 = 95% σ is known but µ is not!! n µ ( 1.96 σ Pr n ( Pr X 1.96 σ n X µ 1.96 σ n ) = 95% µ X σ n ) = 95% What is a confidence interval? A 95% confidence interval is an interval calculated from the data that in advance has a 95% chance of covering the population parameter. In advance, X ± 1.96σ/ n has a 95% chance of covering µ. Thus, it is called a 95% confidence interval for µ. Note that, after the data is gathered (for instance, n=100, x = 3.52, σ = 1.61), the interval becomes fixed: x ± 1.96σ/ n = 3.52 ± We can t say that there s a 95% chance that µ is in the interval 3.52 ± It either is or it isn t; we just don t know.

20 What is a confidence interval? 500 confidence intervals for µ (! known) Longer and shorter intervals If we use 1.64 in place of 1.96, we get shorter intervals with lower confidence. ( ) X µ Since Pr σ/ n 1.64 = 90%, X ± 1.64σ/ n is a 90% confidence interval for µ. If we use 2.58 in place of 1.96, we get longer intervals with higher confidence. ( ) X µ Since Pr σ/ n 2.58 = 99%, X ± 2.58σ/ n is a 99% confidence interval for µ.

21 What is a confidence interval? (cont) A 95% confidence interval is obtained from a procedure for producing an interval, based on data, that 95% of the time will produce an interval covering the population parameter. In advance, there s a 95% chance that the interval will cover the population parameter. After the data has been collected, the confidence interval either contains the parameter or it doesn t. Thus we talk about confidence rather than probability. But we don t know the SD Use of X ± 1.96 σ/ n as a 95% confidence interval for µ requires knowledge of σ. That the above is a 95% confidence interval for µ is a result of the following: X µ σ/ n Normal(0,1) What if we don t know σ? We plug in the sample SD S, but then we need to widen the intervals to account for the uncertainty in S.

22 What is a confidence interval? (cont) 500 BAD confidence intervals for µ (! unknown) What is a confidence interval? (cont) 500 confidence intervals for µ (! unknown)

23 The Student t distribution If X 1, X 2,...X n are iid Normal(mean=µ, SD=σ), then X µ S/ n t(df = n 1) Discovered by William Gossett ( Student ) who worked for Guinness. In R, use the functions pt(), qt(), and dt(). df=2 df=4 df=14 normal qt(0.975,9) returns 2.26 (compare to 1.96) pt(1.96,9)-pt(-1.96,9) returns (compare to 0.95)!4! The t interval If X 1,..., X n are iid Normal(mean=µ, SD=σ), then X ± t(α/2, n 1) S/ n is a 1 α confidence interval for µ. t(α/2, n 1) is the 1 α/2 quantile of the t distribution with n 1 degrees of freedom. # 2!4! t(# 2, n \$ 1) In R: qt(0.975,9) for the case n=10, α=5%.

24 Example 1 Suppose we have measured some response in 10 male subjects, and obtained the following numbers: Data x = 3.68 s = 2.24 n = 10 qt(0.975,9) = % confidence interval for µ (the population mean): 3.68 ± / ± 1.60 = (2.1, 5.3) 95% CI s Example 2 Suppose we have measured (by RT-PCR) the log 10 expression of a gene in 3 tissue samples, and obtained the following numbers: Data x = 5.09 s = 3.47 n=3 qt(0.975,2) = % confidence interval for µ (the population mean): 5.09 ± / ± 8.62 = ( 3.5, 13.7) 95% CI s

25 Example 3 Suppose we have weighed the mass of tumor in 20 mice, and obtained the following numbers Data x = 30.7 s = 6.06 n = 20 qt(0.975,19) = % confidence interval for µ (the population mean): 30.7 ± / ± 2.84 = (27.9, 33.5) 95% CI s Confidence interval for the mean Population distribution Z = (X \$ µ) (! n)! µ Distribution of X 0 z # 2 t = (X \$ µ) (S n)! n µ 0 t # 2 X 1, X 2,..., X n independent Normal(µ, σ). 95% confidence interval for µ: X ± t S/ n where t = 97.5 percentile of t distribution with (n 1) d.f.

26 Confidence interval for the population SD Suppose we observe X 1, X 2,..., X n iid Normal(µ, σ). Suppose we wish to create a 95% CI for the population SD, σ. Our estimate of σ is the sample SD, S. The sampling distribution of S is such that (n 1)S 2 χ 2 (df = n 1) σ 2 df = 4 df = 9 df = Confidence interval for the population SD Choose L and U such that ) Pr (L (n 1)S2 U = 95%. σ 2 Pr ( 1 U ( Pr (n 1)S 2 U ( n 1 Pr S U ) σ2 1 (n 1)S 2 L = 95%. ) σ 2 (n 1)S2 L = 95%. σ S ) n 1 L = 95%. 0 L U ( n 1 S U, S ) n 1 L is a 95% CI for σ.

27 Example Population A: n = 10; sample SD: s A = % CI for σ A : 9 ( , 7.64 L=qchisq(0.025,9) = 2.70 U=qchisq(0.975,9) = ) = ( , ) = (5.3, 14.0) Population B: n = 16; sample SD: s B = % CI for σ B : 15 ( , 18.1 L=qchisq(0.025,15) = 6.25 U=qchisq(0.975,15) = ) = ( , ) = (13.4, 28.1) Tests of hypotheses Confidence interval: Test of hypothesis: Form an interval (on the basis of data) of plausible values for a population parameter. Answer a yes or no question regarding a population parameter. Examples: Do the two strains have the same average response? Is the concentration of substance X in the water supply above the safe limit? Does the treatment have an effect?

28 Example We have a quantitative assay for the concentration of antibodies against a certain virus in blood from a mouse. We apply our assay to a set of ten mice before and after the injection of a vaccine. (This is called a paired experiment.) Let X i denote the differences between the measurements ( after minus before ) for mouse i. We imagine that the X i are independent and identically distributed Normal(µ, σ). Does the vaccine have an effect? In other words: Is µ 0? The data after after! before ! before

29 Hypothesis testing We consider two hypotheses: Null hypothesis, H 0 : µ = 0 Alternative hypothesis, H a : µ 0 Type I error: Reject H 0 when it is true (false positive) Type II error: Fail to reject H 0 when it is false (false negative) We set things up so that a Type I error is a worse error (and so that we are seeking to prove the alternative hypothesis). We want to control the rate (the significance level, α) of such errors. Test statistic: T =(X 0)/(S/ 10) We reject H 0 if T > t, where t is chosen so that Pr(Reject H 0 H 0 is true) = Pr( T > t µ = 0) = α. (generally α = 5%) Example (continued) Under H 0 (i.e., when µ = 0), t(df=9) distribution T=(X 0)/(S/ 10) t(df = 9) We reject H 0 if T > % 2.5%! As a result, if H 0 is true, there s a 5% chance that you ll reject it! For the observed data: x = 1.93, s = 2.24, n = 10 T = (1.93-0) / (2.24/ 10) = 2.72 Thus we reject H 0.

30 The goal We seek to prove the alternative hypothesis. We are happy if we reject H 0. In the case that we reject H 0, we might say: Either H 0 is false, or a rare event occurred. Another example Question: is the concentration of substance X in the water supply above the safe level? X 1, X 2,..., X 4 iid Normal(µ, σ). We want to test H 0 : µ 6 (unsafe) versus H a : µ<6 (safe). Test statistic: T = X 6 S/ 4 If we wish to have the significance level α = 5%, the rejection region is T < t = % t(df=3) distribution!2.35

31 One-tailed vs two-tailed tests If you are trying to prove that a treatment improves things, you want a one-tailed (or one-sided) test. You ll reject H 0 only if T < t. 5% t(df=3) distribution!2.35 If you are just looking for a difference, use a two-tailed (or two-sided) test. t(df=3) distribution You ll reject H 0 if T < t or T > t. 2.5%! % 3.18 P-values P-value: the smallest significance level (α) for which you would fail to reject H 0 with the observed data. the probability, if H 0 was true, of receiving data as extreme as what was observed. X 1,..., X 10 iid Normal(µ, σ), H 0 : µ = 0; H a : µ 0. x = 1.93; s = 2.24 t(df=9) distribution T obs = / 10 = 2.72 P-value = Pr( T > T obs ) = 2.4%. 2*pt(-2.72,9) 1.2% \$ T obs 1.2% T obs

32 Another example X 1,..., X 4 Normal(µ, σ) H 0 : µ 6; H a : µ<6. x = 5.51; s = 0.43 T obs = / 4 = 2.28 P-value = Pr(T < T obs µ = 6) = 5.4%. pt(-2.28, 3) 5.4% t(df=3) distribution T obs The P-value is a measure of evidence against the null hypothesis. loosely speaking Recall: We want to prove the alternative hypothesis (i.e., reject H 0, receive a small P-value) Hypothesis tests and confidence intervals The 95% confidence interval for µ is the set of values, µ 0, such that the null hypothesis H 0 : µ = µ 0 would not be rejected by a two-sided test with α = 5%. The 95% CI for µ is the set of plausible values of µ. If a value of µ is plausible, then as a null hypothesis, it would not be rejected. For example: assumed to be iid Normal(µ,σ) x = 9.98; s = 0.082; n = 6; qt(0.975,5) = 2.57 The 95% CI for µ is 9.98 ± / 6 = 9.98 ± = (9.89,10.06)

33 Power The power of a test = Pr(reject H 0 H 0 is false). Null dist n Alt dist n Area = power \$ C µ 0 µ a C The power depends on: The null hypothesis and test statistic The sample size The true value of µ The true value of σ Why fail to reject? If the data are insufficient to reject H 0, we say, The data are insufficient to reject H 0. We shouldn t say, We have proven H 0. We may only have low power to detect anything but extreme differences. We control the rate of type I errors ( false positives ) at 5% (or whatever), but we may have little or no control over the rate of type II errors.

34 The effect of sample size Let X 1,..., X n be iid Normal(µ, σ). We wish to test H 0 : µ = µ 0 vs H a : µ µ 0. Imagine µ = µ a. n=4 Null dist n Alt dist n \$ C µ 0 µ a C n = 16 Null dist n Alt dist n \$ C µ 0 C µ a Test for a proportion Suppose X Binomial(n, p). Test H 0 : p = 1 2 vs H a : p 1 2. Reject H 0 if X H or X L. Choose H and L such that Pr(X H p= 1 2 ) α/2 and Pr(X L p=1 2 ) α/2. Thus Pr(Reject H 0 H 0 is true) α. The difficulty: The Binomial distribution is hard to work with. Because of its discrete nature, you can t get exactly your desired significance level (α).

35 Rejection region Consider X Binomial(n=29, p). Test of H 0 : p = 1 2 vs H a : p 1 2 at significance level α = Lower critical value: Pr(X 8) = Pr(X 9) = L=8 Upper critical value: Pr(X 21) = Pr(X 20) = H = 21 Reject H 0 if X 8 or X 21. (For testing H 0 : p = 1 2, H = n L) Binomial(n=29, p=1/2) Binomial(n=29, p=1/2) 1.2% 1.2%

36 Significance level Consider X Binomial(n=29, p). Test of H 0 : p = 1 2 vs H a : p 1 2 at significance level α = Reject H 0 if X 8 or X 21. Actual significance level: α = Pr(X 8 or X 21 p = 1 2 ) = Pr(X 8 p = 1 2 ) + [1 Pr(X 20 p = 1 2 )] = If we used instead Reject H 0 if X 9 or X 20, the significance level would be 0.061! Confidence interval for a proportion Suppose X Binomial(n=29, p) and we observe X = 24. Consider the test of H 0 : p = p 0 vs H a : p p 0. We reject H 0 if Pr(X 24 p=p 0 ) α/2 or Pr(X 24 p=p 0 ) α/2 95% confidence interval for p: The set of p 0 for which a two-tailed test of H 0 : p = p 0 would not be rejected, for the observed data, with α = The plausible values of p.

37 Example 1 X Binomial(n=29, p); observe X = 24. Lower bound of 95% confidence interval: Largest p 0 such that Pr(X 24 p=p 0 ) Upper bound of 95% confidence interval: Smallest p 0 such that Pr(X 24 p=p 0 ) % CI for p: (0.642, 0.942) Note: ˆp = 24/29 = 0.83 is not the midpoint of the CI. Example 1 Binomial(n=29, p=0.64) 2.5% Binomial(n=29, p=0.94) 2.5%

38 Example 2 X Binomial(n=25, p); observe X = 17. Lower bound of 95% confidence interval: p L such that 17 is the 97.5 percentile of Binomial(n=25, p L ) Upper bound of 95% confidence interval: p H such that 17 is the 2.5 percentile of Binomial(n=25, p H ) 95% CI for p: (0.465, 0.851) Again, ˆp = 17/25 = 0.68 is not the midpoint of the CI Example 2 Binomial(n=25, p=0.46) 2.5% Binomial(n=25, p=0.85) 2.5%

39 The case X = 0 Suppose X Binomial(n, p) and we observe X = 0. Lower limit of 95% confidence interval for p: 0 Upper limit of 95% confidence interval for p: p H such that Pr(X 0 p = p H )=0.025 = Pr(X = 0 p = p H )=0.025 = (1 p H ) n = = 1 p H = n = p H = 1 n In the case n = 10 and X = 0, the 95% CI for p is (0, 0.31). A mad cow example New York Times, Feb 3, 2004: The department [of Agriculture] has not changed last year s plans to test 40,000 cows nationwide this year, out of 30 million slaughtered. Janet Riley, a spokeswoman for the American Meat Institute, which represents slaughterhouses, called that plenty sufficient from a statistical standpoint. Suppose that the 40,000 cows tested are chosen at random from the population of 30 million cows, and suppose that 0 (or 1, or 2) are found to be infected. How many of the 30 million total cows would we estimate to be infected? No. infected Obs d Est d 95% CI What is the 95% confidence interval for the total number of infected cows?

40 The case X = n Suppose X Binomial(n, p) and we observe X = n. Upper limit of 95% confidence interval for p: 1 Lower limit of 95% confidence interval for p: p L such that Pr(X n p = p L )=0.025 = Pr(X = n p = p L )=0.025 = (p L ) n = = p L = n In the case n = 25 and X = 25, the 95% CI for p is (0.86, 1.00). Large n and medium p Suppose X Binomial(n, p). E(X) = n p SD(X) = np(1 p) ˆp = X/n E(ˆp) = p SD(ˆp) = p(1 p) n ( For large n and medium p, ˆp Normal p, ) p(1 p) n Use 95% confidence interval ˆp ± 1.96 ˆp(1 ˆp) n Unfortunately, this can behave poorly. Fortunately, you can just calculate exact confidence intervals.

### Hypothesis testing - Steps

Hypothesis testing - Steps Steps to do a two-tailed test of the hypothesis that β 1 0: 1. Set up the hypotheses: H 0 : β 1 = 0 H a : β 1 0. 2. Compute the test statistic: t = b 1 0 Std. error of b 1 =

### Hypothesis Testing COMP 245 STATISTICS. Dr N A Heard. 1 Hypothesis Testing 2 1.1 Introduction... 2 1.2 Error Rates and Power of a Test...

Hypothesis Testing COMP 45 STATISTICS Dr N A Heard Contents 1 Hypothesis Testing 1.1 Introduction........................................ 1. Error Rates and Power of a Test.............................

### Summary of Formulas and Concepts. Descriptive Statistics (Ch. 1-4)

Summary of Formulas and Concepts Descriptive Statistics (Ch. 1-4) Definitions Population: The complete set of numerical information on a particular quantity in which an investigator is interested. We assume

### Sampling and Hypothesis Testing

Population and sample Sampling and Hypothesis Testing Allin Cottrell Population : an entire set of objects or units of observation of one sort or another. Sample : subset of a population. Parameter versus

### Permutation & Non-Parametric Tests

Permutation & Non-Parametric Tests Statistical tests Gather data to assess some hypothesis (e.g., does this treatment have an effect on this outcome?) Form a test statistic for which large values indicate

### Chapter 7 Part 2. Hypothesis testing Power

Chapter 7 Part 2 Hypothesis testing Power November 6, 2008 All of the normal curves in this handout are sampling distributions Goal: To understand the process of hypothesis testing and the relationship

### Introduction to Hypothesis Testing. Point estimation and confidence intervals are useful statistical inference procedures.

Introduction to Hypothesis Testing Point estimation and confidence intervals are useful statistical inference procedures. Another type of inference is used frequently used concerns tests of hypotheses.

### Chapter 8 Introduction to Hypothesis Testing

Chapter 8 Student Lecture Notes 8-1 Chapter 8 Introduction to Hypothesis Testing Fall 26 Fundamentals of Business Statistics 1 Chapter Goals After completing this chapter, you should be able to: Formulate

### Experimental Design. Power and Sample Size Determination. Proportions. Proportions. Confidence Interval for p. The Binomial Test

Experimental Design Power and Sample Size Determination Bret Hanlon and Bret Larget Department of Statistics University of Wisconsin Madison November 3 8, 2011 To this point in the semester, we have largely

### 7 Hypothesis testing - one sample tests

7 Hypothesis testing - one sample tests 7.1 Introduction Definition 7.1 A hypothesis is a statement about a population parameter. Example A hypothesis might be that the mean age of students taking MAS113X

### Chapter 2. Hypothesis testing in one population

Chapter 2. Hypothesis testing in one population Contents Introduction, the null and alternative hypotheses Hypothesis testing process Type I and Type II errors, power Test statistic, level of significance

### HypoTesting. Name: Class: Date: Multiple Choice Identify the choice that best completes the statement or answers the question.

Name: Class: Date: HypoTesting Multiple Choice Identify the choice that best completes the statement or answers the question. 1. A Type II error is committed if we make: a. a correct decision when the

### Basic concepts and introduction to statistical inference

Basic concepts and introduction to statistical inference Anna Helga Jonsdottir Gunnar Stefansson Sigrun Helga Lund University of Iceland (UI) Basic concepts 1 / 19 A review of concepts Basic concepts Confidence

### Estimation of σ 2, the variance of ɛ

Estimation of σ 2, the variance of ɛ The variance of the errors σ 2 indicates how much observations deviate from the fitted surface. If σ 2 is small, parameters β 0, β 1,..., β k will be reliably estimated

### Hypothesis testing S2

Basic medical statistics for clinical and experimental research Hypothesis testing S2 Katarzyna Jóźwiak k.jozwiak@nki.nl 2nd November 2015 1/43 Introduction Point estimation: use a sample statistic to

### MATH 214 (NOTES) Math 214 Al Nosedal. Department of Mathematics Indiana University of Pennsylvania. MATH 214 (NOTES) p. 1/6

MATH 214 (NOTES) Math 214 Al Nosedal Department of Mathematics Indiana University of Pennsylvania MATH 214 (NOTES) p. 1/6 "Pepsi" problem A market research consultant hired by the Pepsi-Cola Co. is interested

### HYPOTHESIS TESTING (ONE SAMPLE) - CHAPTER 7 1. used confidence intervals to answer questions such as...

HYPOTHESIS TESTING (ONE SAMPLE) - CHAPTER 7 1 PREVIOUSLY used confidence intervals to answer questions such as... You know that 0.25% of women have red/green color blindness. You conduct a study of men

### Comparing Two Groups. Standard Error of ȳ 1 ȳ 2. Setting. Two Independent Samples

Comparing Two Groups Chapter 7 describes two ways to compare two populations on the basis of independent samples: a confidence interval for the difference in population means and a hypothesis test. The

### 3.4 Statistical inference for 2 populations based on two samples

3.4 Statistical inference for 2 populations based on two samples Tests for a difference between two population means The first sample will be denoted as X 1, X 2,..., X m. The second sample will be denoted

### Testing: is my coin fair?

Testing: is my coin fair? Formally: we want to make some inference about P(head) Try it: toss coin several times (say 7 times) Assume that it is fair ( P(head)= ), and see if this assumption is compatible

### Chapter 8. Hypothesis Testing

Chapter 8 Hypothesis Testing Hypothesis In statistics, a hypothesis is a claim or statement about a property of a population. A hypothesis test (or test of significance) is a standard procedure for testing

### HYPOTHESIS TESTING (ONE SAMPLE) - CHAPTER 7 1. used confidence intervals to answer questions such as...

HYPOTHESIS TESTING (ONE SAMPLE) - CHAPTER 7 1 PREVIOUSLY used confidence intervals to answer questions such as... You know that 0.25% of women have red/green color blindness. You conduct a study of men

### LAB 4 INSTRUCTIONS CONFIDENCE INTERVALS AND HYPOTHESIS TESTING

LAB 4 INSTRUCTIONS CONFIDENCE INTERVALS AND HYPOTHESIS TESTING In this lab you will explore the concept of a confidence interval and hypothesis testing through a simulation problem in engineering setting.

### Chapter Five: Paired Samples Methods 1/38

Chapter Five: Paired Samples Methods 1/38 5.1 Introduction 2/38 Introduction Paired data arise with some frequency in a variety of research contexts. Patients might have a particular type of laser surgery

### 6. Statistical Inference: Significance Tests

6. Statistical Inference: Significance Tests Goal: Use statistical methods to check hypotheses such as Women's participation rates in elections in France is higher than in Germany. (an effect) Ethnic divisions

### Null Hypothesis H 0. The null hypothesis (denoted by H 0

Hypothesis test In statistics, a hypothesis is a claim or statement about a property of a population. A hypothesis test (or test of significance) is a standard procedure for testing a claim about a property

### 1. What is the critical value for this 95% confidence interval? CV = z.025 = invnorm(0.025) = 1.96

1 Final Review 2 Review 2.1 CI 1-propZint Scenario 1 A TV manufacturer claims in its warranty brochure that in the past not more than 10 percent of its TV sets needed any repair during the first two years

### Chapter 4 Statistical Inference in Quality Control and Improvement. Statistical Quality Control (D. C. Montgomery)

Chapter 4 Statistical Inference in Quality Control and Improvement 許 湘 伶 Statistical Quality Control (D. C. Montgomery) Sampling distribution I a random sample of size n: if it is selected so that the

### Module 7: Hypothesis Testing I Statistics (OA3102)

Module 7: Hypothesis Testing I Statistics (OA3102) Professor Ron Fricker Naval Postgraduate School Monterey, California Reading assignment: WM&S chapter 10.1-10.5 Revision: 2-12 1 Goals for this Module

### MATH 10: Elementary Statistics and Probability Chapter 9: Hypothesis Testing with One Sample

MATH 10: Elementary Statistics and Probability Chapter 9: Hypothesis Testing with One Sample Tony Pourmohamad Department of Mathematics De Anza College Spring 2015 Objectives By the end of this set of

### T-test in SPSS Hypothesis tests of proportions Confidence Intervals (End of chapter 6 material)

T-test in SPSS Hypothesis tests of proportions Confidence Intervals (End of chapter 6 material) Definition of p-value: The probability of getting evidence as strong as you did assuming that the null hypothesis

### BA 275 Review Problems - Week 6 (10/30/06-11/3/06) CD Lessons: 53, 54, 55, 56 Textbook: pp. 394-398, 404-408, 410-420

BA 275 Review Problems - Week 6 (10/30/06-11/3/06) CD Lessons: 53, 54, 55, 56 Textbook: pp. 394-398, 404-408, 410-420 1. Which of the following will increase the value of the power in a statistical test

### Power and Sample Size Determination

Power and Sample Size Determination Bret Hanlon and Bret Larget Department of Statistics University of Wisconsin Madison November 3 8, 2011 Power 1 / 31 Experimental Design To this point in the semester,

### Module 5 Hypotheses Tests: Comparing Two Groups

Module 5 Hypotheses Tests: Comparing Two Groups Objective: In medical research, we often compare the outcomes between two groups of patients, namely exposed and unexposed groups. At the completion of this

### C. The null hypothesis is not rejected when the alternative hypothesis is true. A. population parameters.

Sample Multiple Choice Questions for the material since Midterm 2. Sample questions from Midterms and 2 are also representative of questions that may appear on the final exam.. A randomly selected sample

### Single sample hypothesis testing, II 9.07 3/02/2004

Single sample hypothesis testing, II 9.07 3/02/2004 Outline Very brief review One-tailed vs. two-tailed tests Small sample testing Significance & multiple tests II: Data snooping What do our results mean?

### Introduction to Hypothesis Testing

I. Terms, Concepts. Introduction to Hypothesis Testing A. In general, we do not know the true value of population parameters - they must be estimated. However, we do have hypotheses about what the true

### CHAPTER 11 SECTION 2: INTRODUCTION TO HYPOTHESIS TESTING

CHAPTER 11 SECTION 2: INTRODUCTION TO HYPOTHESIS TESTING MULTIPLE CHOICE 56. In testing the hypotheses H 0 : µ = 50 vs. H 1 : µ 50, the following information is known: n = 64, = 53.5, and σ = 10. The standardized

### 15.0 More Hypothesis Testing

15.0 More Hypothesis Testing 1 Answer Questions Type I and Type II Error Power Calculation Bayesian Hypothesis Testing 15.1 Type I and Type II Error In the philosophy of hypothesis testing, the null hypothesis

### Chapter 9, Part A Hypothesis Tests. Learning objectives

Chapter 9, Part A Hypothesis Tests Slide 1 Learning objectives 1. Understand how to develop Null and Alternative Hypotheses 2. Understand Type I and Type II Errors 3. Able to do hypothesis test about population

### Chapter 8 Hypothesis Testing Chapter 8 Hypothesis Testing 8-1 Overview 8-2 Basics of Hypothesis Testing

Chapter 8 Hypothesis Testing 1 Chapter 8 Hypothesis Testing 8-1 Overview 8-2 Basics of Hypothesis Testing 8-3 Testing a Claim About a Proportion 8-5 Testing a Claim About a Mean: s Not Known 8-6 Testing

### The Basics of a Hypothesis Test

Overview The Basics of a Test Dr Tom Ilvento Department of Food and Resource Economics Alternative way to make inferences from a sample to the Population is via a Test A hypothesis test is based upon A

### HYPOTHESIS TESTING: POWER OF THE TEST

HYPOTHESIS TESTING: POWER OF THE TEST The first 6 steps of the 9-step test of hypothesis are called "the test". These steps are not dependent on the observed data values. When planning a research project,

### In the general population of 0 to 4-year-olds, the annual incidence of asthma is 1.4%

Hypothesis Testing for a Proportion Example: We are interested in the probability of developing asthma over a given one-year period for children 0 to 4 years of age whose mothers smoke in the home In the

### Statistiek I. t-tests. John Nerbonne. CLCG, Rijksuniversiteit Groningen. John Nerbonne 1/35

Statistiek I t-tests John Nerbonne CLCG, Rijksuniversiteit Groningen http://wwwletrugnl/nerbonne/teach/statistiek-i/ John Nerbonne 1/35 t-tests To test an average or pair of averages when σ is known, we

### Introduction. Hypothesis Testing. Hypothesis Testing. Significance Testing

Introduction Hypothesis Testing Mark Lunt Arthritis Research UK Centre for Ecellence in Epidemiology University of Manchester 13/10/2015 We saw last week that we can never know the population parameters

### T adult = 96 T child = 114.

Homework Solutions Do all tests at the 5% level and quote p-values when possible. When answering each question uses sentences and include the relevant JMP output and plots (do not include the data in your

### Goodness of fit - 2 classes

Goodness of fit - 2 classes A B 78 22 Do these data correspond reasonably to the proportions 3:1? We previously discussed options for testing p A =0.75! Exact p-value Exact confidence interval Normal approximation

### 4. Continuous Random Variables, the Pareto and Normal Distributions

4. Continuous Random Variables, the Pareto and Normal Distributions A continuous random variable X can take any value in a given range (e.g. height, weight, age). The distribution of a continuous random

### Solutions for the exam for Matematisk statistik och diskret matematik (MVE050/MSG810). Statistik för fysiker (MSG820). December 15, 2012.

Solutions for the exam for Matematisk statistik och diskret matematik (MVE050/MSG810). Statistik för fysiker (MSG8). December 15, 12. 1. (3p) The joint distribution of the discrete random variables X and

### Hypothesis Testing or How to Decide to Decide Edpsy 580

Hypothesis Testing or How to Decide to Decide Edpsy 580 Carolyn J. Anderson Department of Educational Psychology University of Illinois at Urbana-Champaign Hypothesis Testing or How to Decide to Decide

### Extending Hypothesis Testing. p-values & confidence intervals

Extending Hypothesis Testing p-values & confidence intervals So far: how to state a question in the form of two hypotheses (null and alternative), how to assess the data, how to answer the question by

### Section: 101 (10am-11am) 102 (11am-12pm) 103 (1pm-2pm) 104 (1pm-2pm)

Stat 0 Midterm Exam Instructor: Tessa Childers-Day 1 May 014 Please write your name and student ID below, and circle your section. With your signature, you certify that you have not observed poor or dishonest

### How to Conduct a Hypothesis Test

How to Conduct a Hypothesis Test The idea of hypothesis testing is relatively straightforward. In various studies we observe certain events. We must ask, is the event due to chance alone, or is there some

### Coefficient of Determination

Coefficient of Determination The coefficient of determination R 2 (or sometimes r 2 ) is another measure of how well the least squares equation ŷ = b 0 + b 1 x performs as a predictor of y. R 2 is computed

### BA 275 Review Problems - Week 5 (10/23/06-10/27/06) CD Lessons: 48, 49, 50, 51, 52 Textbook: pp. 380-394

BA 275 Review Problems - Week 5 (10/23/06-10/27/06) CD Lessons: 48, 49, 50, 51, 52 Textbook: pp. 380-394 1. Does vigorous exercise affect concentration? In general, the time needed for people to complete

### Two Correlated Proportions (McNemar Test)

Chapter 50 Two Correlated Proportions (Mcemar Test) Introduction This procedure computes confidence intervals and hypothesis tests for the comparison of the marginal frequencies of two factors (each with

### The Goodness-of-Fit Test

on the Lecture 49 Section 14.3 Hampden-Sydney College Tue, Apr 21, 2009 Outline 1 on the 2 3 on the 4 5 Hypotheses on the (Steps 1 and 2) (1) H 0 : H 1 : H 0 is false. (2) α = 0.05. p 1 = 0.24 p 2 = 0.20

### Unit 31 A Hypothesis Test about Correlation and Slope in a Simple Linear Regression

Unit 31 A Hypothesis Test about Correlation and Slope in a Simple Linear Regression Objectives: To perform a hypothesis test concerning the slope of a least squares line To recognize that testing for a

### Statistics 641 - EXAM II - 1999 through 2003

Statistics 641 - EXAM II - 1999 through 2003 December 1, 1999 I. (40 points ) Place the letter of the best answer in the blank to the left of each question. (1) In testing H 0 : µ 5 vs H 1 : µ > 5, the

### 9-3.4 Likelihood ratio test. Neyman-Pearson lemma

9-3.4 Likelihood ratio test Neyman-Pearson lemma 9-1 Hypothesis Testing 9-1.1 Statistical Hypotheses Statistical hypothesis testing and confidence interval estimation of parameters are the fundamental

### Hypothesis Testing Level I Quantitative Methods. IFT Notes for the CFA exam

Hypothesis Testing 2014 Level I Quantitative Methods IFT Notes for the CFA exam Contents 1. Introduction... 3 2. Hypothesis Testing... 3 3. Hypothesis Tests Concerning the Mean... 10 4. Hypothesis Tests

### Practice problems for Homework 11 - Point Estimation

Practice problems for Homework 11 - Point Estimation 1. (10 marks) Suppose we want to select a random sample of size 5 from the current CS 3341 students. Which of the following strategies is the best:

### Confidence intervals

Confidence intervals Today, we re going to start talking about confidence intervals. We use confidence intervals as a tool in inferential statistics. What this means is that given some sample statistics,

### 5.1 Identifying the Target Parameter

University of California, Davis Department of Statistics Summer Session II Statistics 13 August 20, 2012 Date of latest update: August 20 Lecture 5: Estimation with Confidence intervals 5.1 Identifying

### Stat 5102 Notes: Nonparametric Tests and. confidence interval

Stat 510 Notes: Nonparametric Tests and Confidence Intervals Charles J. Geyer April 13, 003 This handout gives a brief introduction to nonparametrics, which is what you do when you don t believe the assumptions

### Exact Confidence Intervals

Math 541: Statistical Theory II Instructor: Songfeng Zheng Exact Confidence Intervals Confidence intervals provide an alternative to using an estimator ˆθ when we wish to estimate an unknown parameter

### [Chapter 10. Hypothesis Testing]

[Chapter 10. Hypothesis Testing] 10.1 Introduction 10.2 Elements of a Statistical Test 10.3 Common Large-Sample Tests 10.4 Calculating Type II Error Probabilities and Finding the Sample Size for Z Tests

### E205 Final: Version B

Name: Class: Date: E205 Final: Version B Multiple Choice Identify the choice that best completes the statement or answers the question. 1. The owner of a local nightclub has recently surveyed a random

### Chapter 9: Hypothesis Testing Sections

Chapter 9: Hypothesis Testing Sections - we are still here Skip: 9.2 Testing Simple Hypotheses Skip: 9.3 Uniformly Most Powerful Tests Skip: 9.4 Two-Sided Alternatives 9.5 The t Test 9.6 Comparing the

### Hypothesis Testing - II

-3σ -2σ +σ +2σ +3σ Hypothesis Testing - II Lecture 9 0909.400.01 / 0909.400.02 Dr. P. s Clinic Consultant Module in Probability & Statistics in Engineering Today in P&S -3σ -2σ +σ +2σ +3σ Review: Hypothesis

### Point and Interval Estimates

Point and Interval Estimates Suppose we want to estimate a parameter, such as p or µ, based on a finite sample of data. There are two main methods: 1. Point estimate: Summarize the sample by a single number

### Hypothesis Testing. Mark Huiskes, LIACS Probability and Statistics, Mark Huiskes, LIACS, Lecture 10

Hypothesis Testing Mark Huiskes, LIACS mark.huiskes@liacs.nl Estimating sample standard deviation Suppose we have a sample x_1,, x_n Average: xbar = (x_1 + + x_n) / n Standard deviation estimate s? Two

### " Y. Notation and Equations for Regression Lecture 11/4. Notation:

Notation: Notation and Equations for Regression Lecture 11/4 m: The number of predictor variables in a regression Xi: One of multiple predictor variables. The subscript i represents any number from 1 through

### Class 19: Two Way Tables, Conditional Distributions, Chi-Square (Text: Sections 2.5; 9.1)

Spring 204 Class 9: Two Way Tables, Conditional Distributions, Chi-Square (Text: Sections 2.5; 9.) Big Picture: More than Two Samples In Chapter 7: We looked at quantitative variables and compared the

### e = random error, assumed to be normally distributed with mean 0 and standard deviation σ

1 Linear Regression 1.1 Simple Linear Regression Model The linear regression model is applied if we want to model a numeric response variable and its dependency on at least one numeric factor variable.

### Two-sample hypothesis testing, I 9.07 3/09/2004

Two-sample hypothesis testing, I 9.07 3/09/2004 But first, from last time More on the tradeoff between Type I and Type II errors The null and the alternative: Sampling distribution of the mean, m, given

### Using pivots to construct confidence intervals. In Example 41 we used the fact that

Using pivots to construct confidence intervals In Example 41 we used the fact that Q( X, µ) = X µ σ/ n N(0, 1) for all µ. We then said Q( X, µ) z α/2 with probability 1 α, and converted this into a statement

### Econ 424/Amath 462 Hypothesis Testing in the CER Model

Econ 424/Amath 462 Hypothesis Testing in the CER Model Eric Zivot July 23, 2013 Hypothesis Testing 1. Specify hypothesis to be tested 0 : null hypothesis versus. 1 : alternative hypothesis 2. Specify significance

### Hypothesis Testing. Hypothesis Testing CS 700

Hypothesis Testing CS 700 1 Hypothesis Testing! Purpose: make inferences about a population parameter by analyzing differences between observed sample statistics and the results one expects to obtain if

### Estimation and Confidence Intervals

Estimation and Confidence Intervals Fall 2001 Professor Paul Glasserman B6014: Managerial Statistics 403 Uris Hall Properties of Point Estimates 1 We have already encountered two point estimators: th e

### Samples and Populations Confidence Intervals Hypotheses One-sided vs. two-sided Statistical Significance Error Types. Statistiek I.

Statistiek I Sampling John Nerbonne CLCG, Rijksuniversiteit Groningen http://www.let.rug.nl/nerbonne/teach/statistiek-i/ John Nerbonne 1/42 Overview 1 Samples and Populations 2 Confidence Intervals 3 Hypotheses

### Opgaven Onderzoeksmethoden, Onderdeel Statistiek

Opgaven Onderzoeksmethoden, Onderdeel Statistiek 1. What is the measurement scale of the following variables? a Shoe size b Religion c Car brand d Score in a tennis game e Number of work hours per week

### 1 SAMPLE SIGN TEST. Non-Parametric Univariate Tests: 1 Sample Sign Test 1. A non-parametric equivalent of the 1 SAMPLE T-TEST.

Non-Parametric Univariate Tests: 1 Sample Sign Test 1 1 SAMPLE SIGN TEST A non-parametric equivalent of the 1 SAMPLE T-TEST. ASSUMPTIONS: Data is non-normally distributed, even after log transforming.

### Hypothesis Testing and Confidence Interval Estimation

Biostatistics for Health Care Researchers: A Short Course Hypothesis Testing and Confidence Interval Estimation Presented ed by: Susan M. Perkins, Ph.D. Division of Biostatistics Indiana University School

### Errata and updates for ASM Exam C/Exam 4 Manual (Sixteenth Edition) sorted by page

Errata for ASM Exam C/4 Study Manual (Sixteenth Edition) Sorted by Page 1 Errata and updates for ASM Exam C/Exam 4 Manual (Sixteenth Edition) sorted by page Practice exam 1:9, 1:22, 1:29, 9:5, and 10:8

### STA218 Introduction to Hypothesis Testing

STA218 Introduction to Hypothesis Testing Al Nosedal. University of Toronto. Fall 2015 October 29, 2015 Who wants to be a millionaire? Let s say that one of you is invited to this popular show. As you

### Chapter 9: Hypothesis Testing Sections

Chapter 9: Hypothesis Testing Sections Skip: 9.2 Testing Simple Hypotheses Skip: 9.3 Uniformly Most Powerful Tests Skip: 9.4 Two-Sided Alternatives 9.5 The t Test 9.6 Comparing the Means of Two Normal

### Odds ratio, Odds ratio test for independence, chi-squared statistic.

Odds ratio, Odds ratio test for independence, chi-squared statistic. Announcements: Assignment 5 is live on webpage. Due Wed Aug 1 at 4:30pm. (9 days, 1 hour, 58.5 minutes ) Final exam is Aug 9. Review

### Two-Sample T-Tests Allowing Unequal Variance (Enter Difference)

Chapter 45 Two-Sample T-Tests Allowing Unequal Variance (Enter Difference) Introduction This procedure provides sample size and power calculations for one- or two-sided two-sample t-tests when no assumption

### 1 Confidence intervals

Math 143 Inference for Means 1 Statistical inference is inferring information about the distribution of a population from information about a sample. We re generally talking about one of two things: 1.

### Section 12.2, Lesson 3. What Can Go Wrong in Hypothesis Testing: The Two Types of Errors and Their Probabilities

Today: Section 2.2, Lesson 3: What can go wrong with hypothesis testing Section 2.4: Hypothesis tests for difference in two proportions ANNOUNCEMENTS: No discussion today. Check your grades on eee and

### Section 7.1. Introduction to Hypothesis Testing. Schrodinger s cat quantum mechanics thought experiment (1935)

Section 7.1 Introduction to Hypothesis Testing Schrodinger s cat quantum mechanics thought experiment (1935) Statistical Hypotheses A statistical hypothesis is a claim about a population. Null hypothesis

### NCSS Statistical Software. One-Sample T-Test

Chapter 205 Introduction This procedure provides several reports for making inference about a population mean based on a single sample. These reports include confidence intervals of the mean or median,

### Probability, Binomial Distributions and Hypothesis Testing Vartanian, SW 540

Probability, Binomial Distributions and Hypothesis Testing Vartanian, SW 540 1. Assume you are tossing a coin 11 times. The following distribution gives the likelihoods of getting a particular number of

### The Variability of P-Values. Summary

The Variability of P-Values Dennis D. Boos Department of Statistics North Carolina State University Raleigh, NC 27695-8203 boos@stat.ncsu.edu August 15, 2009 NC State Statistics Departement Tech Report

### Name: Date: Use the following to answer questions 3-4:

Name: Date: 1. Determine whether each of the following statements is true or false. A) The margin of error for a 95% confidence interval for the mean increases as the sample size increases. B) The margin

### HYPOTHESIS TESTING AND TYPE I AND TYPE II ERROR

HYPOTHESIS TESTING AND TYPE I AND TYPE II ERROR Hypothesis is a conjecture (an inferring) about one or more population parameters. Null Hypothesis (H 0 ) is a statement of no difference or no relationship