100 likes | 207 Views
Random Thoughts 2012 (COMP 066). Jan-Michael Frahm Jared Heinly. Excel. Percentile PERCENTILE(array, k) Multi-column sort Highlight all columns that you want to include in sort Select Custom Sort (may be in Home or Data menus depending on version)
E N D
Random Thoughts 2012(COMP 066) Jan-Michael Frahm Jared Heinly
Excel • Percentile • PERCENTILE(array, k) • Multi-column sort • Highlight all columns that you want to include in sort • Select Custom Sort (may be in Home or Data menus depending on version) • Select row that should be used to determine sort
Probability Rules • Probability of event = p • ex. probability of rolling a 1 on a die: p = 1/6 • Probability of event not happening = 1 – p • ex. probability of not rolling a 1: p = 5/6 • Probability of event happening n times in a row = pn • ex. probability of rolling five 1s in a row: p = (1/6)5 • Probability of event happening at least once during n attempts = Inverse of probability of event not happening n times in a row = 1 – (1 – p)n • ex. probability of rolling a 1 at least once in 5 rolls: p = 1 – (5/6)5
Probability Rules • Probability of event happening k times in n attempts • Binomial • Can only add probabilities when you want to know if any one of a set of outcomes occurred and it is impossible for the outcomes to occur at the same time • ex. probability of rolling a 1 or a 2 on a die: p = 2/6
Expected Value Σ • Expected value = probability of event * value of event • Ex: pay $1 to play a game, 10% chance of winning $5, 40% chance of winning $1 • Expected Value = -1 + 0.1 * 5 + 0.4 * 1 = $-0.10
Blood Testing • 1% of people have disease • Need to test 100 samples of blood • Probability that all samples are healthy • What if we pool the blood into 2 sets of 50 each and then test? • What is the expected number of samples that need to be testted? • Can we do better?
Example of Connectivity • There are 5 billion adults in the world. • Assume the average person has 1600 acquaintances and a typical politician like president Obama has 5000 acquaintances • What are the chances that an average person is linked through chance by two connections to the president? • What are the chances that the president is connected to an average person by two connections?
Students in Classes Suppose 68 students take between them 10 different classes. 15 is the maximum class size. Show that there are at least 3 classes attended by at least 5 students each. How to approach the solution with the pigeonhole principle • Select what are the pigeons. • In general you need to select the pigeons to help your outcome. So select them by a desired property. • Here you want to talk about the students and hence you select them as the pigeons.
Students in Class 2) Select the pigeonholes • Setup the pigeonholes in a way that they support your desired properties. Also to use the pigeonhole theorem you need to setup fewer pigeonholes than pigeons. • Here you select the classes as pigeonholes since you want to prove that they have to have a certain number of students in them. 3) Give a rule for assigning pigeons to the pigeonholes. • Note the pigeonhole principle applies to any assignment rule.
Students in Class • If you place 4 students in every class you do not have a single class with 5 or more students. • That means you placed 40 students. • Then there is 28=68 students-40 students left. • Create as few as possible classes with more than 4 students through filling up to the maximal class size. • So add up to 11 more students per class. • So you have at least 3 classes (pigeonholes) above 4 students.