• Welcome to the new Internet Infidels Discussion Board, formerly Talk Freethought.

More probability puzzles

If you want to see how close a roulette wheel is to a uniform distribution you would have to count the number of times the ball ends up in each slot for a lot of trials.

Even if there are small differences of the counts and you knew them would it be enough to come out ahead?

If you stand around a casino roulette table recording counts on paper or on a hand held device you would undoubtedly get the attention of the casino.
 
Coded a roulette game on programming thread.
 
Put the numbers of the roulette wheel slots on small balls and put them in a box. Shale thoroughly, reach in and pick a ball.

Is there any statistical difference between that and dropping a ball on a spinning roulette wheel?

I'd say no. Place a bet and the odds of winning are the same both ways.

Agree or disagree?
 
A new problem.


There are patterns that repeat on a roulette wheel. On a roulette wheel what is the probability of the sequence 7,3,6 8 occurring?

You are at a table and you see the sequence 7, 3, 6 occur. Knowing the probability of 7,3,6,8 occurring would you bet on the next number being 8? What would be the probability?
 
I am shocked -- SHOCKED -- to find that no gambling is going on here in the gambling thread!

All three problems that I posed -- I, II and III -- are rather easy (though not as easy as the "Mickey Mouse problems"). I am disappointed -- if not actually SHOCKED -- that nobody has made an effort.

I. Pick a card, any card.

Place a $100 bet on the table; Shuffle an ordinary deck (26 red cards and 26 black cards). and keep it face-down. You will go through the cards one-by-one, keeping the card's color hidden until you announce. For each card announce either "Inspect" or "Red!"; then turn the card over to expose its color.

You must say "Red!" exactly once during this process. (If you "Inspect" 51 times in a row, you are required to select the final card.) If the chosen card is Black you lose your $100. If Red, you're paid $100 for a $200 total.

What is your best strategy? For example, if you say "Inspect, Inspect, Inspect" and the first three cards are Black do you call "Red!" next (the odds are on your side) or do you "Inspect" another hoping that the odds improve even further?

Please hide your solutions in Spoiler tags.

Suppose that at ____ _____ you ______ to ___ say "Red!" You _____ as ____ ____ _____ the ____ ____: the next card ___ ___ ____ ____ ___ ____ unseen ___ ________ ______ __ __ red. More _________ you ___ as ____ ______ pick the ____ ____. __, _____ ___ unseen _____ ___ ________ ______, ____ the _____ ____. __ ___ ____ ____, ________.
This is only a partial spoiler -- I've left out some words.

II. I need a fix!

You have $100 but the man in the coon-skin cap in a pig pen wants $200 for your fix of Foximoxijox. You need that fix; you need it NOW. You happen to be in a casino near a roulette wheel. Parlaying the $100 into $200 on that wheel is your only option. $199 would be of no use to you. No, you can't go looking for a Twenty-One game or a Craps table. It's Roulette or nothing....
How should you bet? Does it matter?
It would be better to find a favorable game and double your money 52% of the time rather than 48% of the time, but to focus on that triviality is to miss the whole point. You have a 100% chance of dying quickly if you don't come up with $200 to satisfy the man in the coon-skin cap.

Start with an easier problem:

Which gives the better chance of quadrupling your bankroll?
(A) Bet it all on Red and let it ride once if you win.
(B) Bet it all on 1-9, succeeding immediately if one of those nine numbers shows.
(C) Options (A) and (B) give equal chance.

When you've solved this, take another look at Problem II.

III. Betting on the Super Bowl

There are 32 teams that might win the Super Bowl, so we will say that the future is partitioned into 33 possibilities: E1, E2, E3, E4, ... , E33. I've added a 33rd case, "None of the above" to accommodate weirdnesses and ensure we have a perfect partition. Your task will be to determine the bets B1, B2, B3, B4, ... , B33 you should place to maximize your risk-adjusted reward.

Warren Buffett once offered $1 billion to anyone who guessed the NCAA men's basketball tournament perfectly, so we'll impose on him again to fashion this betting problem. Both he and you each come up with 33 probability guesses p1, p2, p3, p4, ... , p33 where pk is the guessed probability that team #k will win the Super Bowl. (To avoid confusion Buffett's estimates will be denoted q1, q2, ... rather than p1, p2...) Buffett reveals his final estimates BEFORE you finalize yours, so you're free to use his expertise to modify your own guesses. Buffett's 33 probabilities must sum to exactly 1. The same constraint applies to yours.

Buffett offers to accept wagers without vigorish or commission. If he judges Dallas to be 25% to win, he offers 3:1 odds. If you spend $10 for a Dallas "ticket" the ticket will be worth $40 if Dallas wins. More generally, Buffett offers (1-q) : (q) for any event whose likelihood he judges to be q.

If your probability estimates are exactly the same as Buffett's you may as well buy no tickets at all. Instead you'll be trying to exploit the flaws in Buffett's estimates. Assume that you have total confidence in your own probability estimates.

You have $10,000 in cash to bet; assume that's all the wealth you have in the world. After you place your bets, and the NFL season and Super Bowl play out, all but one of your tickets will be worthless. You'll have A dollars where A is the value of your winning ticket (if any) plus the change left over if you didn't spend the entire $10,000 on tickets. Your goal is to maximize the Expected Value of the Logarithm of A. (This is the same as maximizing the "weighted geometric mean" of the various outcomes.) Note that this is different than many betting puzzles where the goal is to maximize the expected value of A itself (or the weighted arithmetic mean). However this is NOT a perverse objective. This criterion for reward-vs-risk is well-known, and is often called the "Kelly Criterion." It is associated with John L. Kelly Jr. and, centuries earlier, with Daniel Bernoulli.

III.
Instead of 33 separate outcomes, suppose there are just two (Yes and No). Solve that and extrapolation to 33 cases will be easy. You may need one dF=0 calculus working, but it's easy high-school calculus.

This is a very elegant problem with an elegant, rather easily-derived solution. Yet, AFAIK the problem and its solution are little-known. (Can Google find them?)
 
Swami

Your problems are all the same basic probability theory.

The problem I have is interpreting your problem statements. Maybe it is a language issue.

Th NFL problem sounds like gibberish. I know calculus and probity theory. When you say maximize I assume you mean the 1st and 2nd derivative tests.

In the Maximum Likelihood Method you take the derivative of the probability density function, and solve for 0 tog et the expected value. Applied to a normal distribution the expected value is the arithmetic mean. The expected value of the exponetial distribution is not the mean calue.

Your NFL problem is indecipherable. Since the beginning of modern pro sports in the 19th people have tried to come up with predicable math.

Today it is called analytics. Large scale computerized analysis of a large number of variables and data. A lot of it subjective. Teams use analytics to evaluate opponents and sports books use analytics to set game odds.
 
A new problem.


There are patterns that repeat on a roulette wheel. On a roulette wheel what is the probability of the sequence 7,3,6 8 occurring?

You are at a table and you see the sequence 7, 3, 6 occur. Knowing the probability of 7,3,6,8 occurring would you bet on the next number being 8? What would be the probability?
More hand waving and misdirection.

The probability of any spin is 1/38.
 

My friends call me Swammi. Doubled M.

Your problems are all the same basic probability theory.

So, can you solve any of them?

The problem I have is interpreting your problem statements. Maybe it is a language issue.

Th NFL problem sounds like gibberish. I know calculus and probity theory. When you say maximize I assume you mean the 1st and 2nd derivative tests.

In the Maximum Likelihood Method you take the derivative of the probability density function, and solve for 0 tog et the expected value. Applied to a normal distribution the expected value is the arithmetic mean. The expected value of the exponetial distribution is not the mean calue.

Your NFL problem is indecipherable. Since the beginning of modern pro sports in the 19th people have tried to come up with predicable math.

Today it is called analytics. Large scale computerized analysis of a large number of variables and data. A lot of it subjective. Teams use analytics to evaluate opponents and sports books use analytics to set game odds.

The problem is purely abstract. The "NFL" was just to add a bit of color and show how the problem might relate to real-world gambling decisions. I simplified it down to a Yes/No choice. What question the Yes/No is in response to is irrelevant. All we want is to go from probability estimate, to optimal bets.

To "maximize N over a tuple of parameters" means to find the parameter(s) which produce a N at least as large as any other choice of parameter(s).
 
You post a problem cobbled together from fragments you find on the net, and you praise yourself for being clever, You get upset if nobody thinks it is clever and act superior even though you got it from the net.

I will go back to not responding to your math problems.
 
You post a problem cobbled together from fragments you find on the net, and you praise yourself for being clever, You get upset if nobody thinks it is clever and act superior even though you got it from the net.

I will go back to not responding to your math problems.

Steve baby, my patience is wearing very thin. Your whines are ludicrous. You do not know whom you are insulting.

I have published several peer-reviewed journal articles, two books and a newspaper column! I have over 30 U.S. patents. (That doesn't include foreign patents and CIPs.) I have scored 99.998 percentile on contests and standardized tests. Decades ago I was called "the best microprogrammer in Silicon Valley." If I mentioned specific bullets from my resume, Google or Wikipedia would quickly lead you to my real-life identity.

You, on the other hand, post code to print "Hello, world" -- or something equally trivial -- and marvel at it like a toddler who's been given a shiny new hammer.

Your posts about the problems I posed in this thread are non-sensical.

You construct lies about me. I'll show just one specific example:

Over two years ago or so I posted what I thought was an interesting way to multiply two non-negative numbers, a and b.

Back in the 20th-century I was a programmer with almost a fetish for time-efficient low-level code. Multiplication and division were often important bottlenecks. I'll content myself with just the most interesting example of what can be done:
Code:
#include        <stdio.h>
#include        <stdlib.h>

/* Use this approach when there is a smallish known bound on multiplier size */
#define BOUND   20000

unsigned int sq[BOUND * 4];
#define osq (sq + BOUND * 2)

/* This multiplier is FASTER than '*' on almost all processors without special assist */
int mult(int a, int b)
{
        return osq[a + b] - osq[a - b];
}

int main(int argc, char **argv)
{
        int a, b;

        /* Setup sq table */
        for (a = 0; a < BOUND * 2; a++)
                osq[-a] = osq[a] = a * a / 4;

        /* Verify mult() works by testing every case */
        for (a = 0; a < BOUND; a++)
        for (b = 0; b < BOUND; b++)
                if (a * b != mult(a, b))
                        printf("Mult failed at %d %d\n", a, b);
        exit(0);
}
Do you see the cute algebraic trick at work here? I have verified that when it is applicable, this code often outperforms a 'normal' multiply. (The example code assumes a,b non-negative, but can be adapted to support negative numbers also.)


BTW, the Intel 80x86 has a single-instruction multiply by 5: leal (%eax,%eax,4), %eax. The Motorola 680xx has a similar instruction.

In my opinion, this is a VERY interesting technique. It should be fun to think about EVEN IF USELESS. Comments:
  • As I noted in a follow-up, it was apparently the multiplication method used in ancient Babylon!! (They couldn't use an ordinary multiplication table -- it would have to be 60x60 instead of 10x10.)
  • Although I invented the SPECIFIC method, I claim no credit. It was inspired by a journal article reported by a colleague. A similar method may have been invented by John von Neumann himself.
  • It's even "niftier" than it may appear at first glance. No rounding or other special handling is required. The simple "osq[-a] = osq[a] = a * a / 4" and "osq[a + b] - osq[a - b]" work AS IS. (This is because 3 is not a quadratic residue of 4.)
  • Please note that I stated in this very first post on the subject that the code, where applicable, was faster than ordinary multiplication only on processors WITHOUT SPECIAL ASSIST.
  • In fact by the 1990s or even earlier almost all processors used where speed was important did have special assistance, e.g. for multiplication.
  • But not all did. In particular the early Sun Sparcstations delivered by SMI DID multiply significantly faster with my code. I don't know when SMI started delivering faster processors, but my tests were done on DELIVERED machines when I consulted for a Sun customer, and NOT while I was a consultant for Sun.
As I suggest, the code should be viewed as Nifty, even if useless. I was disappointed when nobody seemed interested.

Your response was:
... I'll content myself with just the most interesting example of what can be done:
...

It is just a freaking exercise.

All processors had/have signed and unsigned integer addition ADD ADDC, and hardware
Okay. Whatever.

Later you doubled-down with a prevarication:
Swammerdami said:
Anybody can have a brain fart. Yiu are cstently shallow and lacjing comreension.

From your posts over time my guess is that you never word with people who had the savy to ubdertsnd what you did and quetion it. When somebody did you prbably bluff yir way though it.

I've posted synopses of my career. At my last job I worked with one of the top pattern-recognition scientists in the USA. We coauthored papers and coauthored patent applications. I've worked with many other top engineers. Sometimes a stranger would approach and ask for help since they'd heard I was the best mathematician in the (large) company. Et cetera. Evidently you think what I tell about myself is a lie. You think you've caught me "bluffing."

Down the thread you posted a multiply algorithm you said was faster the anything else. I showed it to be false and when I asked you about limitations of the code you went silent.

I think you're referring to the Babylonian approach using a table of squares. I NEVER said it was "faster than anything else." I DID mention that it outperformed the standard multiply on SOME 20th-century machines (without FPU obviously), though there is a storage-vs-speed tradeoff.

-- -- -- -- -- --

I also posted an elegant snippet that converts two uniform real variates into a 2D gaussian variate in polar coordinates, and then converts that into two INDEPENDENT 1D gaussian variates. This is thought to be the fastest way to generate 1D gaussian variates.

Again nobody seemed interested. :-( Except you, who didn't even understand what a 2D gaussian variate was, and took the opportunity to deliver a 3rd grade-level lecture on what you vaguely remember about random numbers.

Recently, as an exercise you published here a program to print "Hello world" or some such. Recently I had fun writing a problem to determine what combination of cards and plays produces the highest cribbage score, (Dealer hand + Crib + Dealer Pegging - Pone hand - Pone pegging). Maybe I'll publish the source here. You're welcome to Google if you think I lifted it from the 'Net.

Better yet, why don't you try to write some program even one-twentieth as complicated as my cribbage program. (No, we don't need a Revision 2 of your recent effort that prints "Good-day world" after the "Hello.")
 
You seem to be trying to prove something.

I know how to solve your problems, I have no need to. I have nothing to prove.

The test is always dealing with a problem for which there is no clear and ready solution. Anybody can look up theory.

Here is a simple common electronics problem in probability and statistics.

In volume manufacturing there is always statistical variations in components.

In a system there is a circuit with a power supply across two series resistors. The three components are known to be normally distributed.

The power supply Vs varies from 11.75 to 12.25 volts.
Resistor R1 has a nominal value of 1300 and varies between 1000 and 1600
Resistor R2 has a nominal value of 2750 and varies between 2600 and 2900

The equation for the voltage across R2 is VR2 = Vs*R2/(R2 + R1)

What is the mean and standard deviation of VR2?

You are not likely to find a solution.

The solution requires a working knowledge of normal statistics.

For bonus points what percentage of VR2 will fall within +-10% of the mean?
 
Ok, maybe that is too tough a puzzle.

An easier way to frame it.

Two metal rods.
Rod 1 has a mean length of 2 meters with a minimum length 1.9 meters and a maximum length 2.1 meters.
Rod 2 has a mean length of 1 meter with a minimum length .7 meters and a maximum length 1.3 meters.

Both rods are normally distributed.

When you put the rods end to end what is the mean length and standard deviation?
What percentage of lengths will fall within +- 34% of the mean? +-10%?

How do you combine statistical uncertainties in QM?
 
Ok, maybe that is too tough a puzzle.

An easier way to frame it.

Two metal rods.
Rod 1 has a mean length of 2 meters with a minimum length 1.9 meters and a maximum length 2.1 meters.
Rod 2 has a mean length of 1 meter with a minimum length .7 meters and a maximum length 1.3 meters.

Both rods are normally distributed.

When you put the rods end to end what is the mean length and standard deviation?

Pro Tip: Normal distributions do not have minima or maxima. Imposing them without explanation makes you look the fool.

So we know the problem is mis-stated.
Perhaps you meant uniform distribution. Presumably you did NOT mean some truncated or appproximate normal distribution, since we'd be obviously left with insufficient information.

I suggest you post your brilliant solutions to the problems I posed. Compared with your "problems" they are:
  • Correctly constructed, and easily understood by anyone with math intuition or background;
  • Give higher-level insights; and
  • Don't involve any tedious arithmetic.

If you're interested, I can show some little-known(?) but surprising(?) results about inequalities among sums of gaussian variates. Proving these results might be a fun challenge for someone so fond of "normal distribution."
 
Then how can you apply an infinite normal distribution to a finite length variation? By taking 6 standard deviations, 6 sigma, as encompassing 99.999..% of the distribution.

Mean combined length = 1 meters + 2 meters = 3 meters

+- 3 standard deviation,or 6 sigma, about the mean is taken to be about 99.99...%.

Rod1 standard deviation is (2.1-1.9)/6 = .033
Ro2 standard d deviation is (1.3-.7)/6 = .1

Standard deviations add Root Sum Squared

Combined standard deviation = sqrt(0.033^2 + .1^2) = .105

Combined length is 3 meters with a standard deviation of .105.

1 standard deviation is about 34% so +-34% of the combined rods will be within 3 +-.105 meters.

This is commonly used analysts. If you want to learn something new in probability theory search on 'root sum square method tolerancing'.

I did show how your card turning over probl is just a sampling without replacement problem. Most of your probability puzzles all boil down to the same thing.

Solving the rod problem requires reasoning and applying theory without a clear example of how to apply it. You do not understand probability distributions, you may have looked at wiki pages.

There are theoretical distributions, and there is applying probability theory to the real world.


The problem was a statistics IQ test. I said it requires understanding normal statistics.

When statistics are applied to physical problems parameters are never infinite and always have finite upper and lower bounds, such as the rod example.

Any roulette wheel is never a perfect uniform distribution, but we can say for all practical purposes the probability of a ball ending up in 1 of 38 slots is unfairly distributed.

When can and do say a rod with a finite length can have a normally distributed variation in length.

I posed the problem to see your response and guage your depth. On another thread you claimed a normal distibution can not have zero mean, which is incorrect.
 
On another thread you claimed a normal distibution can not have zero mean, which is incorrect.

Not only did I NEVER say that, I also never said that a normal distribution MUST have zero mean which, IIRC, is the falsehood you were touting in that other thread!
 
No comments on how the problem was solved?

You can download Scilab,free, and run this script. The Scilab normal destruction generator crerates a finite array of numbers out to +- 4 sigma for any combination of mean and standard deviation.

A normal distraction can not have a zero standard deviation. It results in a divide by zero.

The normalized normal distribution is zero mean and a standard deviation of 1. Standard deviation adjusts the skirts and mean shifts the curve left and right.

clear
clc
n = 100000
m = 100 //mean
s = 5 //standard deviation
y = grand(1,n,"nor",m,s) // y is a normally distributed random array 1xn

ysd = (max(y)-min(y))/8 // range of y/8
mprintf("y sdev %f\n",ysd)

Post as you please, but no I am not interested in inequalities.
 
The definition of a random variable is no correlation between events.

Put 10 balls in a box, shake, pick one, and put it back. Pick again. The first pick does not affect the odds of the second picks.

Uncorrelated random events.

I read through Knuth's Semi Numeral Algorithms. There is actually controversy ver what random is. He said you define what it is, and anything that fits the definition is than random.

A uniform distribution is a theoretical definition. Anything that closely approximates a uniform distribution by test is considered uniformly distributed.

I am sure roulette has been subject to thorough formal testing.

On a given wheel there could certainly be patterns, but I'd think picking them out would require a lot of data.

All casinos care about is that it is inform enough that it is not easily hacked and the odds are consistent enough so the house always comes out ahead.

Same with casino grade dice. The depth of dimples are adjusted so the missing mass is the same on each side for balance. Are the odds for a single die exactly 1/6? Probably not.

By the way aa, if I may ask did you take the actuarial exams?
Ugh, this is tiring. The entire point of my anecdotal response was to point out that if I gave an experienced dealer a close to zero friction standard US roulette wheel and a ball that he could spin when and however he pleases (in accordance with uniform gaming rules), and he has to hit any of the numbers on one specific half of the wheel - I would be he could do it well over 50% of the time.

So, non-uniform.

I'm an ACAS and passed 7 exams. How many have you passed?

aa
 
I am shocked -- SHOCKED -- to find that no gambling is going on here in the gambling thread!

All three problems that I posed -- I, II and III -- are rather easy (though not as easy as the "Mickey Mouse problems"). I am disappointed -- if not actually SHOCKED -- that nobody has made an effort.

Sorry, I wasn't ignoring you. I just have this side hustle where they actually pay me to solve probability problems - so I'm working through those first :semi-twins:

aa
 
The definition of a random variable is no correlation between events.

Put 10 balls in a box, shake, pick one, and put it back. Pick again. The first pick does not affect the odds of the second picks.

Uncorrelated random events.

I read through Knuth's Semi Numeral Algorithms. There is actually controversy ver what random is. He said you define what it is, and anything that fits the definition is than random.

A uniform distribution is a theoretical definition. Anything that closely approximates a uniform distribution by test is considered uniformly distributed.

I am sure roulette has been subject to thorough formal testing.

On a given wheel there could certainly be patterns, but I'd think picking them out would require a lot of data.

All casinos care about is that it is inform enough that it is not easily hacked and the odds are consistent enough so the house always comes out ahead.

Same with casino grade dice. The depth of dimples are adjusted so the missing mass is the same on each side for balance. Are the odds for a single die exactly 1/6? Probably not.

By the way aa, if I may ask did you take the actuarial exams?
Ugh, this is tiring. The entire point of my anecdotal response was to point out that if I gave an experienced dealer a close to zero friction standard US roulette wheel and a ball that he could spin when and however he pleases (in accordance with uniform gaming rules), and he has to hit any of the numbers on one specific half of the wheel - I would be he could do it well over 50% of the time.

So, non-uniform.

I'm an ACAS and passed 7 exams. How many have you passed?

aa
I looked at the exams in the distant past, its an accomplishment.

As to distributions if the distribution fits, wear it so to speak.


In physical problems one looks to see if a normal distribution is close enough to meet a need.

I am not a mathematician or an expert in statistics, I was more a Jack of all trades master of none. I learned math as I needed it.

In practice finding a normal distribution was the norm with some exceptions. At least with the work I did.

When manufacturing data was not normal I'd go looking for a problem.
 
Last edited:
Back
Top Bottom