R Tutorial 2 Econ 520, Fall 2007
1. Vectors
In R, a variable can hold a vector of numbers. (You can also dene matrices and arrays, as we'll see later on.) This is very handy because we can do a set of
Econ 520, Fall 2007 Midterm Review Questions Note: I will not provide solutions to these questions. Some of these questions are drawn from previous years exams. 1. Events M and N are said to be mutual
Final Review Questions Note: Many of these questions are drawn from previous years nals. I will not provide solutions to these questions. The nal will cover material from the entire semester, but with
A Simple Poker Game
There are two players. Each player places $1 into the pot as his ante. Then Player 1 is dealt a single card from a deck consisting of only Aces and Kings, in equal numbers. Player
Is Nash Equilibrium a Good Prediction?
Is the Nash equilibrium really a good prediction about what outcome we should expect to see? We can use our in-class Prisoners' Dilemma and Oligopoly games as ex
Mixed Strategies: Minimax/Maximin and Nash Equilibrium
In the preceding lecture we analyzed maximin strategies. A maximin strategy is an assurance strategy: it achieves the best expected payoff a play
Mixed Strategies: Some Examples, and Maximin Analysis
In the preceding lecture we analyzed the pursuit-and-evasion matches we had played in class. A critical strategic element of a pursuit-and-evasion
Mixed Strategies: Outline of the Lecture
1. Some questions about the winner-take-all match/game we played. 2. Predictions about play in the game (with accumulated winnings, not pay-per-play):
http:/ww
Exercise Set #9
Part I (Nim) The game Nim is defined as follows. Several rows of matchsticks are laid on the table. There can be any number of rows, and any number of matchsticks in any of the rows. W
Exercise Set #8
1. Suppose that Raiffas oil wildcatter can hire a company to do a geological study of the site on which he has oil rights, in order to provide himself with somewhat better information
Exercise Set #7
1. A state is considering mandatory drug testing for all state employees. It is known that five percent of the state's population uses drugs, and it is reasonable to assume that state
Exercise Set #6
1. When Venus is at the net, Martina can choose to hit the ball either cross-court or down-the-line. Similarly, Venus can guess that the ball will come cross-court or downthe-line and
Econ 431 Solution to Problem Set #5
2. Solve the equation ( r, L ) = ( r, R ) i.e., r (1) + (1 r) (-1) = r (-1) + (1 r) (1), which yields r = 1/2, and the value of each side of the equation is zero. 3
Exercise Set #5
1. Use Excel (or another spreadsheet program) to reproduce the table of Row-player (Pursuer) winning probabilities that appears on page 5 of the lecture notes for Lecture #14. This is
Solution to Duttas Exercise #4.2
We want to show that a player has an undominated strategy i.e., that he has some strategy that is not dominated by any other strategy. The way well do this is to suppo
Duttas Commons Example in Chapter 7
The example has two features: A common resource its freely available to everyone The resource is exhaustible any use depletes the total available in the future Ther
Overuse of a Common Resource: A Two-player Example
There are two fishermen who fish a common fishing ground a lake, for example Each can choose either xi = 1 (light fishing; for example, use one boat
Name: _
Economics 431 Quiz #5
People, animals, and organizations often find themselves in a situation where each must choose to fight (be tough) or concede (give in). Here are the payoffs for a twopla
Name: _
Economics 431 Quiz #5
People, animals, and organizations often find themselves in a situation where each must choose to fight (be tough) or concede (give in). Here are the payoffs for a twopla
Name: _
Economics 431 Quiz #2
Amy and Beth are competing sellers. Their price competition can be described by the following game, which is derived from the demand curve Q = 6 p, where p dollars per un
Name: _
Economics 431 Quiz #2
Amy and Beth are competing sellers. Their price competition can be described by the following game, which is derived from the demand curve Q = 6 p, where p dollars per un
Name: _
Economics 431 Quiz #1
Amy and Beth are competing sellers. Their price competition can be described by the following game, which is derived from the demand curve Q = 6 p, where p dollars per un
Name: _
Economics 431 Quiz #1
Amy and Beth are competing sellers. Their price competition can be described by the following game, which is derived from the demand curve Q = 6 p, where p dollars per un
A Thumbnail History of Auctions
Human slave auctions: - Egypt, Greece, Roman empire, Southern U.S. Marriage auctions for brides in Asia Minor: - positive and negative prices! Estate auctions in 16th
Economics 520: Introduction to R, Part 3
Keisuke Hirano
September 19, 2011
1 Random sampling with R
R has extensive facilities for working with random numbers and probability distributions. The
sample
Economics 520: Introduction to R, Part 2
and R Exercises for HW2
Keisuke Hirano
August 28, 2011
1 Vectors
In R, a variable can hold a vector of values. An easy way to construct a vector is the c comma
Economics 520: Introduction to R, Part 1
and Problem Set 1, Due Monday, 8/29/11
Keisuke Hirano
August 17, 2011
1 Installing R
The main web page for the R system is http:/www.r-project.org. From the ma
Economics 520, Fall 2011
Midterm Review Questions
Note: I will not provide solutions to these questions. Most of these questions are drawn from previous
years exams.
1. Events M and N are said to be m