You are on page 1of 8

Homework 2

James Yang jamesyan@andrew.cmu.edu October 10, 2013

Question 1 (a) Consider vertex v s decision about which behavior to choose. Let fA be the fraction of v s neighbors that decide to choose behavior A. In order for v to decide on A, it must be the case the benet of choosing A is greater than the benet of choosing B . Thus afA + x(1 fA ) > b(1 fA ) + xfA . Then afA + bfa 2xfA > b x. So (a + b 2x)fA = b x. We nd that fA > bx bx , which means the threshold is a + b 2x a + b 2x

(b) Consider vertex v s decision about which behavior to choose. Let fA be the fraction of v s neighbors that decide to choose behavior A, fB be the fraction of v s neighbors that decide to choose B , and fC be the fraction of v s neighbors that decide to choose C . In order for v to decide on A, it must be the case the benet of choosing A is greater than the benet of choosing B or C . Benet of choosing A is afA , for B it is bfB and for C it is fC (a + b)/2. So afA > bfB and afA > fC (a + b)/2 Note that fB and fC are each maximized when the other is 0 and can each have maximum value 1 fA Now we case on whether a > b. Case 1: a > b If a > b then the average of a and b is greater than b. Thus the maximum possible value of fC (a + b)/2 is higher than the maximum possible value of bfB . The max possible value of fC (a + b)/2 occurs when fC = 1 fA Thus we solve the inequality afA > (1 fA )(a + b)/2 1

So then 2aFA > a + b afA bfA Next fA (3a + b) > a + b Thus fA > (a + b)/(3a + b) Case 2: b a Since b a, the average of b and a is less than or equal to b. Thus the maximum possible value of fC (a + b)/2 is lower than the maximum possible value of bfB . The max possible value of bfB occurs when fB = 1 fA Thus we solve the inequality afA > b(1 fA ) So afA > b bfA Then (a + b)fA > b Thus fA > b/(a + b) Thus we conclude that in the case of a > b, the threshold has lower bound (a + b)/(3a + b) while if a b, the threshold has lower bound b/(a + b).

Question 2 A set of attributes used to identify people will be able to uniquely identify more people if it has more possible values. This is sort of a like a hash table trying to avoid collisions (essentially non unique identication). The size of the has table is the number of possible value assignments for the attributes. The more possible value assignments, the more likely you can uniquely identify. Lets consider how many value assignments there are for (Date of birth, gender, zipcode) versues (F.I, L.I, Gender, Day of birth, hour of birth). For the rst set of assignments we have 365 days, about 100 years (of people who are alive), two choices for gender, and 41,789 zipcodes according to google. Multiplying them together we get 3050597000 possible assignments. For the second set of assignments we have 26 options for rst initial, 26 for last initial, 2 for gender, 365 for day of birth, and 24 for hour of birth. Multiplying them together we get 11843520 possible assignments which is signicantly less than the number of possible assignments for (date of birth, gender, zipcode). Thus we conclude that (date of birth, gender, zipcode) can uniquely identify more of the population than can (F.I, L.I, Gender, Day of birth, hour of birth). Since (date of birth, gender, zipcode) uniquely identify less than 90% of the population, so does (F.I, L.I, Gender, Day of birth, hour of birth), so the claim is false.

Question 3 Factor 0.5: (False: 999, True: 0) Factor 1: (False: 621, True: 378) Factor 2:(False: 3, True: 996)

Question 4 P r[Y es]P r[+|Y es] P r[Y es]P r[+|Y es] = . P r[+] P r[N o]P r[+|N o] + P r[Y es]P r[+|Y es] P r[Y es](2/3) 2P r[Y es] = P r[N o](1/3) + P r[Y es](2/3) P r[Y es] + 1

(1) P r[Y es|+] =

In case 1. P r[Y es|+] =

In case 2. P r[Y es|+] =

P r[Y es](11/21) 11P r[Y es] = P r[N o](10/21) + P r[Y es](11/21) P r[Y es] + 10

(2) For case 1: P r[Y es|+]/P r[Y es] = 2 : P r[Y es] + 1

Max 2.0, min around 1.0. This is maximized when the probability of yes is low and minimized when it is high. The graph shows up how many times more likely a person is to have said yes given we see a +, based on dierent probabilities of yes. We see that at low probabilities of yes, seeing a + makes much more certain that does seeing a + when there is a high probability of yes. P r[Y es|+] P r[Y es] = 2P r[Y es] P r[Y es]: P r[Y es] + 1

Min: 0 max around 0.18. Maximized near when Pr[Yes] = 0.5. This graph shows how much certainty we gain about whether a person said yes, when we nd out they showed a + card for dierent probabilities of yes. So we see that we gain more certainty when the pr of yes is close to 0.5 and much less when the pr is high or low. P r[Y es|+]/P r[Y es] = 11 : P r[Y es] + 10

Max: 1.10, min: 1.0. Maximized when the probability of yes is low and minimized when it is high. The graph shows up how many times more likely a person is to have said yes given we see a +, based on dierent probabilities of yes. We see that at low probabilities of yes, seeing a + makes us around 1.1 times more certain, while seeing a + when there is a high probability of yes hardly makes us more certain. P r[Y es|+] P r[Y es] = 11P r[Y es] P r[Y es]: P r[Y es] + 10

Min: 0, Max: around 0.025. This graph shows how much certainty we gain about whether a person said yes, when we nd out they showed a + card for dierent probabilities of yes. So we see that we gain more certainty when the pr of yes is close to 0.5 and much less when the pr is high or low. We notice that compared to the case 1 graph for this function, the values are much lower. Essentially we gain much less information about whether a person actually said yes or no. (3) We want to pick the value of Pr[Yes] so that the chance of getting 75+ cards and 25- cards is maximized. We want to nd y such that P r[75+, 25 |(P r[Y es] = y )] is maximized. Given that P r[Y es] = y , we need to nd the probability that an individual submits a +. P r[+] = P r[+|N o]P r[N o] + P r[+|Y es]P r[Y es] = (1/3)(1 y ) + (2/3)(y ) = (y + 1)/3 and lets call this probability r. Now that we know this P r[75+, 25 |(P r[Y es] = y )] = distribution. We try to maximize this expression. Since r75 (1 r)25 .
100 75 100 75

r75 (1 r)25 based on the binomial

is a constant we can ignore that and maximize

We take the log of that expression (which will be maximized at the same value of r that maximizes the function) so we get 25(log (1 r) + 3log (r)) = 25log ((1 r)r3 ) by log rules. We note that the constant 25 doesnt matter and that maximizing the inside of the log function will maximize the log. Thus we try to maximize (1 r)r3 . Taking the derivative we get r2 (4r 3) and get roots of 0, 3/4. Plugging in 0 yields 0 while

plugging in 3/4 to the equation yields 27/256, so 3/4 maximizes the expression. Now that we know r, we solve for y : (1/3)(1 y ) + (2/3)(y ) = (y + 1)/3 = r = 3/4, but we get a y value of 5/4 which is clearly impossible and this happened because we did not restrict the values of y while maximizing. Now we claim that y = 1 maximizes P r[75+, 25 |(P r[Y es] = y )]. This is because since r = (y + 1)/3, r increases as y increases. And (1 r)r3 increases in the range r = 0, 3/4 which corresponds to the y range of 1, 5/4. Thus (1 r)r3 as y increases as long as y is in the range 1, 5/4. Then the log expression we wrote earlier must increase for y in the range of 1, 5/4, since the expression inside the log increases. Finally the original expression range y from 1, 5/4.
100 75

r75 (1 r)25 must be increasing since its log is increasing in the

75 25 = P r [75+, 25 |(P r [Y es] = y )] with is achieved with Thus the maximum value of 100 75 r (1 r ) y = 1 since that is the highest possible probability of Yes. 1, 5/4

(4) Both schemes reveal a small amount of information while ensuring that you can never be sure if a person said yes or no. Scheme 1 reveals a larger amount of information (given that there is a + you know there is a signicantly higher chance of you having said yes at most you can know that the person is 2 times more likely to have said yes). On the other hand scheme 2 reveals a small amount of information (at most you nd out that the person is 1.1 times more likely to have said yes). Both schemes reveal more information when P r[Y es] is around 0.5, and much less information when P r[Y es] is very high or low (since you would already be pretty certain about whether a person said Yes or not based on the overwhelmingly one sides true distr. But there is a trade o: since scheme 2 reveals less info, it also is more dicult for us to get an idea of the true probability of Yes with scheme 2. This is because the with scheme 1 the Pr of + changes a great deal based on whether the person chose yes or no (changes by 1/3). For scheme two the dierence between yes and no only changes the Pr of + by (1/21). Thus with a large dierence in probabilities like (1/3), dierent amounts of yes and nos will greatly change our results and thus looking at these results we can more easily infer the true distr. But with a small dierence like (1/21) the number of yes and nos will change our results only minimally, so it will be hard to tell from the results what the true distr is.

Now lets consider what happens if we have very extreme P r[Y es] versus P r[Y es] near 0.5. In the extreme case, there will be very few yes or nos and so they will have a very small inuence on our results. Thus it would be very hard to tell whether a small dierence in results was the cause of chance or actually because a certain small number of people said yes or no. Also for low probabilities, (ex true probability of P[true] = 0.01) then if our estimate is o by 0.01 then we are o by 100% from the true value. Meanwhile near the middle of the distribution we can be o by much more and only have a small % error.

You might also like