Each Wednesday I post a list of notes on some topic. This week it’s probability.
Last week: Python resources
Next week: Regular expression resources
Mathematical tools such as Bayesian analysis and differential equations allow you to combine your intuition and data to make better decisions.
For over twenty years, I have created and implemented mathematical models to solve problems in business, science, and engineering. Some areas of application include risk assessment, adaptive clinical trial design, computer hardware reliability, and software optimization.
Projects can fail because no one knows each of the pieces well enough to bring them all together.
My role on projects has often been to be the interpreter and integrator. I bring different areas of math together to solve problems. I bring math and software together to implement solutions, and I bring people together by interpreting between scientists, software developers, and business leaders.
I speak the native language of engineers and can communicate technical information to a wider, non-technical audience.
For example, I have helped lawyers understand and convey probability. I have helped salesmen understand what scientific articles are saying about their product and how they can convey that information to customers. I have helped business understand and mitigate risks.
Here are some of the photos I took on my travels last year.
Bicycles on the Google campus in Mountainview, California:
Sunrise at Isle Vista, California:
View from University of California Santa Barbara:
Reflection of the Space Needle in the EMP museum in Seattle, Washington:
Paradise Falls, Thousand Oaks, California:
Bed and breakfast in Geldermalsen, The Netherlands:
Amsterdam, The Netherlands:
Chinatown in San Francisco, California
In the novel Chasing Shadows the bad guys have built a time machine named Magog.
“The bottom line is this. And it is hard for me to believe. They are going to use Magog to bring someone back from the past.”
Jack did not blink or move. His heart was beating very quickly now, but he merely said wryly, “Yes? Who are they going to bring back? Tell me it is John Coltrane.”
“You are never really serious are you?”
“I’m very serious about my music. Why are bad guys always bringing back people that everyone was glad to see go the first time? We could use more Coltrane …”
Related post: Nunc dimittis
From Zero to One:
Eroom’s law — that’s Moore’s law backward — observes that the number of new drugs approved per billion dollars spent on R&D has halved every nine years since 1950.
Update: Here’s an article from Nature that gives more details. The trend is pretty flat on a log scale, i.e. exponentially declining efficiency.
Here are the top five posts from this blog for 2014:
Be sure to read the comments on the last post.
A string of bits is called primitive if it is not the repetition of several copies of a smaller string of bits. For example, the 101101 is not primitive because it can be broken down into two copies of the string 101. In Python notation, you could produce 101101 by
"101"*2. The string 11001101, on the other hand, is primitive. (It contains substrings that are not primitive, but the string as a whole cannot be factored into multiple copies of a single string.)
For a given n, let’s count how many primitive bit strings there are of length n. Call this f(n). There are 2n bit strings of length n, and f(n) of these are primitive. For example, there are f(12) primitive bit strings of length 12. The strings that are not primitive are made of copies of primitive strings: two copies of a primitive string of length 6, three copies of a primitive string of length 4, etc. This says
and in general
Here the sum is over all positive integers d that divide n.
Unfortunately this formula is backward. It gives is a formula for something well known, 2n, as a sum of things we’re trying to calculate. The Möbius inversion formula is just what we need to turn this formula around so that the new thing is on the left and sums of old things are on the right. It tells us that
where μ is the Möbius function.
We could compute f(n) with Python as follows:
from sympy.ntheory import mobius, divisors def num_primitive(n): return sum( [mobius(n/d)*2**d for d in divisors(n)] )
The latest version of SymPy, version 0.7.6, comes with a function
mobius for computing the Möbius function. If you’re using an earlier version of SymPy, you can roll your own
from sympy.ntheory import factorint def mobius(n): exponents = factorint(n).values() lenexp = len(exponents) m = 0 if lenexp == 0 else max(exponents) return 0 if m > 1 else (-1)**lenexp
The version of
mobius that comes with SymPy 0.7.6 may be more efficient. It could, for example, stop the factorization process early if it discovers a square factor.
Ever wonder what the rules were for when to use thou, thee, ye, or you in Shakespeare or the King James Bible?
For example, the inscription on front of the Main Building at The University of Texas says
Ye shall know the truth and the truth shall make you free.
Why ye at the beginning and you at the end?
The latest episode of The History of English Podcast explains what the rules were and how they came to be. Regarding the UT inscription, ye was the subject form of the second person plural and you was the object form. Eventually you became used for subject and object, singular and plural.
The singular subject form was thou and the singular object form was thee. For example, the opening lines of Shakespeare’s Sonnet 18:
Shall I compare thee to a summer’s day?
Thou art more lovely and more temperate.
Originally the singular forms were intimate and the plural forms were formal. Only later did thee and thou take on an air of reverence or formality.
Unicode often counts the same symbol (glyph) as two or more different characters. For example, Ω is U+03A9 when it represents the Greek letter omega and U+2126 when it represents Ohms, the unit of electrical resistance. Similarly, M is U+004D when it’s used as a Latin letter but U+216F when it’s used as the Roman numeral for 1,000.
The purpose of such distinctions is to capture semantic differences. One example of how this could be useful is increased accessibility. A text-to-speech reader should pronounce things the same way people do. When such software sees “a 25 Ω resistor” it should say “a twenty five Ohm resistor” and not “a twenty five uppercase omega resistor,” just as a person would. 
Making text more accessible to the blind helps everyone else as well. For example, it makes the text more accessible to search engines as well. As Elliotte Rusty Harold points out in Refactoring HTML:
Wheelchair ramps are far more commonly used by parents with strollers, students with bicycles, and delivery people with hand trucks than they are by people in wheelchairs. When properly done, increasing accessibility for the disabled increases accessibility for everyone.
However, there are practical limits to how many semantic distinctions Unicode can make without becoming impossibly large, and so the standard is full of compromises. It can be quite difficult to decide when two uses of the same glyph should correspond to separate characters, and no standard could satisfy everyone.
 Someone may discover that when I wrote “a 25 Ω resistor” above, I actually used an Omega (Ω, U+03A9) rather than an Ohm character (Ω, U+2126). That’s because font support for Unicode is disappointing. If I had used the technically correct Ohm character, some people would not be able to see it. Ironically, this would make the text less accessible.
On my Android phone, I can see Ω (Ohm) but I cannot see Ⅿ (Roman numeral M) because the installed fonts have a glyph for the former but not the latter.
This post first appeared on Symbolism, a blog that I’ve now shut down.
I’ve been going through my old blog posts and fixing a few problems. I found a few missing images, code samples that had lost their indentation, etc. Most of the errors have been my fault, but some were due to bugs in plug-ins.
If you see any problems with a post, please let me know. You could send me an email, or leave a comment on the post. (For a while I had comments automatically turn off on older posts, but I’ve disabled that. Now you can comment on any post.)
For the first couple years, this blog didn’t have many readers, and so not many people pointed out my errors. Now that there are more readers, I find out about errors more quickly. But I’ve found some egregious errors in some of the older posts.
Thanks for your contribution to this blog. I’ve been writing here for almost seven years, and I’ve benefited greatly from your input.