Comparing Systems Using Sample Data

Slides:



Advertisements
Similar presentations
Objectives 10.1 Simple linear regression
Advertisements

October 1999 Statistical Methods for Computer Science Marie desJardins CMSC 601 April 9, 2012 Material adapted.
CHAPTER 21 Inferential Statistical Analysis. Understanding probability The idea of probability is central to inferential statistics. It means the chance.
Statistics and Quantitative Analysis U4320
Statistics: Data Analysis and Presentation Fr Clinic II.
Comparing Systems Using Sample Data
Hypothesis Tests for Means The context “Statistical significance” Hypothesis tests and confidence intervals The steps Hypothesis Test statistic Distribution.
Experimental Evaluation
Inferences About Process Quality
Chapter 9 Hypothesis Testing II. Chapter Outline  Introduction  Hypothesis Testing with Sample Means (Large Samples)  Hypothesis Testing with Sample.
Chapter 9 Hypothesis Testing II. Chapter Outline  Introduction  Hypothesis Testing with Sample Means (Large Samples)  Hypothesis Testing with Sample.
Hypothesis Testing and T-Tests. Hypothesis Tests Related to Differences Copyright © 2009 Pearson Education, Inc. Chapter Tests of Differences One.
AM Recitation 2/10/11.
Chapter 8 Hypothesis testing 1. ▪Along with estimation, hypothesis testing is one of the major fields of statistical inference ▪In estimation, we: –don’t.
Comparing Systems Using Sample Data Andy Wang CIS Computer Systems Performance Analysis.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Statistical Inferences Based on Two Samples Chapter 9.
Topic 5 Statistical inference: point and interval estimate
1 Statistical Inference Greg C Elvers. 2 Why Use Statistical Inference Whenever we collect data, we want our results to be true for the entire population.
Topics: Statistics & Experimental Design The Human Visual System Color Science Light Sources: Radiometry/Photometry Geometric Optics Tone-transfer Function.
Chapter 9 Hypothesis Testing II: two samples Test of significance for sample means (large samples) The difference between “statistical significance” and.
Mid-Term Review Final Review Statistical for Business (1)(2)
Education Research 250:205 Writing Chapter 3. Objectives Subjects Instrumentation Procedures Experimental Design Statistical Analysis  Displaying data.
Inferential Statistics 2 Maarten Buis January 11, 2006.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
Large sample CI for μ Small sample CI for μ Large sample CI for p
Manijeh Keshtgary Chapter 13.  How to report the performance as a single number? Is specifying the mean the correct way?  How to report the variability.
Physics 270 – Experimental Physics. Let say we are given a functional relationship between several measured variables Q(x, y, …) x ±  x and x ±  y What.
Review - Confidence Interval Most variables used in social science research (e.g., age, officer cynicism) are normally distributed, meaning that their.
Stats Lunch: Day 3 The Basis of Hypothesis Testing w/ Parametric Statistics.
CPE 619 Comparing Systems Using Sample Data Aleksandar Milenković The LaCASA Laboratory Electrical and Computer Engineering Department The University of.
Welcome to MM570 Psychological Statistics
Review Normal Distributions –Draw a picture. –Convert to standard normal (if necessary) –Use the binomial tables to look up the value. –In the case of.
© Copyright McGraw-Hill 2004
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
Data Analysis Overview Experimental environment prototype real sys exec- driven sim trace- driven sim stochastic sim Workload parameters System Config.
Comparing Systems Using Sample Data Andy Wang CIS Computer Systems Performance Analysis.
Lecture 3 Page 1 CS 239, Spring 2007 Variability in Data CS 239 Experimental Methodologies for System Software Peter Reiher April 10, 2007.
Uncertainty and confidence Although the sample mean,, is a unique number for any particular sample, if you pick a different sample you will probably get.
© 1998, Geoff Kuenning Comparison Methodology Meaning of a sample Confidence intervals Making decisions and comparing alternatives Special considerations.
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
 Normal Curves  The family of normal curves  The rule of  The Central Limit Theorem  Confidence Intervals  Around a Mean  Around a Proportion.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
Testing for a difference
Chapter Nine Hypothesis Testing.
Module 10 Hypothesis Tests for One Population Mean
More on Inference.
AP Biology Intro to Statistics
INF397C Introduction to Research in Information Studies Spring, Day 12
Testing for a difference
Hypothesis Tests for 1-Sample Proportion
Towson University - J. Jung
Hypothesis Tests for a Population Mean in Practice
Chapter 9 Hypothesis Testing.
More on Inference.
Chapter 9 Hypothesis Testing.
Stat 217 – Day 28 Review Stat 217.
Chapter 23 Comparing Means.
Elementary Statistics
Statistical inference
Geology Geomath Chapter 7 - Statistics tom.h.wilson
STATISTICS Topic 1 IB Biology Miss Werba.
Hypothesis Testing: The Difference Between Two Population Means
Confidence Intervals.
Psych 231: Research Methods in Psychology
Psych 231: Research Methods in Psychology
Variance and Hypothesis Tests
Type I and Type II Errors
Statistical Inference for the Mean: t-test
Statistical inference
Presentation transcript:

Comparing Systems Using Sample Data Andy Wang CIS 5930-03 Computer Systems Performance Analysis

Comparison Methodology Meaning of a sample Confidence intervals Making decisions and comparing alternatives Special considerations in confidence intervals Sample sizes

What is a Sample? How tall is a human? Population has parameters Could measure every person in the world Or could measure everyone in this room Population has parameters Real and meaningful Sample has statistics Drawn from population Inherently erroneous

Sample Statistics How tall is a human? People in Lov 103 have a mean height People in Lov 301 have a different mean Sample mean is itself a random variable Has own distribution

Estimating Population from Samples How tall is a human? Measure everybody in this room Calculate sample mean Assume population mean equals What is the error in our estimate?

Estimating Error Sample mean is a random variable Mean has some distribution Multiple sample means have “mean of means” Knowing distribution of means, we can estimate error

Estimating the Value of a Random Variable How tall is Fred? Suppose average human height is 170 cm Fred is 170 cm tall Yeah, right Safer to assume a range

Confidence Intervals How tall is Fred? Suppose 90% of humans are between 155 and 190 cm Fred is between 155 and 190 cm We are 90% confident that Fred is between 155 and 190 cm

Confidence Interval of Sample Mean Knowing where 90% of sample means fall, we can state a 90% confidence interval Key is Central Limit Theorem: Sample means are normally distributed Only if independent Mean of sample means is population mean  Standard deviation of sample means (standard error) is

Estimating Confidence Intervals Two formulas for confidence intervals Over 30 samples from any distribution: z-distribution Small sample from normally distributed population: t-distribution Common error: using t-distribution for non-normal population Central Limit Theorem often saves us

The z Distribution Interval on either side of mean: Significance level  is small for large confidence levels Tables of z are tricky: be careful!

Example of z Distribution 35 samples: 10, 16, 47, 48, 74, 30, 81, 42, 57, 67, 7, 13, 56, 44, 54, 17, 60, 32, 45, 28, 33, 60, 36, 59, 73, 46, 10, 40, 35, 65, 34, 25, 18, 48, 63 Actual distribution is triangular(0 100 25). True population mean is 41.66 population standard deviation is 21.25.

Example of z Distribution Sample mean = 42.1. Standard deviation s = 20.1. n = 35 Confidence interval: 90% α = 1 – 90% = 0.1, p = 1 – α/2 = 0.95 z[p] = z[0.95] = 1.645 Actual distribution is triangular(0 100 25). True population mean is 41.66 population standard deviation is 21.25.

Graph of z Distribution Example 90% C.I.

The t Distribution Formula is almost the same: Usable only for normally distributed populations! But works with small samples

Example of t Distribution 10 height samples: 148, 166, 170, 191, 187, 114, 168, 180, 177, 204 Actual population distribution is N(170,20)

Example of t Distribution Sample mean = 170.5. Standard deviation s = 25.1, n = 10. Confidence interval: 90% α = 1 – 90% = 0.1, p = 1 – α/2 = 0.95 t[p, n - 1] = t[0.95, 9] = 1.833 99% interval is (144.7, 196.3) Actual population distribution is N(170,20)

Graph of t Distribution Example 90% C.I. 99% C.I.

Getting More Confidence Asking for a higher confidence level widens the confidence interval Counterintuitive? How tall is Fred? 90% sure he’s between 155 and 190 cm We want to be 99% sure we’re right So we need more room: 99% sure he’s between 145 and 200 cm

Confidence Intervals vs. Standard Deviations Take coin flipping as an example Head = 0, Tail = 1, mean = 1/2 Standard deviation = 1 𝑛−1 𝑖=1 𝑛 𝑥 𝑖 −𝜇 2 = 1 𝑛−1 𝑖=1 𝑛 𝑥 𝑖 − 1 2 2 ≈ 1 𝑛−1 𝑖=1 𝑛 1 4 = 1 2 𝑛 𝑛−1 → 1 2 , 𝑎𝑠 lim 𝑛→∞

Confidence Intervals vs. Standard Deviations Confidence interval = 𝑧 𝑠 𝑛 →0, 𝑎𝑠 lim 𝑛→∞

Making Decisions Why do we use confidence intervals? Summarizes error in sample mean Gives way to decide if measurement is meaningful Allows comparisons in face of error But remember: at 90% confidence, 10% of sample C.I.s do not include population mean

Testing for Zero Mean Is population mean significantly  0? If confidence interval includes 0, answer is no Can test for any value (mean of sums is sum of means) Our height samples are consistent with average height of 170 cm Also consistent with 160 and 180!

Comparing Alternatives Often need to find better system Choose fastest computer to buy Prove our algorithm runs faster Different methods for paired/unpaired observations Paired if ith test on each system was same Unpaired otherwise

Comparing Paired Observations For each test calculate performance difference Calculate confidence interval for differences If interval includes zero, systems aren’t different If not, sign indicates which is better

Example: Comparing Paired Observations Do home baseball teams outscore visitors? Sample from 9-4-96: H 4 5 0 11 6 6 3 12 9 5 6 3 1 6 V 2 7 7 6 0 7 10 6 2 2 4 2 2 0 H-V 2 -2 -7 5 6 -1 -7 6 7 3 2 1 -1 6 Mean 1.4, 90% interval (-0.75, 3.6) Can’t tell from this data 70% interval is (0.10, 2.76)

Comparing Unpaired Observations CIs do not overlap  A > B CIs overlap and mean of one is in the CI of the other  A ~= B Cis overlap but mean of one is not in the CI of the other  t-test Mean A B A B Mean A B Mean A Mean B

The t-test (1) 1. Compute sample means and 2. Compute sample standard deviations sa and sb 3. Compute mean difference = 4. Compute standard deviation of difference:

The t-test (2) 5. Compute effective degrees of freedom: Note when na = nb, v = 2na when nb  ∞, v  na - 1

The t-test (2) 6. Compute the confidence interval 7. If interval includes zero, no difference

Comparing Proportions If k of n trials give a certain result (category, e.g., male/female), then confidence interval is: If interval includes 0.5, can’t say which outcome is statistically meaningful Must have k  10 to get valid results

Special Considerations Selecting a confidence level Hypothesis testing One-sided confidence intervals

Selecting a Confidence Level Depends on cost of being wrong 90%, 95% are common values for scientific papers Generally, use highest value that lets you make a firm statement But it’s better to be consistent throughout a given paper

Hypothesis Testing The null hypothesis (H0) is common in statistics Confusing due to double negative Gives less information than confidence interval Often harder to compute Should understand that rejecting null hypothesis implies result is meaningful

One-Sided Confidence Intervals Two-sided intervals test for mean being outside a certain range (see “error bands” in previous graphs) One-sided tests useful if only interested in one limit Use z1-or t1-;n instead of z1-/2or t1-/2;n in formulas

Sample Sizes Bigger sample sizes give narrower intervals Smaller values of t,  as n increases in formulas But sample collection is often expensive What is minimum we can get away with?

Choosing a Sample Size To get a given percentage error ±r %: Here, z represents either z or t as appropriate For a proportion p = k/n:

Example of Choosing Sample Size Five runs of a compilation took 22.5, 19.8, 21.1, 26.7, 20.2 seconds How many runs to get ±5% confidence interval at 90% confidence level? = 22.1, s = 2.8, t0.95;4 = 2.132 Note that first 5 runs can’t be reused! Think about lottery drawings

White Slide