I'd like to know if it's possible to calculate the odds of winning a game of Minesweeper (on easy difficulty) in a single click. This page documents a bug that occurs if you do so, and they calculate the odds to around 1 in 800,000. However, this is based on the older version of Minesweeper, which had a fixed number of preset boards, so not every arrangement of mines was possible. (Also the board size in the current version is 9x9, while the old one was 8x8. Let's ignore the intermediate and expert levels for now - I assume those odds are nearly impossible, though a generalized solution that could solve for any W×H and mine-count would be cool too, but a lot more work I'd think.) In general, the increased board size (with the same number of mines), as well as the removal of the preset boards would both probably make such an event far more common.
So, assuming a 9x9 board with 10 mines, and assuming every possible arrangement of mines is equally likely (not true given the pseudo-random nature of computer random number generators, but let's pretend), and knowing that the first click is always safe (assume the described behavior on that site still holds - if you click on a mine in the first click, it's moved to the first available square in the upper-left corner), we'd need to first calculate the number of boards that are 1-click solvable. That is, boards with only one opening, and no numbered squares that are not adjacent to that opening. The total number of boards is easy enough: $\frac{(W×H)!}{((W×H)-M)! ×M!}$ or $\frac{81!}{71!×10!} \approx 1.878×10^{12}$. (Trickier is figuring out which boards are not one-click solvable unless you click on a mine and move it. We can maybe ignore the first-click-safe rule if it over-complicates things.) Valid arrangements would have all 10 mines either on the edges or far enough away from each other to avoid creating numbers which don't touch the opening. Then it's a simple matter of counting how many un-numbered spaces exist on each board and dividing by 81.
Is this a calculation that can reasonably be represented in a mathematical formula? Or would it make more sense to write a program to test every possible board configuration? (Unfortunately, the numbers we're dealing with get pretty close to the maximum value storable in a 64-bit integer, so overflow is very likely here. For example, the default Windows calculator completely borks the number unless you multiply by hand from 81 down to 72.)