Any maths / statistics whizzes here? Any maths / statistics whizzes here? - Page 3
Page 3 of 8 FirstFirst 12345 ... LastLast
Posts 21 to 30 of 72
  1. #21

    Respect my authoritah!

    NotAllThere is always on top

    NotAllThere's Avatar
    Join Date
    Aug 2007
    Location
    Far away from HMRC
    Posts
    23,502

    Default

    Quote Originally Posted by DealorNoDeal View Post
    I simulated a 1000-sided dice being rolled 4 times per week. So, any 4 numbers from 1-1000, could come up each week.

    After 250 weeks, on average, 663 numbers will have come up. After 500 weeks, 865 numbers etc.

    Of course, that may not have been what the OP meant.
    It's a good approach, but he wants to know after how long would you expect all people to have "done it". Also, you could get duplicates in a week, which isn't allowed. Weeks 1-249, the probability is zero. Then I got stuck.

    My son and my dad independently came up with a 90% chance of it being done by week 575, and 99.9% chance of it being done by week 1724. But I don't know their working.
    Down with racism. Long live miscegenation!

  2. #22

    Godlike

    Lance - scorchio!

    Lance's Avatar
    Join Date
    Sep 2013
    Location
    home
    Posts
    5,274

    Default

    Quote Originally Posted by SimonMac View Post
    I am looking to see if I can extrapolate some numbers based on the information set I have.

    If a sample is 100% and each week 0.4% "do a thing", how long would it take on average for all (or at least a statistically significant number) the people to do "the thing", I assume it's not as simple as 100 / 0.4 = X number of weeks
    Insufficient information to calculate......

    For example...l it it’s the same 0.4% every week then it will only ever be 0.4%.
    Or do you mean 0.4% each week where none of the 0.4% are me,bees of the precious 0.4%s?
    Or is the 0.4% random every time?
    See You Next Tuesday

  3. #23

    Contractor Among Contractors

    DealorNoDeal is NOT a disguised employee

    DealorNoDeal's Avatar
    Join Date
    Dec 2009
    Posts
    1,397

    Default

    Quote Originally Posted by NotAllThere View Post
    It's a good approach, but he wants to know after how long would you expect all people to have "done it". Also, you could get duplicates in a week, which isn't allowed. Weeks 1-249, the probability is zero. Then I got stuck.

    My son and my dad independently came up with a 90% chance of it being done by week 575, and 99.9% chance of it being done by week 1724. But I don't know their working.
    I overlooked that.

    I hope the 0.4% isn't the number who will be allowed out of lockdown each week.

  4. #24

    Respect my authoritah!

    NotAllThere is always on top

    NotAllThere's Avatar
    Join Date
    Aug 2007
    Location
    Far away from HMRC
    Posts
    23,502

    Default

    Just knocked up a quick and dirty Java program, based on a population of 1000 people.
    Code:
    package randomActions;
    
    import java.util.ArrayList;
    
    public class randomActionPoint4 {
    	public static void main(String[] args) {
    		int runningTotal = 0;
    		for (int j = 1; j <= 10000; j++) {
    			ArrayList<Integer> chosen = new ArrayList<Integer>();
    			for (int i = 1; i <= 10000; i++) {
    				ArrayList<Integer> choices = new ArrayList<Integer>();
    				choices.add(getUnique(choices));
    				choices.add(getUnique(choices));
    				choices.add(getUnique(choices));
    				choices.add(getUnique(choices));
    				for (Integer choice : choices) {
    					if (!chosen.contains(choice)) {
    						chosen.add(choice);
    					}
    				}
    				if (chosen.size() == 1000) {
    					runningTotal = runningTotal + i;
    					break;
    				}
    			}
    		}
    		System.out.println(runningTotal/10000);
    	}
    
    	private static int getUnique(ArrayList<Integer> choices) {
    		int choice;
    		do {
    			choice = (int) (Math.random() * ((1000 - 1) + 1)) + 1;
    		} while (choices.contains(choice));
    		return choice;
    	}
    
    }
    I've run it a few times, and each time it took on average 1866 weeks for all 1000 people to do it. I'm pretty sure the result is independent of the population size.
    Down with racism. Long live miscegenation!

  5. #25

    Richer than sasguru

    DimPrawn is always on top

    DimPrawn's Avatar
    Join Date
    Jul 2005
    Location
    Covid City
    Posts
    36,183

    Default

    Quote Originally Posted by scooterscot View Post
    You are so bored.

    I'm a R guy myself.
    I'm shocked anyone pays you for anything they might rely on as truthful or accurate....

  6. #26

    Respect my authoritah!

    NotAllThere is always on top

    NotAllThere's Avatar
    Join Date
    Aug 2007
    Location
    Far away from HMRC
    Posts
    23,502

    Default

    Quote Originally Posted by scooterscot View Post
    I'm a R guy myself.
    Write the same program in R then.
    Down with racism. Long live miscegenation!

  7. #27

    Godlike

    jamesbrown is a fount of knowledge

    jamesbrown's Avatar
    Join Date
    Dec 2011
    Posts
    9,030

    Default

    Quote Originally Posted by NotAllThere View Post
    Just knocked up a quick and dirty Java program, based on a population of 1000 people.
    I've run it a few times, and each time it took on average 1866 weeks for all 1000 people to do it. I'm pretty sure the result is independent of the population size.
    1866 = log10(x) / log10(1-0.004)

    x=10^1866*log10(0.996)
    x = 0.0005648
    x% = 0.05648

    In other words, roughly 0.05% would be left after 1866 weeks.

    Of course, you can't have 0.4% of one person.

  8. #28

    Godlike

    jamesbrown is a fount of knowledge

    jamesbrown's Avatar
    Join Date
    Dec 2011
    Posts
    9,030

    Default

    Quote Originally Posted by scooterscot View Post
    You are so bored.

    I'm a R guy myself.
    You're hilarious. Didn't I tell you about R a couple of years ago on this very forum?

    Risk analyst (or whatever you call yourself), my arse.

  9. #29

    My post count is Majestic

    MarillionFan is a fount of knowledge

    MarillionFan's Avatar
    Join Date
    Jul 2005
    Location
    .
    Posts
    35,987

    Default

    Quote Originally Posted by SimonMac View Post
    I am looking to see if I can extrapolate some numbers based on the information set I have.

    If a sample is 100% and each week 0.4% "do a thing", how long would it take on average for all (or at least a statistically significant number) the people to do "the thing", I assume it's not as simple as 100 / 0.4 = X number of weeks
    OH. FFS. Is this you trying to get 4 people out of a 1000 to send out one of your chainmails on Facebook again (otherwise they die). It aint going to happen, you only have 20 Facebook friends and only 2 of them actually like you.
    What happens in General, stays in General.
    You know what they say about assumptions!

  10. #30

    My post count is Majestic

    MarillionFan is a fount of knowledge

    MarillionFan's Avatar
    Join Date
    Jul 2005
    Location
    .
    Posts
    35,987

    Default

    Quote Originally Posted by jamesbrown View Post
    Of course, you can't have 0.4% of one person.
    And the average number of legs for humanity is <2
    What happens in General, stays in General.
    You know what they say about assumptions!

Tags for this Thread

Posting Permissions

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