### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# PROBAB&STAT COM SCI STAT 330

ISU

GPA 3.5

### View Full Document

## 25

## 0

## Popular in Course

## Popular in Statistics

This 54 page Class Notes was uploaded by Giovani Ullrich PhD on Saturday September 26, 2015. The Class Notes belongs to STAT 330 at Iowa State University taught by Staff in Fall. Since its upload, it has received 25 views. For similar materials see /class/214409/stat-330-iowa-state-university in Statistics at Iowa State University.

## Reviews for PROBAB&STAT COM SCI

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/26/15

Summary of Speci c Discrete RV s and their Distributions 1 Bernoulli Setting Probability experiment with two possible oucomes Success S or Failure 7 Random VariableX 1 if success X 0 otherwise X N Berp Sample Space ImX 01 7 PMF p1M KEQU x pXlt p 0 otherwise i CDF 0 if a lt 0 Emmy g mi mkz 03xlti 1 if a 2 1 7 Mean and Variance Ele p VarX p1 p 2 Binomial Setting Count the number of successes in a sequence of n iid Bernoulli trials 7 Random Variable X number of successes in a sequence of n iid Bernoulli trials X N BMW p 7 Sample Space ImX 0 7n 7PMR nz1 1Wageopum pXx mp nghirwis ionn O xlt0 Bum 250 9pm p if 0 s x lt n 1 if x Z n 7 Mean and Variance Ele np VarX np1 p 3 Geometric Setting Perform iid Bernoulli experiments until a success occurs 7 Random Variable X trial on which the rst success occurs X N Geop Sample Sapce ImX 1273 PMF 1 p1 1pifx6 l 0 otherwise prW i CDF G O xlt1 60 f 1 i i pwifxzi Mean and Variance EX p l VarX 110 4 Poisson Setting Number of occurrences of a relatively rare event Where the probability of the event is constant across time intervals or spatial regions 7 Random Variable X number of events X N P000 7 Sample Space ImX 0 12 PMF 53t i rElew 0 otherwise PXlt95 CDF 0ifxlt0 P0 05 x A ziriwmo Mean and Variance EX A VarX A Important Connection Between Bernoulli Random Variables and Binomial Random Variables o A Binomial rV can be represented as the sum of iid Bernoulli rv7s Let X1 Xn be iid Bernoulli rv7s For i 1 n7 1 if Success X 0 otherwise LetXX1X2Xn Then7 X N Binnp Verify7 using the representation of X as a sum of iid Bernoulli rv7s7 that EX up and VarltXgt nplt1 p By linearity of expectation7 EX EX1 EX2 EXn pppnp gtllt By inolepenolence7 VarltXgt VarltX1 VarltX2 VarltXn p1 pp1 p p1 p np1 p Note A Bernoulli rV is a Binomial rV with n 1 Modi ed Geometric o The Geometric rV tells us the trial on which the rst success occurs in a sequence of iid Bernoulli experiments Alternatively7 we could keep track of the number of failures before the rst success 0 Let Y number of failures before the rst success in a sequence of iid Bernoulli experiments7 each With success probability p We will say that Y has a Modi ed Geometric77 distribution 0 le N Geoltpgt7 then Y X 1 o What is ImY ImY 0 1 o What is the pmf of Y PYkPXk11 1 1 1131 pkpfork01 o What is EY What is VarY ElY ElX 1EX 11 VarY VarltX 1 VaTltXgt Practice Problems for Midterm 27 Spring 2009 1 A careless R programmer has a 10 chance of making an error in a line of code Assume that the lines of code are independent7 so the event that one line has and error has no in uence on the probability of an error occuring in a different line a A short program consists of 8 lines of code Let X be the number of lines in the short program that contain an error What is the distribution of X State the name of the distribution and the values of parameters What is the probability that less than one quarter of the lines contain an error b A longer program contains 150 lines of code Let Y be the number of lines in the long program that contain an error Assume that Y has an approximate Poisson distribution What is the appropriate value for the Poisson rate parameter A Using your value of A how many lines of code do you expect will have errors c You have looked through three lines of code7 and none of them has an error Now7 what is the distribution of the number of additional lines of code until you nd one with an error including the line with an error What is the expected number of additional lines of code until the rst with an error P Let T be the time until an electronic component fails7 measured in years T is the lifetime ofthe component Assume that T is a continuous random variable with probability density function pdf kexp if t gt 0 t 7 M 01ftlt0 a What value of k makes fTt a valid pdf Why b What is the cumulative distribution function cdf of T You may express your answer in terms of k if you were unable to nd k in part a c What is the probability that the component fails within the rst six months 5 years You may express your answer in terms of k if you were unable to nd k in part a A manufacturer sells 50 such components7 each of which comes with a six month warranty The lifetimes of the 50 components are independent7 continuous random variables7 each with pdf fTt Consider the 50 components that the manufacturer sells Let X be the number of components that fail during the rst 6 months 5 years d ls X discrete or continuous Why e What is the distribution of X Give the name of the distribution and the numeric values of all parameters You may express your answer in terms of k if you were unable to nd the value of How many components does the manufacturer expect will fail during the rst 6 months 3 On any given day7 the probability of a network breakdown is 121 The network breakdowns occur independently of one another r U a We start monitoring the network on day 1 and continue monitoring the network for day 2 day 3 day 4 etc Let X be the day on which the rst breakdown occurs What is the distribution of X State the name of the distribution and numeric values of parameters What is the expected day on which the rst breakdown occurs In other words what is EX We have been monitoring the network for one week and no breakdowns have occured Now what is the expected number of additional days until the rst breakdown Why What is the probability that no breakdowns occur in the rst 5 days What is the probability that there is exactly 1 breakdown in the rst 5 days The number of breakdowns in the next three weeks has an approximate Poisson dis tribution with rate A 1 What is the probability that there is at least 1 breakdown in the next three weeks For full credit express your answer as a single number Normal Distribution The average monthly balances on checking accounts of the lSU Bank are normally dis tributed with mean 1000 and standard deviation 500 There is a monthly fee if the average monthly balance is below 1500 a What is the probability that a customer can avoid the monthly fee b What is the probability that a customer can avoid the fee given that the balance on hisher account exceeds 1000 c What is the probability that the balance of a customer is between 900 and 1100 A Able is customer at the lSU Bank B Baker is at a bank whose customers have a normally distributed balance with mean 1200 and variance 90000 The banks are inde pendent d What is the distribution of the difference between the balances of Able and Baker distributed Give an appropriate distribution and parameters e What is the probability that Able has more money on his account than Baker use your answer to Central Limit Theorem a Suppose 49 of students are in favor of a new administrative decision The Iowa State Daily asks 1000 randomly selected students if they are in favor of the new decision Assume the responses are iid Bernoulli trials Approximate the probability that more than 51 of the students interviewed are in favor of the new decision A psychologist wants to estimate the mean intelligence quotient IQ of the students of a university To do so she takes a sample of size n of the students and measures their le Then she nds the average of these numbers She believes that the le of these students are iid random variables with a variance of 170 How big should she choose the sample so that the approximate probability that her estimate differs from the true mean by more than 2 is 02 6 Random Numbers Below are 5 iid realizations from a standard uniform U01 distribution ul 00206u2 03611u3 07972u4 0414u5 01058 a A continuous distribution of interest has CDF 0 ifygi FYy 1iyi12 ify21 Describe how you would simulate ve realizations y17y27y37y4 and y5 of Y with the ve uniform random numbers given above What values y17y5 do you obtain b How would you use the ve values above to generate a single realization X from a Binomial distribution with n 5 and p 25 What value of X do you obtain c How could you simulate from an Erlang distribution with k 5 and A 3 7 Please review HW 5 8 for additional examples 9 xquot I 353er 37 Random Variables It is easier to work with numbers that with elementary outcomes Fiom now on we re going to use real valued functions called random variables rv s instead of working with Q and w directly Random variables allow us to sum marize elementary outcomes and events with numbers Defn A random variable rv is a function XQ gtR Ezrample Throw a dart at a board with 8 green squares and 1 red square three times The tosses are iid with Pltredgt on any toss Count the number of times you hit the red square 0 Let X of reds o X is a random variable X 13 if there are 13 reds and 3 13 greens The set of possible values for X is 0 l 2 3 o What is the probability that you hit the red square exactly twice The event exactly 2 reds77 is formally written as w X to 2 Simpler notation for the event exactly 2 reds77 is X 2 Plt2 reds PX 2 PRRG or RGR or GER PRRGPRGRPGRR 1 1 8 1 8 1 8 1 1 0 Standard Notation Capital letters for rv7s ie7 X Y Z i and lowercase letters for the values of the rv7s To simplify7 write Xaforw Xw 33 Example Practice with notation Send 8 bits of information through a communication channel Each bit is received correctly with probability p and incorrectly with probability q The bits are independent We are interested in the number of bits that are received incorrectly Sending the 8 bits is a sequence of iid Bernoulli trials Let X of bits received incorrectly What are the possible values for X 0 1 2 3 4 5 6 7 8 Write the following events and expressions for their probabil ities using the rv X a No wrong bits X O PX O b At least one wrong bit XgtO PltXgtOgtorXZl PX21 c Exactly 2 wrong bits X 2 PX 2 d Between 2 and 7 wrong bits inclusive 23Xg7 P2 X 7 Defn The image of a rV is the range of the rV ImX RX XQ aj Xw for somew E Q The image of a rV X is also called the sample space for X and is often denoted by x Defn A rV is discrete if ImX is nite or countably in nite Examples What is the image ls the rV discrete a X total dots showing on two rolls of a six sided die ImX 234 5 6 78 9 10 11 12 X is discrete b Y heads in n 1000 tosses of a fair coin ImY 0 1 1000 Y is discrete c W time untile a part on a machine fails gtllt ImW 0 oo gtllt W is not discrete d Z trial on Which the rst head occurs gtllt ImltZgt 1 2 3 positive integers gtllt Z is discrete e I 1 if the ampli er fails during warantee and 0 otherwise gtllt ImI 01 gtllt I is discrete gtllt I is a bernoulli random variable Random Variables and Bernoulli trials Defn A Bernoulli random variable is a rV with two possible outcomes If X is a Bernoulli rv7 then ImltXgt 0 l7 and PltX1gtp PltX0gtq pq1 Random Variables and Independence Defn Two discrete rv7s X and Y are independent if PX Y y PX PY y for all a E ImltXgt and y E ImY ln general7 two rv7s X and Y are independent if HXEAYEBFJKXEMPWEB for any two sets A C ImltXgt7 and B C ImY Note that PX as Y y means PX as and Y y and PX E AY E B means PltX E A and Y E B Result Two rv7s X and Y are independent if HXemYemPMeA for all A C ImltXgt7 and B C ImY lntuitively7 X and Y are independent if knowledge about Y tells us nothing about what values are more or less likely for X nyxMXWWWXWWM r xxxzxzxwemw g I I u H V I 3x3 ww 39zltr7xAltM4 z V V WW4 a mzraz m I xwiltmltmltx 397rrltr ltt r7x 69 xmmcvxz mw Hrs0 We ltogtltxuwv y39a wmvSazcxc a V4 94902 lt I 139 v x r r quot3946 v 4 3 4 tr anwmmyn lt Vltlt my V WWWww abwmaz ktvxx xx 3W gt wguewxww v 196 zxxxu v 39 39 39 39 39 39 39 A a39 quot V4 quotMs7449 WWW if I V 453 f wwxmw V V 44 x 7quot s V g v 3955 g XKXWzym9 WW y MxWWI 3 a m J H w V w aw wa Aw 8 Maw W m 2 V V WM N V V 1 i W 1 The number of hits on a popular Web page follows a Poisson process The average time between arrivals is 6 seconds or 1 minutes One begins observation at exactly noon tomorrow WOl standard time a What is the distribution of the number of hits in the rst 2 minutes State a random variable7 and give the name ofthe distribution and the values of parameters What is the probability of 8 or less hits in the rst minute b What is the distribution of the time until the rst hit State a random variable and give the name of the distribution and the values of parameters Compute the probability that the time until the rst hit exceeds 10 seconds c Find the mean and the variance of the time until the third hit d Evaluate the probability that the time till the third hit exceeds 24 seconds 3 The drive through at Fancy Fast Food has one window and enough space for an in nitely long waiting line Customers arrive at a rate of 6 per hour The average service time is 2 minutes lnter arrival times and service times are independent exponentially distributed random variables Using what you know about MMl queuing systems7 answer the fol lowing questions a What is the large t probability that the drive through is empty In other words7 what is the steady state probability that there are no customers in the drive through b What is the steady state expected value of the time a customer spends in the system time waiting plus time in service c The attendant arrives at 1200pm What is the distribution of the number of customers that arrive in the rst 3 hours give the name of the distribution and the values of parameters How many customers does the attendant expect will arrive in the rst 3 hours 9 A small communication system has two processors and a buffer that holds at most one message The total capacity of the communication system is 3 messages Messages arrive to the system at a rate of 2 per minute Each processor decodes messages at a rate of 1 per minute a Draw a state diagram to represent the communication system Show all possible states along with the corresponding birthdeath rates b V Let X be the steady state or large t number of messages in the system Write down the pmf and cdf of X c What is the large t expected number of messages in the bu er The buffer is the queue or waiting line7 d What is the expected time that a message spends in the bu er If you were unable to answer part c7 you may assume that the expected number of messages in the buffer is 1 messages Hint Use Little7s Law 4 Messages arrive to a communication system according to a Poisson process The average time betwen arrivals is 5 minutes The system begins to operate at 800am a What is the distribution of the time until the rst message arrives State a random variable and give the name ofthe distribution and the values of parameters What is the probability that the rst message arrives before 815am 7 pts b What is the distribution ofthe number of messages that arrive in the rst ten minutes State a random variable and give the name of the distribution and the values of parameters What is the probability that no messages arrive in the rst ten minutes What is the distribution of the time until the 6 message arrives State a random variable and give the name of the distribution and the values of the parameters How long do you expect to have to wait for the arrival of the 6 message A O Now suppose that the system has two processors for decoding messages and holds at most four messages If a new message arrives when there are already four messages in the system the new message is lost Assume that the decode times of the two processors are independent exponentially distributed random variables Processor A decodes messages at a rate of 1 per minute and Processor F decodes messages at a rate of 2 per minute Because Processor F is faster than Processor A if there is only one message in the system then Processor F decodes that message d Draw a state diagram to represent the system lndicate all possible states along with the appropriate birth and death rates E ampH V w I 39 Statistics Ming P1quotc labtltty to Learn from Data A Slmzmar y of Chapter 6 April 28 2009 000 1 Nature true unknown parameter 0 0 Example Two methods for manufacturing computer chips p1 Probability of a defect from method 1 p2 Probability of a defect from method 2 2 Data X17 Xn N iidFmz0 0 Example Manufacture n chips using each of the two methods X Number defective from method 1 X N Binomialnp1 Y Number defective from method 2 Y N Binomialnp2 5 Use probability to evalueate what values of 0 are plausible based on the data 3 Example 0 What are our estimates of 171 and p27 0 What are plausible values for the difference 1717 p27 a Are the data consistent with the hypotheses that the two methods are the same ie Are the data consistent with the hypothesis that 171 5 a Oth I l 2 0 We don39t know 0 but 9 is the answer to our question We can use the data to learn about 0 1 Estimate 0 Use the data to make an intelligent guess about the value 0 2 Make a confidence interval for H Give a range of values of B that are plausible based on the data 5 Test a hypothesis about 0 Are the data consistent with the hypotheses that H 90 or should we reject the hypothesis H 00 El 5 3 QQCV a An estimator of 0 is a function of the data 5 9X1 0 Properties of Estimators o Unbiased ElH 0 mix a Consistent For a large sample size 7 Bl gt e m 0 A 2 a Asymptotically Normal 0 N N67 0 Comment An estimator is a random variable The distribution of an estimator is called the sampling distribution nation of 0 0 Example Estimate the probability of a defect from method 1 a Data XL Xn N iid Bernoulip1 X 7 1 if defect from method 1 Z 7 0 otherwise a Estimator of p12 1 n defective A 7 Xi P1 n n o 1amp1 is unbiased El 1p1 3 Sampling Distribution By CLT 17 51 N N 10177 101 TL 5 39 our How to Es mate 0 9 Method of Maximum Likelihood a Let X717 A Xn be discrete For observations X1 11 i i AA Xn In the Maximum Likelihood Estimator MLE is the value 0 such that PX1 zlv WXn 2 PX1 11 WXn xn9 for any 0 How to Es mate 0 0 Example Estimate the probability of a defect from method 1 a Data X11Xn N iid Bernoulip1 Z 1 if defect from method 1 0 otherwise a Estimator of p12 1 n 7 defective A 7 Xi P1 n n 0 Exercise Show that 131 is the maximum likelihood estimator of In o What is a range of plausible values for 0 o A 95 confidence interval for 0 is an interval of the form Pia such that P 76lt0lt 7695 0 Comments o What39s random The interval is random a What39s fixed The true unknown 6 is fixed 0 construct an interval that has a high ie 95 chance of capturing the true 9 a If I repeat the experiment 100 times I expect 95 of the confidence intervals will contain the true 9 o A cpnfidence interval is called conservative if Pw76lt9lt97 29w El 5 E 34 QQCV 0 Example Estimate the probability of a defect from method 1 a Estimator of p12 1 n 7 defective A 7 Xi P1 n n 0 Use the CLT to show that for large n a conservative 95 confidence interval for 01 is A 1 A 1 pl 71967 101 1967 l 2J7 27L 0 Approximately 95 of confidence intervals constructed in this way will contain the true 171 a This is why m i is called the margin of error a As we collect more data n increases and we get a narrower interval We have a more precise estimator of In when we have more data 5 39 2 Que I l o Null Hypothesis H0 0 00 0 Alternative Hypothesis H1 0 7 00 0 Test Procedure Reject the null hypothesis in favor of the alternative if PObserved data l H0 is true lt 05 o If the observed data are highly unlikely when H0 is true then we have grounds for rejecting H0 in favor of H1 0 Example I give you a coin to toss and I tell you that the coin is fair Do you believe me Let p Probhead o Hypotheses 0 Ho Coin fair lt gt p 0 H1 Coin unfairlt gtpltorpgt a Data You toss coin 20 times and get 18 heads and 2 tails a Test procedure If the coin is fair ie p then P18 or more H s 1 7 Binn om jm 0002 P2 or fewer H s Binn om e 0002 P outcome as extreme as 18 H39s and 2 T39s 0002 0002 0004 0 Conclusion If the coin is fair then you got extremely lucky You observed a very unusual outcome On the basis of these results we reject the hypothesis that the coin is fair 5 39 7 Que lhl

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.