Page 1 of 3 pages FINAL EXAM IN STA-2001 Exam in: STA-2001 Stochastic processes. Date: Tuesday the 21. of February, 2012. Time: 09:00 13:00. Place: Aud.max. Approved aids: 4 pages of your own notes. Approved calculator. Kvaløy & Tjelmeland: Tabeller og formler. The exam contains 2 pages excluding this cover page. Contact person: Georg Elvebakk. Phone: 77646532 FACULTY OF SCIENCE AND TECHNOLOGY University of Tromsø, N-9037 Tromsø, Phone 77 64 40 01, Telefax 77 64 47 65
Problem 1 A game consists of two players who plays several points. They start at 0 points each, and the winner of the game is the first player who have won two points more than the other. We assume that player A has a probability of p to win each point (and B a probability of 1 p), and that individual point wins are independent of one another. a) Show that the probability that A wins a game is p 2 1 2p + 2p 2, 0 < p < 1. (Hint: Condition on the result of the first two points played.) Find the expected number of points played during a game. Let {X n, n = 0, 1,...} be the state of a Markov chain on the state space { 2, 1, 0, 1, 2} with transition matrix: P = 1 0 0 0 0 1 p 0 p 0 0 0 1 p 0 p 0 0 0 1 p 0 p 0 0 0 0 1 b) Explain why the game from earlier can be seen as a Markov chain, and why the model above describes the game. In particular, explain what the different states correspond to. Find the classes for the Markov chain. Classify all states as recurrent or transient and find the periods. Let us for the rest of the problem assume that player A has a probability of p = 0.6 of winning each point. c) Find P (X 2 = 2 X 0 = 0) and P (X 4 = 0 X 0 = 0, X 1 = 1). If a game is currently in state 1, what is the probability that player A will win it? We are interested in the mean time that will be spent in the different states before a game is won by one of the players. d) Find the expected time spent in the states 1, 0 and 1, respectively, during a game. This game model could for instance apply to tennis, where a tied game (state 0) is given to the first player to win two more points than his opponent. Let us say that you are watching a tennis match on television, but the match is not sent live and you already know the result. e) If a game is tied (state 0), what is the probability that player A will win the next point given that you know he will win the game. (Hint: Bayes.) 2
Problem 2 Print jobs arrive at a network printer according to a Poisson process with rate λ per hour. We assume that the time to print each job is independent (also of the Poisson process) and exponentially distributed with expectation 1/µ minutes. If there is a job currently being printed, new arrivals will have to wait in line before they are printed. (Time, t, is measured from the time the printer is turned on.) a) We assume in this point that λ = 20 per hour and 1/µ = 2 minutes. What is the probability that three jobs arrives during the first 15 minutes? Given that three jobs arrived during the first 15 minutes, what is the expected number of jobs during the first 30 minutes? What is probability that the printer is still printing the first job when the next job arrives? Let {X(t), t 0} be the number of jobs (not finished) in the system at time t. This includes both the job being printed (if any) and any jobs waiting in line. b) Explain why X(t) is a birth and death process, and find the birth and death rates {λ n } n=0 and {µ n} n=1. Draw a diagram of the process. When will the limiting distribution, {P j } j=0, exist for this process? c) Write down a set of equations that can be used to find the limiting distribution when it exists. Show that the solution is P j = ( λ µ) j ( 1 λ µ ), j = 0, 1,.... (This means that P j = P (Y = j + 1) where Y is a geometric distribution with parameter 1 λ/µ.) For the rest of the problem we assume that the expected number of jobs is 20 per hour, and that the expected time to print a job is 2 minutes. We want to know what happens in the long run. d) What is the expected number of jobs in the system? If you send a job to the printer, what is the expected time you must wait until the printer has finished printing your job? The printer will alternate between idle periods, when there are no jobs, and busy periods, when jobs are (continuously) being printed. For the printer to function without too many mechanical problems it is important that the busy periods are not too long, and that it does not change between busy and idle periods too often. e) What is the probability that the printer is in a busy period? Find the expected length of such a busy period. Find the expected number of times the printer will go from a busy to an idle state during an hour. 3
Side 1 av 3 sider EKSAMENSOPPGAVE I STA-2001 Eksamen i : STA-2001 Stokastiske prosesser. Eksamensdato : Tirsdag 21. februar 2012. Tid : 09:00 13:00. Sted : Aud.max. Tillatte hjelpemidler : 4 sider egne notat. Godkjent kalkulator. "Tabeller og formler i statistikk" av Kvaløy og Tjelmeland. Oppgavesettet er på 2 sider ekskl. forside. Kontaktperson under eksamen: Georg Elvebakk. Telefon: 77646532. FAKULTET FOR NATURVITENSKAP OG TEKNOLOGI Universitetet i Tromsø
Oppgave 1 To spillere spiller et spill der hver runde gir et poeng til en av spillerne. De starter på 0 pong hver, og vinneren av spillet er den første som har vunnet to poeng meir enn motspilleren. Vi antar at spiller A har en sannsynlighet på p for å vinne hvert poeng (og B sannsynlighet 1 p), og at poeng vinnes uavhengig av hverandre. a) Vis at sannsynligheten for at A skal vinne et spill er p 2 1 2p + 2p 2, 0 < p < 1. (Hint: Beting på resultatet av de to første poenga det spilles om.) Finn forventa antall poeng (runder) det blir spilt i et spill. La {X n, n = 0, 1,...} være tilstanden til ei markovkjede med tilstandsrom { 2, 1, 0, 1, 2} og overgangsmatrise: 1 0 0 0 0 1 p 0 p 0 0 P = 0 1 p 0 p 0 0 0 1 p 0 p 0 0 0 0 1 b) Forklar hvorfor spillet fra tidligere kan ses på som ei markovkjede, og hvorfor markovkjeden over modeller spillet. Forklar spesielt hva de forskjellige tilstandene representerer. Find klassene for markovkjeda. Klassifiser alle tilstandene som rekurrente eller transiente, og finn periodene. I resten av spillet antar vi at spiller A har en sannsynlighet på p = 0.6 for å vinne poeng. c) Finn P (X 2 = 2 X 0 = 0) og P (X 4 = 0 X 0 = 0, X 1 = 1). Om et spill er i tilstand 1, hva er sannsynligheten for at spiller A skal vinne spillet? Vi er interessert i forventa tid tilbrakt i de ulike tilstandene før spillet vinnes av en av spillerne. d) Finn forventa tid (runder) i hver av tilstandene 1, 0 og 1 i løpet av et spill. Denne spillmodellen kunne for eksempel blitt brukt i tennis. Når det står likt (deuce) i et game (tilstand 0) blir vinneren den første spilleren som oppnår to poeng meir enn motspilleren. La oss anta at du ser på en tenniskamp på TV, men kampen går ikke direkte og du kjenner allerede resultatet. e) Om et game står likt (tilstand 0), hva blir sannsynligheten for at spiller A vinner neste poeng, gitt at du veit at han kommer til å vinne gamet. (Hint: Bayes.) 2
Oppgave 2 En nettverksprinter mottar skriverjobber som ankommer i følge en poissonprosess med rate λ per time. Vi antar også at utskriftstidene for jobber er uavhengige (også av poissonprosessen) og eksponensialfordelte med forventning 1/µ minutter. Om skriveren er i gang med en utskrift vil eventuelle nye skriverjobber som ankommer måtte vente i kø før de kan bli skrevet ut. (Tida, t, reknes fra skriveren slås på.) a) Vi antar i denne deloppgava at λ = 20 per time og 1/µ = 2 minutt. Hva blir sannsynligheten for at det kommer tre jobber de første 15 minutta? Gitt at det kom tre jobber de første 15 minutta, hva blir forventa antall jobber de første 30 minutta? Hva er sannsynligheten for at skriveren fremdeles skriver ut den første jobben når den neste ankommer? La {X(t), t 0} være antallet (ikke ferdige) jobber i systemet ved tid t. Dette inkluderer jobben som skrives ut (om det er noen), og eventuelle jobber som venter i kø. b) Forklar hvorfor X(t) blir en fødsels- og dødsprosess, og finn fødsels- og dødsratene {λ n } n=0 og {µ n} n=1. Skisser et diagram for prosessen. Når vil grensefordelinga, {P j } j=0, eksistere for denne prosessen? c) Formuler et likningssystem som kan brukes til å finne grensefordelinga når denne eksisterer. Vis at løsninga blir: ( λ j ( P j = 1 µ) λ ), j = 0, 1,.... µ (Dette betyr at P j = P (Y = j + 1) hvor Y er geometrisk fordelt med parameter 1 λ/µ.) I resten av oppgava vil vi anta at forventa antall jobber per time er 20, og at forventa utskriftstid er 2 minutt per jobb. Vi vil rekne på hva som skjer i det lange løp. d) Hva blir forventa antall jobber i systemet? Om du sender en jobb til skriveren, hva blir forventa tid til den er ferdig utskrevet? Skriveren vil veksle mellom ledigperioder, når det er ingen jobber, og virksomperioder, hvor den (kontinuerlig) skriver ut jobber. For at skriveren skal fungere uten for mange mekaniske problem er det viktig at virksomperiodene ikke varer for lenge, og at det ikke veksles for ofte mellom virksom og ledig. e) Hva blir sannsynligheten for at skriveren er inne i en virksomperiode? Finn forventa lengde av en virksomperiode. Finn forventa antall ganger skriveren vil veksle mellom virksom og ledig i løpet av en time. 3