
Michiel Van Bel wrote:
Frederik Delaere wrote:
Michiel Van Bel wrote:
okay, my statistics is a bit rusty (and I do not really know how to google for it), so perhaps you guys might have a hint:
1) say you have X objects (in a linear row) 2) Y of those X objects (Y <= X naturally) have some kind of special status 3) Z is a number between 0 and Y 4) What are the odds that Z objects with the special status are located next to each other
For example: X=50,Y=20,Z=10 You have 50 pencils, and 20 of them are red, 30 of them are blue. What are the odds that (if you lay those 50 pencils down randomly) there are 10 red pencils next to each other?
Anyone any hints?
ask in the forums on unibet.com ?
okay, if I follow Marijn's reasoning: I get that the chance is approx. (N-Z) * (Y!) / ((N-Z)!) This should be great, except for the fact of course that N and Y are pretty big numbers (N : 30000 genes, Y : 10 to 10000 GO terms), and Z is pretty small (10 or so). 30000! is a rather largish number actually :-/
Java BigInteger en BigDecimal to the rescue: 3486! is ongeveer gelijk aan (ff jullie mailbox spammen): 59286586058368885543878327028145675916399167731210221509470976651021456975709560 35211840826548292271620257735546884267363082256787656495017721723951448183442012 04130188065114167126087000415560849557216878393165716975913978158092727070242749 42520212241601617815586930736472922011883840559073828335699121197812300225859924 13599924875805600074502107867237855925431349451846803703312233710578016895410314 65612484264361384611839022282499624633401903423164587459448888840873576151606219 78544480838259113027688940407730311701626909043777158042802122810864855879609942 36894355238583772627945238504096763021036147037989867892945463206681435137340388 40182695777107295969369358757594773208171808658341525609694002001707905470730884 49634423725429608854837784674197164547764123526664583642429024914782085601238384 83830394399659930950809833024486687551776861022486424130023867974574308803057962 30347596510406028193375348787939950212624412984339811431477937482577868432874570 32165354235500239257798016364106090629669489151106598157670341686875106578333851 15028549108569564578237887844365165570935757814123533755273787032745156426423092 07657416123973125568373616130393800150297010913568587483451726977461737759796091 06107093233100052587989668381733376266615117426954689614586608238892458558121141 35804718495043979124517831559428240906879824313047322904676536346277965225576896 55311696011834058430717653041163814897942829324196052543813754423104030849698028 33542338207846431152700216858468748717418322744705846292883939612080657174259841 65764860247388682460931917988585206651081655335005342142652194320015057713641607 88588116192251004357997628315720685574303195974149426932761892825847828106182097 80853663930171778164870024648185562930612661950879652529706210118630573505019592 24443310374508274768572206650900781546891848538908460178463550078720718698491054 56224045430963264716283153752685762924406024299759865174095254341787237884282891 29175383847835816442674292539712624858049031113497006723234495070996778530043630 81448815931279822324185932245643283170897196534156811596087305080740904540270501 88792335918941734134121973832138035620296504074460167898838716148946794022588450 20095885308222653132210849627561001203721490606471627556791875505508321040459454 49346326699877368329239883608841582158212028831689838756748014926163673706633554 86922525693947019683843830992787717476051680985079912885958018781611263928418100 89753958603718255546998499016195380262336196326418571062513694129459219202745763 01669520259243235099782085449262556387558767754454836979121351096714940793051276 64140540062000553445883013278260963358426383543940491166060910511667126327668286 06865317021832688800260077900964854882509382602979909740326483051255078546605755 56661405469071726215272164844797058444312976344934081902935017455847843454223675 90334238512531734561155610103223747515281752225165781001252841134120379068171695 00660673855173405486723871365811381527815663234065835825192280398589300537628140 74026641595342488936968570913649791100978270889084092681052366200152617897365364 00625824105012805334401043115040801338201049950001816495730453957200405448756099 44081383743019854295142640011680872094092352329474888452341650793286982291605702 86031933038565876330169927579739730411452983252313197157316426696737819973253340 18797119664188014715457961237481004084708735860054780612788035442288331069906244 90794431695912191957813622133440647335997967089928713482118924571187545596225954 25009207940757307027177417254080546229261205184845334947040001132570171711819320 26177338694127137454132784227247256186779231249453589269001216345121880298183179 27331579150997955837842065834085992053737490351814770319796657985563999410580225 86171837128438857151166629037294578103892754563092414758501162262043918851278724 58961153877011068855416824120697825031383482507803213321079017787723435133857748 55896271990762011163071153214402757259763767293595613138783170600050311797086852 12643517864993029643844266151041123469122071396549385838249909695056537651156802 80465283907229563715041829279903363736260901755474158509486217129806680182712250 75838523562241979640256914438537420628831828639380699267006203891854933735593510 75203743179110378387465656156669255682651215677735981475544457819410342675925634 18003580425490088290459180062766789676792967511189170892840324497111512628237754 48581815503101619748352221024186567157699788578341219694741028554734915109399762 64891900648420668250038144646499362599339706025418596334672531968588665279684673 54278025587653853653749023590082606403654119047983678186719126306899621343715095 66454262940442795079107546718379392130049579467861736203566746876592926384218678 77918573162960983340518946524699362993054458565305421774712743014342641017024721 94378331147458041643308636710177693908836100131840473870319813279843563506782181 09564722263459478316907795911603534991058718090855608394482240349990998704770154 62016482645769184758331456668662029892986529704507274544883378199337247423667621 94702470745442149285394844441180676342568211905223144741380050177717596044940515 36116186725271516561543598649932364663466102125364973605388295788795902537834362 80716342233083436106359290516751534831174851346895214537844693106246627365648675 98717485074931081502093518615332441086995978674574660635031039759913558989496951 63602078716702266336907281437425524995584938061572559959392741905039638117949002 45272990651143585898409478900720574565878673970323254912547155830505932981960707 57759117720792977764362194167552822446478769493650996535499408615427083393934260 55090230280101016856297332748130713101023499101844617346106825337710455415471865 01677964614158336164921002602473957332425164459585473081107260427111239252734125 23401635274095862927992347141294010081315576785656165724755958842791071533936633 37777889332808053106926277836866973321896370171101484118119308694357201999645880 33688671102842411321120049788142253899455269874631401859619809495875403875451123 72636589111668411314044071315736855519197658815216100207509214728228526882461128 09482675577804609013246362166657224158281153810596401181032256069245969474350992 23149248230206354219329278531483164442579117224586930717884715666734103341804792 59179463568332617753943797097153631112225779346473873233537158333630619389990770 79773615831596785000030967712220028618688713390328643821333322577171039981020445 19690068532688422750024418502968859292770747776405208217840184187671199587119979 26352022806818656675582531812941194783457166553242268570027600370687146061288257 91979281465828754432664803707784894354552922014333076130104665015833208244914846 41617108462291128850669993822557829675208420282058781664443506016145416755351343 54236286748597677416078525804056377434921927624981371218216955692252058070370116 98048680389566570961486796147633781434079716939309691855991698938160626111863551 06572712952295045096223877327377133881939509770473764900151063124419140755493501 74655963886265820096858747865884519036257087372872292985156354397969370805050252 19300127777573433760376020513803817573210886380840407611161311206840508846353008 38201518577540301746091795031094768328679954367925762764502877551911144715444500 57777138549319564940232984059936160902192674869636030792557522619279326045612222 98956857953154811598067386056567780727447348466745163591256793813340712575111180 83108073404967014680730413404365696300169017828535021403113206240379632194312559 57854991415009278478980826984850758763989649012702214966559570033362376418192203 69819853442217840983817715645815109643490888687474479952279390427504342782331549 08495535604134854325559471183465455751715641249486462424770037864267213661333715 86657574513685203247136810581877227824165874725867174539302600826509987434894230 45873275163703165363742235619796772599091513323565487571877063671075676259468623 99272969981312571828208948841917082277193192589422564034191149651634267630139319 39337095627093605202493816126669407549604115110448932049541212410589147790651416 63992165082226098168189925309579450289467172023092242181363710485869330586144223 33821690766098114619212473968613822050358881724179267167834141281577384483854372 25800118555090245664860842676158859283444012955492974443640704543688905289550630 71214667275614950136213621341204807128444220676700640735424395382381307084692778 09334413848966236546000718643394773633053028305770120201542074650906812594952981 11620887763014272400553972974310366744375835058950792346945658104037774435294283 75453664804997045106201102493956154748503946091412648772912678703366985795634158 22551450705104703918366110260991896260904754497567088612593155694809891834394949 04561316184316541443236276769337269329768832012777017133907328360747406792359153 85975938608557047313739991672089384705105063021769089009162453273747170122052606 16744949473669723364633711578480464460721432960726331907965446576710212686201585 82953596188945422697986544246757185464415049460260305527381000107923259064357148 47495990900818497188738727166025878667608137075133634692336137127522606870187214 17946334689802398766393017828113948818751897544406374734317953891557619199524632 89593863323441605270161880981831705258235207268570239290933629435341599976718188 48850188018395192598501971092041729931143387886934065325572022190036015888129302 63965925006972980119816923958790913908134567394417639528291354863747084848860269 75785820953921956090081842366545414700707478791671897706476984014813467670905715 26402617229151418771934380208488940981770495190489395598580756654287600198181566 95235069618789633393612915832531750020362661904703290526653133157784184700800909 80923940225402995672058668244099449360287637605991197509744231802219149841288008 93896542144189381332590763575278028190244077062723784379429093437858199193318903 31089663367361585385438468999622859102115206059580822368631711497246711213182127 41329688018325384051389925952287501423392563430827637962688046874680776695463176 20932192592949976819174906968775268383561937423212406810929137565296346828729692 69145743608385559247852979942808141885936448307200000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000 -- ================================================================== Michiel Van Bel PhD student Tel:+32 (0)9 331 36 95 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM mibel@psb.vib-ugent.be http://www.psb.vib-ugent.be http://bioinformatics.psb.ugent.be ==================================================================