Chapter 1 Problems      AGid      Statistical Modeling: A Fresh Approach (2/e)

1.
How can a model be useful even if it is not exactly correct?
2.
Give an example of a model used for classification.
3.
Often we describe personalities as “patient,” “kind,” “vengeful,” etc. How can these descriptions be used as models for prediction?
4.
Give three examples of models that you use in everyday life. For each, say what is the purpose of the model and in what ways the representation differs from the real thing.
5.
Make a sensible statement about how precisely these quantities are typically measured:
• The speed of a car.
• The national unemployment rate.
• A person’s intelligence.

6.
Give an example of a controlled experiment. What quantity or quantities have been varied and what has been held constant?
7.
Using one of your textbooks from another field, pick an illustration or diagram. Briefly describe the illustration and explain how this is a model, in what ways it is faithful to the system being described and in what ways it fails to reflect that system.

Prob 1.01. Many fields of natural and social science have principles that are identified by name. Sometimes these are called “laws,” sometimes “principles”, “theories,” etc. Some examples:

 Kepler’s Law Newton’s Laws of Motion Ohm’s Law Grimm’s Law Nernst equation Raoult’s Law Nash equilibrium Boyle’s Law Zipf’s Law Law of diminishing marginal utility Pareto principle Snell’s Law Hooke’s Law Fitt’s Law Laws of supply and demand Ideal gas law Newton’s law of cooling Le Chatelier’s principle Poiseuille’s law

These laws and principles can be thought of as models. Each is a description of a relationship. For instance, Hooke’s law relates the extension and stiffness of a spring to the force exerted by the spring. The laws of supply and demand relate the quantity of a good to the price and postulates that the market price is established at the equilibrium of supply and demand.

Pick a law or principle from an area of interest to you — chemistry, linguistics, sociology, physics, ... whatever. Describe the law, what quantities or qualities it relates to one another, and the ways in which the law is a model, that is, a representation that is suitable for some purposes or situations and not others.

An example is given below.

EXAMPLE: As described in the text, Hooke’s Law, f = -kx, relates the force (f), the stiffness (k) and the extension past resting length (x) for a spring. It is a useful and accurate approximation for small extensions. For large extensions, however, springs are permanently distorted or break. Springs involve friction, which is not included in the law. Some springs, such as passive muscle, are really composites and show a different pattern, e.g., f = -k x3|x| for moderate sized extensions.

Prob 1.02. NOTE: Before starting, instruct R to use the mosaic package:

> require(mosaic)

Each of the following statements has a syntax mistake. Write the statements properly and give a sentence saying what was wrong. (Cut and paste the correct statement from R, along with any output that R gives and your sentence saying what was wrong in the original.)

Here’s an example:

QUESTION: What wrong with this statement?

> a = fetchData(myfile.csv)

ANSWER: It should be

> a = fetchData("myfile.csv")

The file name is a character string and therefore should be in quotes. Otherwise it’s treated as an object name, and there is no object called myfile.csv.

Now for the real thing. Say what’s wrong with each of these statements for the purpose given:

(a)
> seq(5;8) to give  5 6 7 8

 A Nothing is wrong. B Use a comma instead of a semi-colon to separate arguments: seq(5,8). C It should be seq(5 to 8).

(b)
> cos 1.5 to calculate the cosine of 1.5 radians

(c)
> 3 + 5 = x to make x take the value 3+5

(d)
> sqrt[4*98] to find the square root of 392

(e)
> 10,000 + 4,000 adding two numbers to get 14,000

(f)
> sqrt(c(4,16,25,36))=4 intended to give
 FALSE TRUE FALSE FALSE

(g)
> fruit = c(apple, berry, cherry) to create a collection of names
 "apple" "berry" "cherry"

(h)
> x = 4(3+2) where x is intended to be assigned the value 20

(i)
> x/4 = 3+2 where x is intended to be assigned the value 20

Prob 1.04. The operator seq generates sequences. Use seq to make the following sequences:

1.
the integers from 1 to 10
2.
the integers from 5 to 15
3.
the integers from 1 to 10, skipping the even ones
4.
10 evenly spaced numbers between 0 and 1

Prob 1.05. According to legend, when the famous mathematician Johann Carl Friedrich Gauss (1777-1855) was a child, one of his teachers tried to distract him with busy work: add up the numbers 1 to 100. Gauss did this easily and immediately without a computer. But using the computer, which of the following commands will do the job?

 A sum(1,100) B seq(1,100) C sum of seq(1,100) D sum(seq(1,100)) E seq(sum(1,100)) F sum(1,seq(100))

Prob 1.10. Try the following command:

> seq(1,5,by=.5,length=2)

Why do you think the computer responded the way it did?

Prob 1.11. 1e6 and 10e5 are two different ways of writing one-million. Write 5 more different forms of one-million using scientific notation.

Prob 1.12. The following statement gives a result that some people are surprised by

> 10e3 == 1000

 FALSE

Explain why the result was FALSE rather than TRUE.

 A 10e3 is 100, not 1000 B 10e3 is 10000, not 1000 C 10e3 is not a valid number D It should be true; there’s a bug in the software.