Exam Preview worksheet – ISP 121 – Winter 2007



Exam Preview worksheet – LSP 121

The final exam will cover material since the midterm exam. Examples not illustrated here does not mean that that material will not be part of the final. You can use one 8.5” x 11” sheet of notes (using both sides) for the final.

Partial credit can be given. Show work (don’t just list the answer). See sample solutions in PowerPoint.

Conversions

1. The world’s fastest moving tectonic plate is the Pacific Plate. It moves at the lightning speed of four inches a year. What is that in miles per hour?

2. Convert 101101002 from binary into decimal (show work):

begin with

| | | | | | | | |

|1 |0 |1 |1 |0 |1 |0 |0 |

add powers of 2, beginning with rightmost cell using 1, then 2, then 4, … moving to the left

math:

3. Convert 38F216 from hex to decimal (show work): starting from the right, enter the successive powers of 16 beginning with 160 (which is 1), then 161, 162, etc.

|4096 |256 |16 |1 |

|3 |8 |F |2 |

note also: counting in base 16

|Decimal |Hexadecimal |Decimal |Hexadecimal |

|1 |1 |10 |A |

|2 |2 |11 |B |

|3 |3 |12 |C |

|4 |4 |13 |D |

|5 |5 … |14 |E |

|8 |8 |15 |F |

|9 |9 |16 |10 |

math: 2 * 1 + 15 * 16 + 8 * 256 + 3 * 4096 = 14,57810

Probability

4. What is the probability of not rolling a double-6 with two dice?

5. Suppose event A has a 0.98 probability of occurring and event B has a 0.94 probability of occurring. Compute the odds for event A and the odds for event B.

6. What is the probability of the next five births at a hospital all being girls?

7. Studies have shown that Peoria, Illinois is hit by a tornado about every 30 years.

a) What is the probability that Peoria will be hit by a tornado this year?

b) What is the probability that Peoria will be hit by tornados in three consecutive years?

c) What is the probability that Peoria will be hit by at least one tornado in the next 30 years?

8. In 2000, there were 227,381 deaths in California, the highest number in the United States. The lowest number of deaths in any state was for Alaska, with 2911 deaths. The populations of California and Alaska were approximately 30 million and 550,000, respectively. Compute the 2000 death rates for California and Alaska in deaths per 1000. Based on the fact that California and Alaska had the highest and lowest death numbers, respectively, does it follow that California and Alaska had the highest and lowest death rates, respectively?

Why or why not?

9.

a) Suppose that license plates are made with three letters followed by

three numerals (0-9). How many different license plates are possible?

b) How many different ten-note “tunes” can be created from the notes A, B, C, D, E, F and G?

Expected Value

10. If you pay $2 for a lottery ticket and the following winnings are possible:

1/50 chance of winning a free ticket ($2)

1/2000 chance of winning $1,000

1/4000 chance of winning $2,000

1/40000 chance of winning $20,000

What is your expected value?

Logarithms

11. Using an Excel spreadsheet, calculate the data rate in bits per second using Shannon’s equation. Hold the signal level at 0.4 watts, the noise level at 0.0002 watts, and vary the frequency from 1000 to 10,000 Hz in increments of 500.

Shannon’s equation:

R = B LOG2 (1 + S/N) {LOG2 means LOG(x) base 2}

where R = maximum data rate, B = bandwidth (in Hz), S = signal level, and N = noise level

In Excel, the function looks like this:

= Hz * LOG(1 + 0.4/0.0002, 2) {notice the values for S and N are inserted}

‘Hz’ refers to the frequency in the Hz column. Note that the LOG function has a second parameter [2] which means base log base 2. The syntax for log is = LOG(value,base)

use Excel

12. Nyquist’s equation:

R = 2 * W * LOG2 M

Where R = maximum data rate, W = bandwidth (in Hz), and M = maximum number of signals.

Again, in Excel use:

= 2 * Hz * LOG(8,2) {the value of M, 8, is entered in this formula}

use Excel

Programming

13. Know the basic structures for loops (FOR .. NEXT), conditionals (IF .. THEN .. ELSE .. END IF)

Loop: initial value = 1, terminal value = 10, step = 1

FOR i = 1 TO 4

FOR j = 1 TO 3

OUTPUT.SCREEN i, j

NEXT j

NEXT i

Q: What is the output of the above code (a comma in OUTPUT is equivalent to a TAB)

Note: you can test this with VBA in Excel if you use MsgBox(i,j) instead of OUTPUT.SCREEN command.

Given a simple loop or nested loop (as in #13), know how to determine the number of outputs that will occur.

Macros and VBA

14. When are macros best used?

What does VBA stand for? Visual Basic for Applications

What is the language of VBA? Visual Basic

15. In VBA code, describe what this line of code does.

CELLS(2,3) = CELLS(2,3) + 4

Algorithms

16. What is an algorithm? Give a good example of an algorithm. You might also be asked to write an algorithm for a given event.

Risk Analysis

17. You are given the following data concerning a certain type of cancer: 1 in 6000 tumors is malignant; a test to determine if you have this cancer is 75% accurate. If 10,000 individuals with this tumor are tested, what is the percentage of individuals that will receive a true positive result? A false negative result? Show all work.

Programming:

There might be some simple questions about the programming used in the 3-D Alice activity assignment. How does a loop structure work? How does a conditional (IF) structure work? Give a simple example of each. You will not be asked to write the exact code, just understand the different structures.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download