[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51068] Incorrect result of random number gene
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #51068] Incorrect result of random number generator |
Date: |
Fri, 19 May 2017 10:02:25 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
URL:
<http://savannah.gnu.org/bugs/?51068>
Summary: Incorrect result of random number generator
Project: GNU Octave
Submitted by: None
Submitted on: Fri 19 May 2017 02:02:23 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Linglin
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 4.2.1
Operating System: Other
_______________________________________________________
Details:
Hi, I am currently using esponential random number generator and uniform
random generator to do some experinment. However, I found that the histogram I
drawn from the data set genreated is not as expected.
I will put the result I got in the document.
For the exponential random number generator, I am using this:
t4_real=mod(exprnd(lambda4,1,2*n),9) + 1 ;
This function is used to generate a exponential random number from range
[1,10]. According to the property of exponential random number generator, the
number "1" should appear more than number "2". However, it works the other
way around.
Please let me know why it happens like this.
1. Run expo.m
2. open original.csv
3. Create a new collumn with 0 to 10
4. Select column E
5. Choose "Statistics" -> Descriptive Statistics -> Histogram
6. Using the created collumn as cut off
7. Then you will see the result.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 19 May 2017 02:02:23 PM UTC Name: expo.m Size: 3kB By: None
<http://savannah.gnu.org/bugs/download.php?file_id=40736>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51068>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51068] Incorrect result of random number generator,
anonymous <=