+ Reply to Thread
Results 1 to 29 of 29

Roulette data

  1. #1
    Registered User
    Join Date
    08-24-2008
    Location
    ireland
    Posts
    5

    Roulette data

    Hi, I have a simple roulette simulator which generates 10,000 spins in excel using random generate between 0 and 36.
    I have been trying to quantify some of the results, such as finding out throughout the 10,000 spins, how many times a black number or red number shows up 5 times in a row. And the same again for 6 times, 7 times and so on.

    So basically i would like another part of the spreadsheet to read, for example:
    No. of spins: 10,000
    No. of times there were 5 of same colour in a row: 48
    No. of times there were 6 of same colour in a row: 27
    No. of times there were 7 of same colour in a row: 13
    No. of times there were 8 of same colour in a row: 6
    No. of times there were 9 of same colour in a row: 4
    No. of times there were 10 of same colour in a row: 3

    I was wondering if any of you may be able to help me figure out how to do this.
    PS. i've attached the file, and just so you know reds and blacks are not assigned to even and odd numbers they are:
    Red (1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36)
    Black (2,4,6,8,10,11,13,15,17,20,22,24,26,28,29,31,33,35)

    I would appreciate any help you could give me.

    Stephen
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    This "array formula" will give the count of runs of 5 reds

    =SUM(IF(FREQUENCY(IF(ISNUMBER(MATCH($B$1:$B$10000,$J$2:$J$19,0)),ROW($B$1:$B$10000)), IF(ISNA(MATCH($B$1:$B$10000,$J$2:$J$19,0)),ROW($B$1:$B$10000)))=5,1))

    confirmed with CTRL+SHIFT+ENTER

    Where B1:B10000 contains the randomly generated spins and J2:J19 contains the list of red numbers

    See attached
    Attached Files Attached Files
    Last edited by daddylonglegs; 08-24-2008 at 09:52 AM.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    Please Login or Register  to view this content.
    confirmed with ctrl+shift+ enter
    will give you number of times 5 consecutive reds are found
    change range to suit and the last digit is the length of sequence you wish to find
    but first change all thos numbers to either red or black using
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-24-2008
    Location
    ireland
    Posts
    5

    Re: Help with roulette data

    Hi again guys,

    Thanks so much for those solutions. Really appreciated!!!!!!!!

    I was wondering as well if there was a way that, instead of giving the number of consecutive Reds or Blacks in a row, it could tell me how many spins have passed without either a Red or a Black so that Zero's can be taken into the equation.

    For example, a sequence of B,R,R,R,0,R,R,R,0,0,R,B would show that 10 spins have passed without a Black number, but with the last worksheet only two sets of 3 consecutive Reds would have shown up.

    If there was anyway this could be achieved i would really appreciate it.

    Stephen

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Help with roulette data

    =SUM(--(FREQUENCY(IF(A1:A35<>"B",ROW(A1:A35)),IF(A1:A35="B",ROW(A1:A35)))=10))
    would tell you the number of times there were sequences of EXACTLY 10 when no black spun
    again array entered
    Dont forget you could Change =10 to say =B1 and put in b1 the number of times you want checked instead
    or even
    in row 1
    =SUM(--(FREQUENCY(IF($A$1:$A$35<>"B",ROW($A$1:$A$35)),IF($A$1:$A$35="B",ROW($A$1:$A$35)))=ROW()))
    again array entered and dragged down this would increment by 1 for each row dragged down so you could see at a glance by looking at row 10
    number of times there were sequences of EXACTLY 10 when no black spun row 3 would show the same for sequences of 3 and so on
    Last edited by martindwilson; 01-28-2009 at 11:15 AM.

  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: Help with roulette data

    Adapted from http://mathworld.wolfram.com/Run.htm...m.com/Run.html

    In a trial of N spins, if you put a 1 beside the first Black in a series of Blacks, a 2 beside the second Black, a 3 beside the next, ... then the number of expected m's (m=1, 2, 3, ...)

    =N * (1 - p) * p ^ m where p = 18/37 for a roulette wheel.

    This yields the expectation in the second column below:
    Please Login or Register  to view this content.
    As expected, the total is (approximately) the total number of expected Black in 10,000 spins (= 10,000 * 18/37; there are small probabilities beyond 20 consecutive Blacks). These are runs of m or more blacks; so to calculate runs of exactly m Blacks followed by a White or Red, subtract adjacent rows as in the third column.

    If you take the sumproduct of the m and Exactly m columns, it totals (approximately, for the same reason) the same result.

    Column J numbers dovetail pretty well with your trial. The last two columns show the results of my 10,000-spin run.
    Last edited by shg; 01-28-2009 at 01:18 PM.
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Registered User
    Join Date
    08-24-2008
    Location
    ireland
    Posts
    5

    Re: Help with roulette data

    Thanks for the help again guys.

    do any of u know how to formulate the following scenario:

    to count how many times 8 reds occur in a row, followed by a zero, followed by a red
    to count how many times 8 reds occur in a row, followed by a zero, followed by a black

    to count how many times 9 reds occur in a row, followed by a zero, followed by a red.
    to count how many times 9 reds occur in a row, followed by a zero, followed by a black.

    etc. etc.

    It would be great if somebody could update this attachment as i have a little trouble understanding the longer formulas.

    All help much appreciated.

    Stephen
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    08-24-2008
    Location
    ireland
    Posts
    5

    Re: Help with roulette data

    Quote Originally Posted by martindwilson View Post
    =SUM(--(FREQUENCY(IF(A1:A35<>"B",ROW(A1:A35)),IF(A1:A35="B",ROW(A1:A35)))=10))
    would tell you the number of times there were sequences of EXACTLY 10 when no black spun
    again array entered
    Dont forget you could Change =10 to say =B1 and put in b1 the number of times you want checked instead
    or even
    in row 1
    =SUM(--(FREQUENCY(IF($A$1:$A$35<>"B",ROW($A$1:$A$35)),IF($A$1:$A$35="B",ROW($A$1:$A$35)))=ROW()))
    again array entered and dragged down this would increment by 1 for each row dragged down so you could see at a glance by looking at row 10
    number of times there were sequences of EXACTLY 10 when no black spun row 3 would show the same for sequences of 3 and so on
    Hi Martin

    If its not too much bother could i trouble you to enter that formula into my attached workbook. I'm a bit of a newbie with this whole excel thing, and when i copy and paste your formula it comes up with errors and doesn't seem to work. What you have explained is exactly what i want to see but i want to be able to quantify it so that i can have a table showing how many times there were sequences of exactly 10 when no black showed up for example.

    Again, i'm grateful for any help.

    Cheers
    Stephen
    Attached Files Attached Files

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Help with roulette data

    stephen as requested but i dont know how to do
    to count how many times 8 reds occur in a row, followed by a zero, followed by a black
    those! (and i cant open xlsx from work)
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    08-24-2008
    Location
    ireland
    Posts
    5

    Re: Help with roulette data

    Hi Martin

    Thanks again for your help. Unfortunately I don't seem to be able to paste that formula into my workbook (not sure why it doesnt work- as i said i'm at a very basic level with excel...)

    I've attached another workbook and saved it this time as an .xls file, it shows exactly the set-up i'm trying to achieve but obviously doesn't have the formula to calculate the number of times a sequence without, say, 7 reds occurs.

    Without trying to pester you, I would really appreciate it if you could enter that formula so that it works in the table i have set up. Instead of the "R" and "B", i've tried to include the numbers and the column to the right shows which numbers are Red and which are Black.

    I would be grateful of any help and sorry again for the hassle.

    Regards,
    Stephen.
    Attached Files Attached Files

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Help with roulette data

    this seems to work. notice i added column to give red/ black /zero based on numbers on a standard single zero wheel which the formula checks against.
    and some pretty conditional formatting oh i think i left calculation set to manual so hit f9 to recalc. or set it back to auto
    Attached Files Attached Files
    Last edited by martindwilson; 01-31-2009 at 04:21 PM.

  12. #12
    bugmenot
    Guest

    Re: Help with roulette data

    How do you change it to 1000 times in a row instead of 100?

  13. #13
    Registered User
    Join Date
    07-29-2010
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Help with roulette data

    I have created a simple roulette program that just randomizes numbers from 0 to 37 in Row A. I use the number 37 to represent the "double 00". It creates 1000 random numbers in column A.
    Please Login or Register  to view this content.
    I would like to to create column B such that if the random number generated in column A is greater than 12 but less than 37 you win your bet back + 1/2 your bet. In other words if you bet $1.00 you would increase you pot by 50 cents. However if you lost you would then decrease the pot by $2.00 and your next bet would double to $2.00. Each time you won your next be would revert back to $1.00 and start over. This is generally like the doubling ploy many gamblers use. Below is an example of what the spreadsheet would look like:

    Staring pot $100


    Also I need to revert back to base bet of $1.00 if there are 5loss in a row. Any ideas would be greatly appreciated.
    Last edited by shg; 07-31-2010 at 02:29 PM.

  14. #14
    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: Help with roulette data

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then start your own thread.

    Thanks.

  15. #15
    Registered User
    Join Date
    01-11-2011
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Roulette data

    Hi stephenhughes99

    I wonder if you can confirm something for me. I'm new to this forum and would like to know the following:

    The data in connection to the 10000 spins, is this based on a real 'Auto Spin' / 'Live Dealer' results or is it based on a computer programme?

    Also - 0 (start) and 12 (in) shows as only coming in the once out of 10000 spins - is this correct?

    Look forward to receiving your reply.

    Thanks

  16. #16
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Roulette data

    your guess is as good as any there is probably no difference between simulated or "live" it's purely random
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  17. #17
    Registered User
    Join Date
    08-18-2011
    Location
    monterrey
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Roulette data

    the best sistem to try to win on roullete is this:
    bet one coin to the 2 docens if you lose bet 3 coins,then 7 coins, then 24, then stop. you have to win 10 coins and stop. that is the best sistem but always have the chance to lose. let me be more clear. if a 8 come you bet 1 coin to second and third column, then if comes a 0, you bet 3 coins to second and third column, if then comes a 12, you bet 7 coins to the second and third column, if then comes a five you bet 24 coins for second and third column....but there are no way to win always on roulette. good luck.
    Last edited by shg; 08-20-2011 at 11:47 AM. Reason: deleted quote

  18. #18
    Registered User
    Join Date
    04-20-2012
    Location
    Pawtucket, RI
    MS-Off Ver
    Excel 2000
    Posts
    1

    Re: Roulette data

    Howdy Guys,

    Granted, Steve’s idea was to simulate the American Roulette board with using the random selection request associated with Red and Black with the two Greens being 0 & 37 on this request, but suppose I were to ask if this task could be converted to the request of numbers, no colors, from the correct position on this roulette wheel. And again, the duplicate sequence of numbers so-to-speak instead of Steve’s color request.

    But I see the Roulette Wheel numbers being stationary and not random. The roulette ball is the random process as to its place to stop on a number from this list.

    The numbers starting with the 00 and moving clockwise would be listed correctly as,
    27,10,25,29,12,8,19,31,18,6,21,33,16,4,23,35,14,2,0,28,9,26,30,11,7,20,32,17,5,22,34,15,3,24,36,13,1

    Also, once the first random request sequence is finished, the next request should begin at the last number of the previous sequence and run in reverse through the wheel list of numbers listed above.

    1. So, could the last number of the first random generated list, be considered as where the roulette ball is positioned as its starting point and the first number compiled

    2. Then the next random generated list must run in the reverse sequence of the Roulette Wheel numbers from the starting point of the list as the last number compiled. This would be the next sequenced number compiled.

    3. Then the next list generated from the forward rotation and so-on.

    This would be as close to utilizing the actual play of the ball and the roulette wheel.

    Thanks, Gary

  19. #19
    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: Roulette data

    In selecting a random result, the actual order of appearance on the wheel makes no difference.

  20. #20
    Registered User
    Join Date
    01-02-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Roulette data

    how do i change this to be 100,000 spins?

  21. #21
    Registered User
    Join Date
    11-19-2013
    Location
    Portsmouth England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Roulette data

    Hi All

    Still trying to get my head around excel - the comment below was great but is there a way to change the RED/Black code below to also include "green" for zero please ?

    Thanks in advance for any help


    Quote Originally Posted by martindwilson View Post
    Please Login or Register  to view this content.
    confirmed with ctrl+shift+ enter
    will give you number of times 5 consecutive reds are found
    change range to suit and the last digit is the length of sequence you wish to find
    but first change all thos numbers to either red or black using
    Please Login or Register  to view this content.

  22. #22
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Roulette data

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

  23. #23
    Registered User
    Join Date
    03-20-2015
    Location
    spains
    MS-Off Ver
    2003
    Posts
    1

    Re: Roulette data

    thanks for your sheet!

  24. #24
    Registered User
    Join Date
    04-23-2016
    Location
    utah
    MS-Off Ver
    2013
    Posts
    3

    Re: Help with roulette data

    I am not able to download this .xls to look at it, it appears I am too new to the forum? Any way I can get this from you?

  25. #25
    Registered User
    Join Date
    04-23-2016
    Location
    utah
    MS-Off Ver
    2013
    Posts
    3

    Re: Help with roulette data

    I am not able to download this SEQUENCE2.xls‎ to look at it, it appears I am too new to the forum? Any way I can get this from you?

  26. #26
    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,938

    Re: Roulette data

    Which post did you try from?
    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

  27. #27
    Registered User
    Join Date
    04-23-2016
    Location
    utah
    MS-Off Ver
    2013
    Posts
    3

    Re: Roulette data

    Quote Originally Posted by FDibbins View Post
    Which post did you try from?
    Hey FDibbins, I tried downloading again from post #11 and it worked.

    Not sure but last night it kept asking me to log in then it would say something to the effect that I couldn't download this because I didn't have sufficient privileges.

  28. #28
    Registered User
    Join Date
    11-19-2019
    Location
    Srilanka
    MS-Off Ver
    2010
    Posts
    1

    Re: Roulette data

    how to download excel file?

  29. #29
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Roulette data

    Welcome to the forum.

    Just click on any of the attachments to this thread to download them.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Data and number manipulation
    By Mwhite in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-15-2015, 06:41 AM
  2. Copying and Pasting Array Data.. etc
    By amedhussaini in forum Excel General
    Replies: 1
    Last Post: 02-20-2008, 05:27 PM
  3. Replies: 2
    Last Post: 02-14-2008, 05:02 PM
  4. Macro to create new sheets from master data sheet
    By adsigel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2006, 09:21 AM

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