Jump to content

number of combinations/probability - ive forgotten so much


KerikBalm

Recommended Posts

Hello all, I used to know this stuff, but I forgot and I don't have my math books on this same continent...

Suppose I have a 7 digit number composed of 0's and 1's

How do I calculate the number of possible combinations that have exactly 3 1's? exactly 4 1's

What if its a 5 digit number, or a 10 digit number. If its composed of 0s, 1s, or 2s?

I used to know this... but I've forgotten, I'm sure a factorial will be involved, but I don't remember more than that, and doing the possible combinations by hand gets out of hand after about 5 digits.

 

And a related question...

If I have one group of 3, of which 1 displays a trait (lets call it a 1), and another group of 3 which displays no trait, what is the statistical confidence that there is a real difference between the group with 1 out of 3 affected, and the group with 0 out of 3 affected.

I know its very low, not much better than a coin toss,

Edited by KerikBalm
Link to comment
Share on other sites

6 hours ago, KerikBalm said:

Hello all, I used to know this stuff, but I forgot and I don't have my math books on this same continent...

Suppose I have a 7 digit number composed of 0's and 1's

How do I calculate the number of possible combinations that have exactly 3 1's? exactly 4 1's

What if its a 5 digit number, or a 10 digit number. If its composed of 0s, 1s, or 2s?

I used to know this... but I've forgotten, I'm sure a factorial will be involved, but I don't remember more than that, and doing the possible combinations by hand gets out of hand after about 5 digits.

 

And a related question...

If I have one group of 3, of which 1 displays a trait (lets call it a 1), and another group of 3 which displays no trait, what is the statistical confidence that there is a real difference between the group with 1 out of 3 affected, and the group with 0 out of 3 affected.

I know its very low, not much better than a coin toss,

I thought this forum was science and spaceflight, not science and mathematics?:huh:

Just saying. I guess it's at least better than Yahoo Answers.

Link to comment
Share on other sites

6 hours ago, KerikBalm said:

And a related question...

If I have one group of 3, of which 1 displays a trait (lets call it a 1), and another group of 3 which displays no trait, what is the statistical confidence that there is a real difference between the group with 1 out of 3 affected, and the group with 0 out of 3 affected.

I know its very low, not much better than a coin toss,

Lets rephrase it a little bit. Lets say that in the first group, probability of having a trait is p. We need to ask two questions. What is the probability distribution of p? What is the probability of the second group has the same probability distribution?

Both questions are answered with Bayesian Statistics. To start with P(p) = 12 p(1-p)²/4. (General formula: (a+b+1)!/(a! b!) pa(1-p)b, for a that have trait and b that do not.)

Probability that second group has the same p is given by ∫P(p) (1-p)³ dp = 2/7. (General formula: B(a+1, b+n+1)/B(a+1,b+1), where n is number of elements in second set, and B(x,y) = (x-1)!(y-1)!/(x+y-1)! is the Beta function.)

We can also run this thing backwards. Probability distribution for odds of second group having a trait is 4 (1-p)³, and odds of first group matching it are  ∫P(p) 3 p(1-p)² dp = 2/7. Which is unsurprisingly the same.

 

So the odds that these two groups are the same are 2/7, giving you an estimate of 5/7 that there is a difference between them. Which is, indeed, significantly better than a coin toss. Keep in mind, though, that this is just the best estimate on given information. It's going to have very large uncertainty.

Link to comment
Share on other sites

4 hours ago, fredinno said:

I thought this forum was science and spaceflight, not science and mathematics?:huh:

Just saying. I guess it's at least better than Yahoo Answers.

well, it is science and spaceflight, and proper statistical analysis is certainly a part of science, soo.... yea, why not ask here

Asking on Yahoo Answers? *shudders at the thought*

Link to comment
Share on other sites

14 hours ago, KerikBalm said:

Hello all, I used to know this stuff, but I forgot and I don't have my math books on this same continent...

Suppose I have a 7 digit number composed of 0's and 1's

How do I calculate the number of possible combinations that have exactly 3 1's? exactly 4 1's

What if its a 5 digit number, or a 10 digit number. If its composed of 0s, 1s, or 2s?

I used to know this... but I've forgotten, I'm sure a factorial will be involved, but I don't remember more than that, and doing the possible combinations by hand gets out of hand after about 5 digits.

 

And a related question...

If I have one group of 3, of which 1 displays a trait (lets call it a 1), and another group of 3 which displays no trait, what is the statistical confidence that there is a real difference between the group with 1 out of 3 affected, and the group with 0 out of 3 affected.

I know its very low, not much better than a coin toss,

Although formulas have been given, I would like to point out that these are binomial distributions. For the second question, you could apply a Fisher exact test, though you'll probably want to use something like Python or R for the results.

Link to comment
Share on other sites

SMath Studio is a very useful, nice and pretty clear tool - a free analog of MathCad (also can open and evaluate MathCad scripts).

You can write formulas in a "book-like" style, not as programmer's code.

Plots and charts, just "attached" to formula snippets, including dynamically changing diagrams (a "steam engine" sample), Also can compile the code as an "exe" file,

Not a commercial, just I use it.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...