Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- How can I draw Empirical graph of dice propblem

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-07-2019
12:34 AM

04-07-2019
12:34 AM

I'd like to make a code which can make the empirical graph of dice when the dice is only "6"

However, as you can see, the probability is not the same as theory.

Is there anybody telling me the mistake that I did? The answer has to be '0.166666666...'

plz, help me

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-08-2019
04:11 AM

04-08-2019
04:11 AM

Is there anybody telling me the mistake that I did?

rnd(5) creates a float random number in the range 0 .. 5

You ask for the number being > 4 and count the range from 4 to 5 which is 1/5 of the range 0 to 5. Consequently you get a result near 0.2.

Use rnd(6) and condition ">5" and you get the result you'd like to see.

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-08-2019
03:07 AM

04-08-2019
03:07 AM

Re: How can I draw Empirical graph of dice propblem

Something like this perhaps:

There are other ways as well of course!

Alan

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-08-2019
04:11 AM

04-08-2019
04:11 AM

Is there anybody telling me the mistake that I did?

rnd(5) creates a float random number in the range 0 .. 5

You ask for the number being > 4 and count the range from 4 to 5 which is 1/5 of the range 0 to 5. Consequently you get a result near 0.2.

Use rnd(6) and condition ">5" and you get the result you'd like to see.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-08-2019
04:51 AM

04-08-2019
04:51 AM

Re: How can I draw Empirical graph of dice propblem

Thank U so much.

I thought that rnd Function is similar to randi in Matlab.

It is not an integer in Mathcad

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-08-2019
04:52 AM

04-08-2019
04:52 AM

Re: How can I draw Empirical graph of dice propblem

Thank U so much.

I learned another way thanks to U

Top Tags