After one day of using the former, it is easy to come to the conclusion that Windows 7 is still the last version that anyone should run on its merits. Nobody in their right mind appreciates the mess that is Windows 8/10. (This is not Microsoft specific either, as Yosemite is also the last version of macOS that seems worth one’s while. The mobile OS angle has addled the brains of program managers at these companies.)

More egregiously, Windows 10 (Home) is also crippleware. It has disabled a number of features out of the box. No Guest account. No Group Policy Editor*. And hilariously, in what must be an attempt to emulate macOS, it automatically restarts after a system update, but saves no program states, with obvious defective results.

* How do I know it’s crippleware? Because vestiges still remain. You can exhume Group Policy Editor from buried .mum files. While you’re at it turning Windows 10 back into some semblance of Windows 7, wouldn’t you like to also disable Cortana?

]]>Prices for insurance coverage changed as follows:

Value up to $50 is $1.65.

$50.01 to $100 is $2.05.

$100.01 to $200 is $2.45.

$200.01 to $300 is $4.60.

The price per additional $100 of insurance, valued over $300 up to $5,000, is $4.60 plus $0.90 per each $100 or fraction thereof.

Crudely taking the mid-point of each bracket up to $300, we get implied loss rates of 6.6%, 2.73%, 1.63%, 1.84%, respectively. The rate converges asymptotically to $0.90/$100, or 0.9% implied loss. The numbers have such a wide range that it’s worth taking a closer look.

On page 1 of this 2011-2012 report, it is stated that “lost mail volume is estimated at 1.79 percent.” At these 2007 rates (compare gray and orange lines of below figure), paying for insurance is surely uneconomical for anything under ~$100, but has potentially arbitrageable positive expectation for items valued at ~$300 or more. This is surprising.

Interestingly, some of these underpricings have been rectified according to this 2017 document:

Amount for Merchandise Insurance Coverage Desired

$0.01 to $50: $2.10

50.01 to 100: 2.65

100.01 to 200: 3.35

200.01 to 300: 4.40

300.01 to 400: 5.55

400.01 to 500: 6.70

500.01 to 600: 9.15

600.01 to 5,000 (maximum liability is $5,000): $9.15 plus $1.25 per $100 or fraction thereof over $600 in declared value.

These (again, gray and orange lines of below figure) align much more with actual loss rates; still, there is an asymptotic positive expectation for paying for insurance, and in amounts closer to upper bracket limits. Amounts at the lower bracket limits, though, now hug the actual loss rate line, and that may be a part of the pricing decision after all.

What about the high rates on low-value items? That’s probably the result of an embedded per-incidence fixed cost. We can back this out by assuming $50 is the target insured amount for the $0 to $50 bracket for the purpose of pricing fixed costs. One model is to obtain an implied loss rate at $50 to match the asymptotic rate, i.e. insurance cost at $50 = asymptotic loss rate * $50 + fixed cost **(*)**, though this can be used (as we do later) at any target insured amount.

At 2007 prices, this gives $1.2 per insured item as the fixed cost portion, or $1.2/0.9% = $133.33 per incidence. Similarly, at 2017 prices, this gives $1.475 per insured item or $1.475/1.25% = $118 per incidence. These costs seem plausible. Implied loss rates adjusted for such costs are plotted as the blue lines in previous figures.

The last oddity is that Express Mail insurance rates have built-in insurance up to $100. Let’s find out how much that is worth. Using the same, older 2007 document that quotes for Express Mail, we have:

Prices for Express Mail insurance:

The first $100 of value is still provided. Values above $100 are now priced differently than for regular insurance.

Value over $100 up to $200 is $0.75.

$200.01 to $500 is $2.10.

$500.01 to $5,000 is $2.10 plus $1.35 per each $100 or fraction thereof.

The asymptotic loss rate is priced at 1.35% — interesting that Express Mail should have significantly more implied losses than domestic mail overall. Assuming the same $133.33 per incidence fixed cost as for all domestic mail in 2007, but substituting $100 as the target insured amount into (*), we obtain an insurance cost at $100 of $3.15. So there you go, the “true” price table might be:

$0-$100: $3.15

$100-$200: $3.90

$200-$500: $5.25

$500-$5000: $5.25 + $1.35 per each additional $100

This is rather favorable for insured values just under the $500 mark!

]]>You throw a die until you get 6. What is the expected number of throws (including the throw giving 6) conditioned on the event that all throws gave even numbers?

The “obvious” answer is incorrect.

The correct answer can be brute-forced by computing probabilities of this sort:

If \(s\) is a sequence of length \(n\), then

\(P_n\triangleq\) = P(\(s\) ends in 6 and \(s\) all even) = \((2/6)^{n-1} (1/6)\)

(The total probability over all \(n\) is therefore \(Z=(1/6)/(4/6)=1/4\).)

The expected length of \(s\) is \(\sum_{n=1}^\infty n (P_n / Z)\)

\(= \sum_{n=1}^\infty n (2/6)^{n-1} (1/6) / (1/4) = \sum_{n=1}^\infty n (2/6)^{n-1} (2/3) = 3/2\)

This is interesting since premature conditioning on the 3 even sides of a die in every roll produces an (incorrect) expected length of 3.

There is already an elegant and convincing derivation of the correct answer attributed to Paul Cuff if you follow the links from the original article, but here’s an intuitive explanation for why the *incorrect* answer overestimates the expected length in such a way –

Notice that in \(P_n\) the probability \((1/6)\) of obtaining the final 6 has no effect on the expected length. The expected length depends entirely on the shape of \(P_n\) over \(n\). The calculation for the “incorrect” reasoning would have made the sum \(\sum_{n=1}^\infty n (2/3)^{n-1} (1/3) = 3\), and the difference is in the \((2/3)^{n-1}\) vs. \((2/6)^{n-1}\) term. So the existence of 1, 3, and 5 matter; they make longer prefixes of 2 and 4 even less likely, as more of the longer sequences that would have been valid ends up containing a 1, 3, or 5 instead and getting thrown away.

Note: There is also a good discussion on Quora.

]]>Who the heck knows.

I tried to use Android Pay twice today and despite both stores’ VeriFone terminals showing (and processing through the flow as if) they supported it, the success rate was only 50%. Android Pay is NFC-based. The time it succeeded, the phone immediately made contact. The time it failed, there was no semblance of any NFC connection. I know the phone’s NFC works in other contexts, so it is something in the technology (hardware, software) or workflow itself that makes it so unreliable. That is not even to mention the annoyance of Android Pay’s particularly patronizing attitude in requiring the phone to be unrooted and requiring a screenlock (even a perfectly insecure one) to be set. If any of those conditions fail for even five minutes, all the added cards are removed and have to be re-added (some banks require calling in for verification).

My point is nobody is going to use this idiotic piece of technology that makes things harder.

But mobile payment is not new. More than five years ago, a company called LevelUp started putting in QR-code based readers around town and having used it, it just works much better.

Not only was the technology potentially compatible with all devices with a display (that is all phones), it’s obviously much cheaper to implement. Even the reader hardware is not strictly necessary as the code can be read from another phone’s camera. In the backend, the charges are aggregated and go to a user-registered card just like any merchant billing. The problem has been practically solved long ago. There was no pressing need to go to an NFC-based solution except for, *maybe*, accessory devices like watches. Even then…

In comparison, LevelUp has simply worked every single time without fail, and the app even tells you where you can use it. Their business model is also much more symbiotic with the merchant — they take a proportion of revenue resulting from repeat visits and promotions made through LevelUp — rather than middle-manning as a transactional *Pay processor might typically be. It is really incomprehensible to me that LevelUp has not caught on more.

All the while, there is no shortage of other quixotic ideas like Coin and Samsung Pay to try to square the circle, in those cases, through magnetic stripe emulation.

]]>- Uninstall Xposed Framework
- Uninstall Busybox
- Fully unroot (not only uninstall)

Root is required to uninstall the first two.

]]>First, let us assume that redeeming for the primary intended product is liquid for the holder, e.g. if we’re talking about miles then suppose we do indeed travel a lot; otherwise all sorts of discounts due to time value of money, depreciation, and illiquidity would have to be taken into account. Let us focus on the market of airfare. Let us suppose there is a suitable notion of substitutable fares (e.g. a fairly reasonable one might be: If two flights have the same starting and ending locations, the same number of stops, and are within one hour in total duration, starting, and ending time, then they are substitutable.).

Then suppose Airline A has a fare of $380, which may also be bought with 15800 Airline A points and $5.60 in fees, while Airline B has a substitutable fare of $250, which may be bought with 12500 Airline B points and $20 in fees, and Airline C has a substitutable fare of $227, and these form the entire set of substitutable fares. A naïve so-called “Mileage Blogger” may say that

- Airline A points are worth $380/15800 = 2.41 ¢/pt while
- Airline B points are worth $250/12500 = 2.00 ¢/pt.

A slightly more astute but no less naïve so-called “Mileage Blogger” may say that

- Airline A points are worth ($380-$5.60)/15800 = 2.37 ¢/pt while
- Airline B points are worth ($250-$20)/12500 = 1.84 ¢/pt.

But really, the valuation of Airline A points is ($227 – $5.60)/15800 = 1.40 ¢/pt while the valuation of Airline B points is ($227 – $20)/12500 = 1.66 ¢/pt. Note here we take the **minimum** of the set of substitutable fares, regardless of which airline it is from, and deduct the point redemption fees to obtain cash value.

This equally applies to the much beloved high-value redemptions for First Class international fare, where claimed valuations of 3 ¢/pt, 5 ¢/pt, and other outrageous numbers are seen. Are these valuations real? Well no. First of all there is often no two-sided market for these fares, as there is either no demand for the cash prices, or there is no supply for the point redemption. It is indicative of a much lower than claimed valuation from simple “award chart” calculations. In this case, the lower substitutable fare is often in the travel agency market. The valuation can also be bounded from prices in underground secondary markets, where eventual high value redemptions are the norm. Cash prices for a variety of points range between 1.4 ¢/pt to 1.6 ¢/pt, rarely going much higher. (Some points are inherently doubled of halved in nominal value, adjust accordingly.) Even taking into account the spread by the scalper (ahem, agent), these are likely closer to the upper bound than fanciful imaginations.

If we had actual airfare sales volume data, it would be easy to aggregate all fares into equivalence classes by substitutability, calculate valuations, and apply weighting according to volume. This would give a trade weighted currency value. Without this, one could conduct a survey into the type of “trades” that would make up one’s “basket” in any given year and figure out the personal value of all the points out there. After all, the paper value of a trade that would never occur — viz. a fare that one would or could never obtain — is completely meaningless.

]]>I ran this test using two sets of fairly wideband headphones and got results that were consistent across headphones but different between an HP laptop and a MacBook. The headphones were rated, respectively: (1) 15 – 20,000 Hz, 47 Ω input impedance; and (2) 15 – 24,000 Hz, 35 Ω input impedance. On the HP laptop with “IDT High Definition Audio” (92HD93 chip), I could hear a range from 30 Hz to 18 kHz. On the MacBook Pro with mid-2014 hardware, I could hear a range from 20 Hz to 16 kHz. I was quite surprised at the magnitude of this difference. A headphone amplifier (e.g. one built into the headphones) driven by digital input would eliminate this difference.

]]>Suppose the deductible is \(d\), and the price and coinsurance of the \(i\)-th procedure performed are \(p_i\) and \(c_i\) respectively, then the total out-of-pocket cost is:

\(d + (p_1 – d) c_1 + p_2 c_2 + \cdots = (1-c_1) d + \sum_i p_i c_i\)The second term is fixed cost; it’s the coinsurance on the first procedure that matters. This shows that to minimize out-of-pocket cost, one should, somewhat surprisingly, get the procedure with the **highest** coinsurance first. Essentially, every dollar of the deductible paid is subsidizing what the insurance company might have paid, but for a procedure with very high coinsurance, the subsidy is not very much to begin with.

But as far as full-system backup and restore options go, you either have to root your system and use Nandroid or Titanium to backup to the phone storage itself, or you have to rely on *adb backup*. adb is Android Device Bridge, something that is accessed through the Developer Mode on Android. It feels like Google has given up on this feature midway through and just left it flopping around, because it simply does not work. Although I haven’t had trouble getting backup to work (‘adb backup -apk -shared -all -f [file]‘), I could not get restore (‘adb restore [file]‘) to work automatically because of this bug (which incidentally is also obsoleted).

It turns out you need to get into Settings->Apps and kill as many running processes as you can, and then while restore is going on, monitor through *adb shell* and *logcat | grep Backup*, and continuously *pm disable* a number of running processes including com.google.android.googlequicksearchbox, com.google.android.plus, com.google.android.music, or whatever else restore is stuck on. If you’re lucky, the restore process finally “finishes” and half of your apps and data are restored, while the rest are either not installed, or installed as some old OS-default version, including Google’s own apps like Talk, Maps, etc. on account of Google Play services not being restored. Yeah, thanks, Google!