Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Please help!!!!

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy Please help!!!!

    Just basic ideas and hints would help.
    Thank you so much.

    Here is the problem:

    Disease transmission, a monte carlo example.

    Student has 5% chance of contact with another random student.
    Each contact has a 7% chance of disease transmission.
    After student is infected, they will not be contagious for the first three days and will become contagious for the fourth and fifth days. The sixth day, the student will not come to school. A student can not be re-infected if he/she is already infected.

    Ignoring other variables....

    If there are 550 students, what is the change of you catching the disease? Given that you are not the first to have the disease.

  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    6,287
    My Mood
    Mellow
    Thanks
    252
    Thanked 777 Times in 762 Posts

    Default Re: Please help!!!!

    Welcome to the forum!

    You'll have to show what you've done so far to get help. We can't write it for you. It's our own version of ignoring other variables . . .

  3. The Following User Says Thank You to GregBrannon For This Useful Post:

    potatoes (December 4th, 2013)

  4. #3
    Junior Member
    Join Date
    Dec 2013
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Please help!!!!

    Quote Originally Posted by GregBrannon View Post
    Welcome to the forum!

    You'll have to show what you've done so far to get help. We can't write it for you. It's our own version of ignoring other variables . . .
    I have no programming experience and this is an assignment assigned from my statistics teacher. I'm not looking for a program, I was just wondering if I could get a hint on how to start since I can't even start.

    Sorry and thanks

  5. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,265
    Thanks
    56
    Thanked 2,372 Times in 2,343 Posts

    Default Re: Please help!!!!

    Try thinking about how you would do it with a paper, pencil and calculator. Write some ideas down, think about how they might work, refine the ideas and write down some more.
    If you don't understand my answer, don't ignore it, ask a question.

  6. #5
    Junior Member
    Join Date
    Dec 2013
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Please help!!!!

    Quote Originally Posted by Norm View Post
    Try thinking about how you would do it with a paper, pencil and calculator. Write some ideas down, think about how they might work, refine the ideas and write down some more.

    I tried writing down ideas but i was wondering:
    I'm assuming I would have to run numerous trials to get a close number.
    So could you use for loops to perform these numerous trials?
    And would you have to use an array to store all the students?

  7. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,265
    Thanks
    56
    Thanked 2,372 Times in 2,343 Posts

    Default Re: Please help!!!!

    I wouldn't worry about loops or arrays until the overall design for the program is done. Once you have a design, then worry about how to implement it.

    Student has 5% chance of contact with another random student.
    What is the time-frame for that event? Once a day, week, lifetime?
    If you don't understand my answer, don't ignore it, ask a question.

Tags for this Thread