2022-02-09

Feb 9 In-Class Exercise Thread.

Please post your solution to the Feb 9 In-Class Exercise to this thread.
Best,
Chris
Please post your solution to the Feb 9 In-Class Exercise to this thread. Best, Chris

-- Feb 9 In-Class Exercise Thread
Resource Description for Screen Shot 2022-02-09 at 5.16.01 PM.png
((resource:Screen Shot 2022-02-09 at 5.16.01 PM.png|Resource Description for Screen Shot 2022-02-09 at 5.16.01 PM.png))

-- Feb 9 In-Class Exercise Thread
1. Replacing k with n/e in the equation (k/n).(ln(n) - ln(k)), we get ((n/e)/n).(ln(n) - ln(n/e)) = (1/e).(ln(n) - ln(n) + ln(e)) = ln(e)/e = 1/e, as ln(e) = 1
2. Probability of getting the best candidate in first n/e candidates = (1/n).(n/e) = 1/e Probability of getting the worst candidate as last one, given the best candidate occupies one slot = 1/(n-1) Probability of hiring the worst candidate = (1/e).(1/(n-1)) = 1/(e(n-1))
3. 1/n as the probability of getting the worst candidate as the first one is 1/n
(Edited: 2022-02-09)
1. Replacing k with n/e in the equation (k/n).(ln(n) - ln(k)), we get ((n/e)/n).(ln(n) - ln(n/e)) = (1/e).(ln(n) - ln(n) + ln(e)) = ln(e)/e = 1/e, as ln(e) = 1 2. Probability of getting the best candidate in first n/e candidates = (1/n).(n/e) = 1/e Probability of getting the worst candidate as last one, given the best candidate occupies one slot = 1/(n-1) Probability of hiring the worst candidate = (1/e).(1/(n-1)) = 1/(e(n-1)) 3. 1/n as the probability of getting the worst candidate as the first one is 1/n

-- Feb 9 In-Class Exercise Thread
Resource Description for inclass online hiring.jpg
((resource:inclass online hiring.jpg|Resource Description for inclass online hiring.jpg))

-- Feb 9 In-Class Exercise Thread
1) k/n(ln n−ln k), here k=n/e therefore, 1/e * 1 = 1/e
2) 1/n-1 * k/n = 1/n-1 * 1/e
3) 1/n as the probability of finding the worst candidate at first position is 1/n
(Edited: 2022-02-09)
1) k/n(ln n−ln k), here k=n/e therefore, 1/e * 1 = 1/e 2) 1/n-1 * k/n = 1/n-1 * 1/e 3) 1/n as the probability of finding the worst candidate at first position is 1/n

-- Feb 9 In-Class Exercise Thread
1. Plugging in k = n/e into the bound equation of Pr(S) we get:
(n/e)/n * (ln n - ln n/e)
1/e * (ln n - (ln n - ln e))
1/e
This is the odds of hiring the best candidate.
2. To get a lower bound on the odds of hiring the worst candidate, we need to:
a. Get the best candidate from the first k applicants. b. Get the worst candidate at the end given a).
From the first question, the odds of a) is 1/e. The odds of b) is 1/(n-1), since there's only n-1 candidates left. Therefore, a lower bound is 1/e * 1/(n-1).
3. If we randomly permute the candidates and hire the first candidate, the odds of hiring the worst candidate should be 1/n, since each candidate is equally likely to be chosen.
(Edited: 2022-02-09)
1. Plugging in k = n/e into the bound equation of Pr(S) we get: (n/e)/n * (ln n - ln n/e) 1/e * (ln n - (ln n - ln e)) 1/e This is the odds of hiring the best candidate. 2. To get a lower bound on the odds of hiring the worst candidate, we need to: a. Get the best candidate from the first k applicants. b. Get the worst candidate at the end given a). From the first question, the odds of a) is 1/e. The odds of b) is 1/(n-1), since there's only n-1 candidates left. Therefore, a lower bound is 1/e * 1/(n-1). 3. If we randomly permute the candidates and hire the first candidate, the odds of hiring the worst candidate should be 1/n, since each candidate is equally likely to be chosen.

-- Feb 9 In-Class Exercise Thread
1. Plugging in k = n/e will be 1/e*(ln n−ln (n/e)) = 1/e
2. Worst candidate is the very last candidate of the list.That would mean the best candidate is from i=1,...,k. So chances that the best candidate is 1 to n/e is n/e divided by n, which is 1/e. Probability of worst candidate is (1/n - 1) * (1/e), since our worst candidate resides in 1/n, except for where it can’t be the best candidate, making it 1/(n-1).
3. Worst candidate = 1/n, when randomly permuted in the whole sample. It’s similar to if when we randomly permute and try to find the best candidate.
1. Plugging in k = n/e will be 1/e*(ln n−ln (n/e)) = 1/e 2. Worst candidate is the very last candidate of the list.That would mean the best candidate is from i=1,...,k. So chances that the best candidate is 1 to n/e is n/e divided by n, which is 1/e. Probability of worst candidate is (1/n - 1) * (1/e), since our worst candidate resides in 1/n, except for where it can’t be the best candidate, making it 1/(n-1). 3. Worst candidate = 1/n, when randomly permuted in the whole sample. It’s similar to if when we randomly permute and try to find the best candidate.

-- Feb 9 In-Class Exercise Thread
Resource Description for HWEx.jpeg
((resource:HWEx.jpeg|Resource Description for HWEx.jpeg))

-- Feb 9 In-Class Exercise Thread
1. Using the online hiring algorithm and substituting k= n/e into k/n(lnn - lnk) the probability that we choose the best candidate we get (n/e)/n (lnn - ln(n/e)) = 1/e( lnn - lnn +lne) =1/e(loge) which is equal to 1/e.
2. In order to hire the worst candidate there two possible scenarios which should intersect. Firstly the best candidate should be one of the 1 - k members so that the bestscore is at the highest because of which one would wound up choosing the nth candidate. Secondly, the nth candidate should be the worst candidate.
For the best candidate to be present in the first k candidates the probability would be 1/n*k = 1/n*n/e which equals to 1/e. Lastly the probability that the last candidate is the worst one will be equal to 1/(n-1). So the possibility of hiring the worst candidate is 1/e* 1/(n-1) = 1/e(n-1).
3. If we permute and hire the first candidate then the probability of that candidate being the worst would be 1/n.
1. Using the online hiring algorithm and substituting k= n/e into k/n(lnn - lnk) the probability that we choose the best candidate we get (n/e)/n (lnn - ln(n/e)) = 1/e( lnn - lnn +lne) =1/e(loge) which is equal to 1/e. 2. In order to hire the worst candidate there two possible scenarios which should intersect. Firstly the best candidate should be one of the 1 - k members so that the bestscore is at the highest because of which one would wound up choosing the nth candidate. Secondly, the nth candidate should be the worst candidate. For the best candidate to be present in the first k candidates the probability would be 1/n*k = 1/n*n/e which equals to 1/e. Lastly the probability that the last candidate is the worst one will be equal to 1/(n-1). So the possibility of hiring the worst candidate is 1/e* 1/(n-1) = 1/e(n-1). 3. If we permute and hire the first candidate then the probability of that candidate being the worst would be 1/n.

-- Feb 9 In-Class Exercise Thread
Resource Description for in class 2.jpg
((resource:in class 2.jpg|Resource Description for in class 2.jpg))
[ Next ]
X