Category Archives: Miscellaneous

The Kendall Tau Distance For Permutations Example C# Code

Suppose you have a permutation p1 = (0, 2, 4, 1, 3) and a second permutation p2 = (4, 0, 3, 2, 1) and you want to know the distance/difference between them. The Kendall Tau distance between two permutations is … Continue reading

Posted in Miscellaneous | Leave a comment

Chi-Square From Scratch Using Python

One night I just couldn’t fall asleep so to kill time productively I decided to implement chi-square from scratch using Python. The term “chi-square” has multiple related meanings. There is a chi-square test that compares a set of observed counts … Continue reading

Posted in Miscellaneous | Leave a comment

Why Proving Computer Program Correctness Isn’t Usually Practical

I think I first learned about mathematical proofs in my high school geometry class. We learned how to prove that two triangles are congruent using the side-angle-side theorem (“If two sides and the included angle of one triangle . . … Continue reading

Posted in Miscellaneous | Leave a comment

The Gamma Function Implemented using C#

The mathematical Gamma function appears in many areas of classical statistics and numerical programming. There are many ways to think about what the Gamma function is. I usually think about Gamma(n) as a function that equals Factorial(n-1) where n can … Continue reading

Posted in Miscellaneous | Leave a comment

Computing Area Under the Standard Normal Distribution with C# and Python

I work mostly with machine learning algorithms but I sometimes revert to classical statistics. A common task is computing the area under the standard Normal (aka Gaussian aka bell-shaped) distribution. The standard Normal distribution is a Normal distribution that has … Continue reading

Posted in Miscellaneous | Leave a comment

Magnus Carlsen Retains World Chess Championship Title 2021

Magnus Carlsen retained his world chess championship title by defeating challenger Ian Nepomniachtchi. The final score was 7.5 to 3.5 in favor of Carlsen. Carlsen won 4 games and lost 0. There were 7 draws. Nepomniachtchi, age 31, is a … Continue reading

Posted in Miscellaneous | Leave a comment

Good Genie and Bad Genie: One of the Most Interesting Interview Questions I’ve Seen

A colleague of mine sent me an interesting technical interview question. It goes something like the following. I’ve changed the vocabulary a lot so that I don’t expose the question to an Internet search. (The actual interview question involved a … Continue reading

Posted in Miscellaneous | Leave a comment

The Effects of COVID-19 on Business Collaboration on Pure AI

I contributed to an article titled “The Effects of COVID-19 on Business Collaboration” in the October 2021 edition of the online Pure AI web site. See https://pureai.com/articles/2021/10/04/covid-business-collaboration.aspx. A group of Microsoft analysts investigated how work collaboration patterns at their company … Continue reading

Posted in Miscellaneous | Leave a comment

A Quick Look at Azure Functions

I was working on a project that uses Azure Functions. An Azure Function is an example of (the wildly misnamed) “serverless technology”. An Azure Function lives in the Cloud, accepts HTTP requests, and gives an HTTP response. I hadn’t used … Continue reading

Posted in Miscellaneous | Leave a comment

Maverick Poker Solitaire and Combinatorics

I watched an episode of an old TV Western show called “Maverick” recently. The episode was titled “Rope of Cards” (1958). Bret Maverick, played by actor James Garner (1928-2014) is a roguish gambler has all kinds of adventures in the … Continue reading

Posted in Miscellaneous | Leave a comment