Re: [CFRG] Combinitorics probabilities
Robert Moskowitz <rgm-sec@htt-consult.com> Mon, 08 August 2022 22:05 UTC
Return-Path: <rgm-sec@htt-consult.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 881ACC15A736 for <cfrg@ietfa.amsl.com>; Mon, 8 Aug 2022 15:05:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.206
X-Spam-Level:
X-Spam-Status: No, score=-4.206 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z53U7leBFELQ for <cfrg@ietfa.amsl.com>; Mon, 8 Aug 2022 15:05:05 -0700 (PDT)
Received: from z9m9z.htt-consult.com (z9m9z.htt-consult.com [23.123.122.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F2D5EC15A724 for <cfrg@ietf.org>; Mon, 8 Aug 2022 15:05:04 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by z9m9z.htt-consult.com (Postfix) with ESMTP id 0E9076256E; Mon, 8 Aug 2022 18:04:28 -0400 (EDT)
X-Virus-Scanned: amavisd-new at htt-consult.com
Received: from z9m9z.htt-consult.com ([127.0.0.1]) by localhost (z9m9z.htt-consult.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ksrHEOMzyCKW; Mon, 8 Aug 2022 18:04:13 -0400 (EDT)
Received: from [192.168.160.11] (unknown [192.168.160.11]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by z9m9z.htt-consult.com (Postfix) with ESMTPSA id 1287562434; Mon, 8 Aug 2022 18:04:12 -0400 (EDT)
Content-Type: multipart/alternative; boundary="------------D0DpvSX6ImqTH87720TMp3U3"
Message-ID: <1b5cba31-e22f-06e2-d874-692cef9809fc@htt-consult.com>
Date: Mon, 08 Aug 2022 18:04:44 -0400
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0
Content-Language: en-US
To: Dan Collins <dcollinsn@gmail.com>
Cc: "cfrg@ietf.org" <cfrg@ietf.org>
References: <44268f7f-168e-fe67-af53-e6b26be2ef9c@htt-consult.com> <9d5b685c84294f45b1712e49683593fc@blackberry.com> <cf1d6448-cedb-fed4-ca8c-f5c071f82c84@htt-consult.com> <9d0d9b76-9176-f71f-f45a-046dd74df339@htt-consult.com> <CA+tt54+SwQSZp9wyq=gvN3RcNqiAs+iUvjCfbgDhsXExHgzodw@mail.gmail.com>
From: Robert Moskowitz <rgm-sec@htt-consult.com>
In-Reply-To: <CA+tt54+SwQSZp9wyq=gvN3RcNqiAs+iUvjCfbgDhsXExHgzodw@mail.gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/Ap2FY2nW8U7VdCWQMEtvUl8SvA4>
Subject: Re: [CFRG] Combinitorics probabilities
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Aug 2022 22:05:09 -0000
thanks Dan, This looks right! And it allows for playing with the probablity of receiving any one message. BTW, this is for applying FEC to a message over a path with packet loss of 1-p. chop the message up, add some FEC pieces and see what you get at the other end. If you can turn a bad path into successful transmission, you don't have to go into retransmission. Tradeoffs abound, but that is of course. again, this looks right. Thanks On 8/8/22 17:57, Dan Collins wrote: > Robert, > > In your scenario, you want "with replacement", meaning that the > probability of receiving a later packet is not modified by the result > of earlier trials. (As opposed to drawing colored marbles from a bag > "without replacement", where drawing a blue marble reduces the > probability that the next marble will be blue.) > > Specifically, with your scenario where your packet reception rate is > 95% (p=0.95), and the total number of packets sent is 5 (n=5), and you > want to know the probability that at least 3 packets were received, > you want to evaluate the CDF at k=2 (get the chance that two or fewer > packets were received), and then subtract that from one. This can be > done using the summation formula for the CDF shown here with k=2, n=5, > p=0.95. > > https://en.wikipedia.org/wiki/Binomial_distribution#Cumulative_distribution_function > > (The summation formula iterates over i, the number of successful > trials (received packets), and multiplies n choose i (the number of > permutations of successful trials) by p^(i)*(1-p)^(n-i) (the > probability of any individual permutation being found)). > > The Binomial CDF is available as an Excel function: > https://support.microsoft.com/en-us/office/binom-dist-function-c5ae37b6-f39c-4be2-94c2-509a1480770c > In your example, I think you would do this: > =1-BINOM.DIST(2,5,0.95,TRUE) > Which comes to 99.88% for receiving at least 3 out of 5 packets. > > I think the result in your original post is not correct. You wanted > the probability that at least 2 out of 3 packets would be received. > There are four ways that this could happen: all 3 packets are > received, or the first one is dropped, or the second one is dropped, > or the third one is dropped. This uses the following probabilities: > = (0.95*0.95*0.95) + (0.05*0.95*0.95) + (0.95*0.05*0.95) + > (0.95*0.95*0.05) > This comes to 99.275%, which agrees with the BINOM.DIST function with > these parameters: > =1-BINOM.DIST(1,3,0.95,TRUE) > > Hopefully I have correctly understood the question. > Regards, > Dan > > > On Mon, Aug 8, 2022 at 2:37 PM Robert Moskowitz > <rgm-sec@htt-consult.com> wrote: > > > > On 8/8/22 17:16, Robert Moskowitz wrote: > > > > > > On 8/8/22 17:07, Dan Brown wrote: > >> I think you want: > >> https://en.wikipedia.org/wiki/Binomial_distribution#Tail_bounds > > > > Pretty heavy lifting and it does not read like my problem. Then I > > read the intro: > > > > The binomial distribution is frequently used to model the number of > > successes in a sample of size n drawn with replacement from a > > population of size N. If the sampling is carried out without > > replacement, the draws are not independent and so the resulting > > distribution is a hypergeometric distribution, not a binomial one. > > However, for N much larger than n, the binomial distribution > remains a > > good approximation, and is widely used. > > > > > > I believe this is "without replacement" and N is close to n. > > > > e.g.: 5 messages are sent. You want to receive at least 3 of them; > > any 3 and more is ok. The probablity of receiving any one > message is > > p... > > > > So off to look at hypergeometric distribution? > > No not hypergeometric. Back to binomial. > > Fun! This is stuff I learned back around '69 or '70! Where are > those > brain cells hiding? > > I had enough stat then that I could have degreed in it, but I did not > consider it fun... > > Maybe I burned those cells after getting my comp sci degree? > > :) > > > > > > >> Best regards, > >> Dan > >> > >>> -----Original Message----- > >>> From: CFRG <cfrg-bounces@irtf.org> On Behalf Of Robert Moskowitz > >>> Sent: Monday, August 8, 2022 4:59 PM > >>> To: cfrg@ietf.org > >>> Subject: [CFRG] Combinitorics probabilities > >>> > >>> CAUTION - This email is from an external source. Please be > >>> cautious with > >>> links > >>> and attachments. (go/taginfo) > >>> > >>> Well I spent the afternoon googling, but my search foo is weak. > >>> > >>> I want the formula for the probablity of receiving at least m > out of n > >>> messages > >>> given the probablity of receiving any message is p. > >>> > >>> I did find: > >>> > >>> > https://urldefense.com/v3/__https://www.statology.org/probability-of-at- > > >>> > >>> least- > >>> > two/*:*:text=P(X**B2)*20*3D,(X**B2)*20*3D*200.3673__;I37iiaUlJeKJpSUlJQ > >>> !!JoeW-IhCUkS0Jg!cUlR8MdsZ0VvH1GymBznGvOigS- > >>> vQjTeU2LxJmllO1oVh8_GNKrvuam52NbSOIT2KzNggbgkbpzkfqyWTupj$ > >>> > >>> But this is a series to find the final answer, not the 'final' > formula. > >>> > >>> So for example to receive at least 2 out of 3 messages where the > >>> probablity > >>> of > >>> any message at 95% comes out to 97.2% > >>> > >>> But what about 3 out of 5? etc. > >>> > >>> Pointer is greatly appreciated. > >>> > >>> I took stat just too many decades ago, and I have not kept that > >>> knife sharp. > >>> > >>> thanks > >>> > >>> > >>> _______________________________________________ > >>> CFRG mailing list > >>> CFRG@irtf.org > >>> > https://urldefense.com/v3/__https://www.irtf.org/mailman/listinfo/cfrg__;!!Jo > > >>> > >>> eW-IhCUkS0Jg!cUlR8MdsZ0VvH1GymBznGvOigS- > >>> vQjTeU2LxJmllO1oVh8_GNKrvuam52NbSOIT2KzNggbgkbpzkfuM8oXQq$ > >> > ---------------------------------------------------------------------- > >> This transmission (including any attachments) may contain > >> confidential information, privileged material (including material > >> protected by the solicitor-client or other applicable > privileges), or > >> constitute non-public information. Any use of this information by > >> anyone other than the intended recipient is prohibited. If you > have > >> received this transmission in error, please immediately reply > to the > >> sender and delete this information from your system. Use, > >> dissemination, distribution, or reproduction of this > transmission by > >> unintended recipients is not authorized and may be unlawful. > >> > >> _______________________________________________ > >> CFRG mailing list > >> CFRG@irtf.org > >> https://www.irtf.org/mailman/listinfo/cfrg > > > > _______________________________________________ > > CFRG mailing list > > CFRG@irtf.org > > https://www.irtf.org/mailman/listinfo/cfrg > > _______________________________________________ > CFRG mailing list > CFRG@irtf.org > https://www.irtf.org/mailman/listinfo/cfrg > > > _______________________________________________ > CFRG mailing list > CFRG@irtf.org > https://www.irtf.org/mailman/listinfo/cfrg
- [CFRG] Combinitorics probabilities Robert Moskowitz
- Re: [CFRG] Combinitorics probabilities Taylor R Campbell
- Re: [CFRG] Combinitorics probabilities Dan Brown
- Re: [CFRG] Combinitorics probabilities Robert Moskowitz
- Re: [CFRG] Combinitorics probabilities Robert Moskowitz
- Re: [CFRG] Combinitorics probabilities Robert Moskowitz
- Re: [CFRG] Combinitorics probabilities David Jacobson
- Re: [CFRG] Combinitorics probabilities Robert Moskowitz
- Re: [CFRG] Combinitorics probabilities Dan Collins
- Re: [CFRG] Combinitorics probabilities David Jacobson
- Re: [CFRG] Combinitorics probabilities Robert Moskowitz