Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Performance Modeling Dirk Grunwald Spring ‘96 Jain, Chapter 12 Summarizing Data With Statistics.

Similar presentations


Presentation on theme: "Computer Performance Modeling Dirk Grunwald Spring ‘96 Jain, Chapter 12 Summarizing Data With Statistics."— Presentation transcript:

1 Computer Performance Modeling Dirk Grunwald Spring ‘96 Jain, Chapter 12 Summarizing Data With Statistics

2 Review of Statistics u A sample space is the set of all possible outcomes of an experiment l Time it takes to deliver a packet l The number of “hops” a packet travels in a network u From a set of experiments, we draw a set of elements of a sample space. l The set may be discrete and possible countably infinite (i.e., maps onto the natural numbers) Discrete - number of cars in Colorado Countably Infinite - number of cars that may ever exist l The set may be continuous or drawn from a continuum Sulfur-dioxide emissions per gallon of gas used u An event is a subset of an appropriate sample space l The set of all packets taking less than 5ms to be delivered l The set of all packets that travel exactly three hops

3 Operations on Events u Given two sets, A & B, in a sample space U l Complement All elements in U not in A l Union All elements in either A or B l Intersection All elements in both A and B l Difference All elements in A that are not in B u Example: l The sample space is all network packets. l Set A is the set of all IP packets, set B is the set of all TCP packets l Thus, A - B is the set of all IP packets that are not TCP packets l Note that A & B contain multiple samples from the sample space

4 Additive Set Formulas u From a sample S of 500 machine parts l The set I are improperly assembled l The set D contain defective parts u N(S) is the number of elements in S, or the cardinality of S. u Given u We know N(I) = 10 + 20, N(I’) = N(S) - N(I) = 470 u N(D) = 15, N(D’) = N(S) - N(I) = 485 u Given that the sets are mutually exclusive, we can use the set addition formula

5 Sets and Probability u Given an event A in a sample space S, the probability of A occurring is an additive set function P that satisfies l P(S) = 1 l If A and B are any mutually exclusive events in S, then u A probability is a relative frequency l If the probability that a network packet latency is less than 100ms is 84%, then 84% of the packets that arrive will have a latency of less than 100ms. l But, given a sample of 100 packets, we do not expect precisely 84 packets to arrive in less than 100ms. u You can also view it as a subjective measure l If you’re willing to bet $A vs. $B concerning an outcome, you believe in that outcome with probability

6 Probability is an Additive Set Function u Since probability is additive, we can conclude.. u Thus, our previous example indicated l N(I) = 30, N(I’) = 470P(I) = 30/500 or 0.06, P(I’) = 0.94 l N(D) = 15, N(D’) = 485P(D) = 0.03, P(D’) = 0.97 l Likewise,

7 Conditional Probability u A conditional probability defines the likelihood of an event given that another event has occurred. u Example: The probability that an item is defective given that it is improperly assembled l thus, given our previous data P(D|I) = 0.02 / 0.03 u 1/3 of the components that are improperly assembled contain a defective component u Two events are independent if P(A|B) = P(A) l But, if P(A|B) = P(A), then P(B|A) = P(B) u We can use this to conclude the law of multiplication l And, if A and B are independent,

8 Applications of Conditional Probability u Given a deck of 52 cards, l You draw a specific card (4 Hearts) with probability 1/52 l You replace that card and you draw another card l P(4H) = 1/52 on the first draw, P 2 (4H) = 1/52 on 2nd draw l The probability of drawing 4H twice from the space of all two-card draws is P(4H) * P 2 (4H), or 1/169 u If you don’t return the card, P(4H) for the second draw is obviously 0. u What’s the probability of drawing a 4H and a 3H if you don’t return the cards? l P(4H) = 1/52, P 2 (3H) = 1/51 on second draw l But, you can also draw 3H followed by 4H l Total is P(4H) * P 2 (3H) + P(3H) + P 2 (4H) = 2 / 2652

9 The Rule of Elimination u Example: l We buy voltage regulators from two suppliers l We buy 3/4 of our supplies from B 1, and they have a 5% failure rate l We buy 1/4 of our supplies from B 2, and they have a 20% failure rate l What is the overall failure rate? l We use fact that and the multiplication law

10 The Rule of Bayes u Given n mutually exclusive alternatives where one must occur, the rule of elimination states u What if we want to know the probability that a failing part came from B r ? u Use the rules.. u And we can derive bayes rule

11 Example of Bayes Rule u What is the probability that a voltage regular that fails came from supplier B 2 ? u The probabilities P(B i ) are called the priors or a priori probabilities. u We’ll talk more about Bayesian inference later

12 Random Variables u A random variable can be thought of as a function defined over the elements of a sample space u A probability distribution function (pdf) describes the probability that a specific sample will be selected u Example: l f(x) = 1/6 for x = 1, …, 6 l gives the probability distribution function for the number of points we roll with a balanced die. u We require u A cumulative distribution function (cdf) such as F(x) defines the probability that a random variable has a value less than or equal to x.

13 Sample Discrete Distributions

14 A Sample Discrete Distribution The Binomial Distribution u Many tests deal with repeated trials l What’s the probability that 1 in 5 rivets will rupture? l The probability that 9 of 10 vacuum tubes will last 1000 hours? u If these trials obey the following l There are only two possible out-comes l The probability of a success is the same for each trial l There are n trials, where n is constant l The n trials are independent Ø Then, this is known as a Bernoulli trial u A series of Bernoulli trials define a binomial distribution l Example: 0.001% of writes to a disk drive result in a recoverable error. What is the probability that 4 out of 1000 writes to a number of drives will result in a recoverable error?

15 Deriving the Binomial Distribution u Ordered Trials: given a sequence of n trials of which x are “successful”, with probability of success p l SSS…SSSSFFFF...FFFF x n-x l Multaplicative rule shows the probability of this sequence is p x (1-p) n-x u Unordered Trials: l There are “n choose x” ways to “shuffle” a given string of S & F’s l Thus, the probability of having x successful trials from n trials in any order is

16 Example of Binomial Distribution u Probability of a disk write error is 0.001%, or p=0.00001 l The probability that exactly four of 1000 writes result in an error is u The probability that at least four failures occur is u Which can be reformulated as

17 Identities for Binomial Distributions u Given our definition for b(k;n,p), we can define a cumulative distribution u And several identities


Download ppt "Computer Performance Modeling Dirk Grunwald Spring ‘96 Jain, Chapter 12 Summarizing Data With Statistics."

Similar presentations


Ads by Google