• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Any maths / statistics whizzes here?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #21
    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!

    Comment


      #22
      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

      Comment


        #23
        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.
        Scoots still says that Apr 2020 didn't mark the start of a new stock bull market.

        Comment


          #24
          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!

          Comment


            #25
            Originally posted by scooterscot
            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....

            Comment


              #26
              Originally posted by scooterscot
              I'm a R guy myself.
              Write the same program in R then.
              Down with racism. Long live miscegenation!

              Comment


                #27
                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.

                Comment


                  #28
                  Originally posted by scooterscot
                  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.

                  Comment


                    #29
                    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!

                    Comment


                      #30
                      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!

                      Comment

                      Working...
                      X