+ Reply to Thread
Results 1 to 8 of 8

how to calculate the probability to be homozygous?

  1. #1
    Registered User
    Join Date
    06-28-2017
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    2

    how to calculate the probability to be homozygous?

    Hello everyone ,

    I have a question concerning formulas. I feel that it should be easy to solve but I can't figure out how to do it myself
    So, I am working on mutations frequencies and I want to calculate the probability to be homozygous (ie have two mutations together).

    My excel is like this
    mutation freq
    A 4.19E-06
    B 4.17E-06
    C 4.12E-06
    D 3.28E-05
    and it goes until >300 rows ><"

    What I want should be prob of A to "meet" A, B, C and D ... = A*A + A*B + A*C + A*D ...
    And then B to "meet" A, B, C and D ... = B*B + B*C + B*D ... (no B * A because it was in the previous one)
    and so on ...

    And in the end I want the sum of all the probabilities.

    Is there any formula I can apply for my problem.

    thank you very much!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: how to calculate the probability to be homozygous?

    Hi, welcome to the forum

    Isnt this just x factorial?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: how to calculate the probability to be homozygous?

    Hi all- Sort of. The calculation involves (n)(n+1)/2 "parts". Paste the following formula in C2 and copy down. Then sum Column C (not shown).

    =B2*SUM(B$2:B2)

    Row\Col
    A
    B
    C
    1
    Mut.Freq. Partial Sums
    2
    A
    4.19E-06
    1.76E-11
    3
    B
    4.17E-06
    3.49E-11
    4
    C
    4.12E-06
    5.14E-11
    5
    D
    3.28E-05
    1.49E-09


    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Last edited by leelnich; 06-28-2017 at 11:44 PM.

  4. #4
    Registered User
    Join Date
    06-28-2017
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    2

    Re: how to calculate the probability to be homozygous?

    I am nor sure about your answers ...
    I added in a (very) small sample what my data look like when I do it manually (which is impossible if you have more than 300 frequencies to multiply )

    In blue are the formula I used.

    Untitled-1.jpg

    I hope this will help!

    thank you again

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: how to calculate the probability to be homozygous?

    Based on the layout of the screenshot in post #4, paste the following formula into cell D4, then copy down and across:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: how to calculate the probability to be homozygous?

    I would anchor that to the UL corner of the table, so it works if you insert rows or columns:

    =IF(ROWS($C$3:D4) <= COLUMNS($C$3:D4), $C4 * D$3, "")
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: how to calculate the probability to be homozygous?

    My solution from post#3 yields the same result as OP's post#4, after summing the partials as instructed:
    (Bear in mind, our data is rounded to 3 significant figures because we're copying from a picture. )
    This is why C2 shows "1.08" instead of "1.07".


    Row\Col
    B
    C
    D
    2
    3.28E-05
    1.08E-09
    =B2*SUM(B$2:B2)
    3
    4.09E-06
    1.51E-10
    =B3*SUM(B$2:B3)
    4
    4.06E-06
    1.66E-10
    =B4*SUM(B$2:B4)
    5
    4.08E-06
    1.84E-10
    6
    4.08E-06
    2.00E-10
    7
    8.68E-06
    5.02E-10
    8
    4.48E-06
    2.79E-10
    9
    2.56E-09
    =SUM(C2:C8)


    Each entry is multiplied by itself PLUS all preceding entries.
    To fit the layout in your picture, paste this in D4 and copy down:
    =C4*SUM(C$4:C4)
    Last edited by leelnich; 06-30-2017 at 09:34 AM.

  8. #8
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: how to calculate the probability to be homozygous?

    Continuing from post #7, re-arranging the inputs even demonstrates the SAME SUBTOTALS (in reverse order) as shown in post #4:

    Untitled.png

    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Last edited by leelnich; 06-30-2017 at 09:35 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Formula/formatting to calculate probability
    By kjrmitch in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-20-2015, 10:19 PM
  2. how to use & calculate probability in excel
    By Navin Agrawal in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-17-2015, 12:01 PM
  3. Calculate the probability to reach at certain point......
    By edneco in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 06-03-2014, 04:47 PM
  4. Replies: 4
    Last Post: 11-26-2011, 02:33 PM
  5. Using Time Results to Calculate Probability
    By shad in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-05-2010, 02:48 PM
  6. How to calculate total probability of loss from combination of probabilities
    By prr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2009, 06:48 PM
  7. [SOLVED] How to calculate probability
    By Al in forum Excel General
    Replies: 4
    Last Post: 12-01-2005, 08:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1