TAILIEUCHUNG - Matematik simulation and monte carlo with applications in finance and mcmc phần 2

Máy phát điện congruential tuyến tính 21 Do đó, tùy thuộc vào điều kiện () và () m + 1 + c ≤ - Xi w + a mod Xi u + c ≤ m - 1 u Để thực hiện quá trình m mod trong phương trình () chỉ cần đặt Zi 1 = - Sau đó, Xi 1 = Zi 1 Zi 1 + m Zi ≥ 0 Zi | Linear congruential generators 21 Therefore subject to conditions and m 1 c X w a X mod u c m u - 1. To perform the mod m process in Equation simply set Zi 1 X w a X mod u c. u Then X 1 Z 1 Zi 1 m Z 0 Z 0 . The Maple procedure below named schrage implements this for the full period generator with m 232 a 69069 and c 1. It is left as an exercise see Problem to verify the correctness of the algorithm and in particular that conditions and are satisfied. It is easily recoded in any scientific language. In practice it would not be used in a Maple environment since the algorithm is of most benefit when the maximum allowable size of a positive integer is 232 . The original generator with these parameter values but without the Schrage innovation is a famous one part of the SUPER-DUPER random number suite Marsaglia 1972 Marsaglia et al. 1972 . Its statistical properties are quite good and have been investigated by Anderson 1990 and Marsaglia and Zaman 1993 . schrage proc local s r global seed s seed mod 62183 r seed-s 62183 seed 49669T 69069 s 1 if seed 0 then seed seed 2 32 end if evalf seed 2 32 end proc Many random number generators are proprietary ones that have been coded in a lower level language where the individual bits can be manipulated. In this case there is a definite advantage in using a modulus of m 2b. The evaluation of aXi 1 c mod 2b is particularly efficient since X is returned as the last b bits of aXi 1 c. For example in the generator X7 9 X 13 3 mod 16 . In binary arithmetic X7 1001. X 1101. 11. mod 10000. . Now 1001. X 1101. 11. 0 1 10 1000. 0 000 1 1 0 1. 0000 00 1 1. 0 1 1 1 1000. 22 Uniform random numbers Note that the first row of gives 1000. X 1101. by shifting the binary as opposed to the decimal point of 1101. 3 bits to the right. The second row gives 0001. X 1101. and the third row is 11. . The sum of the three rows is shown in . Then X7 is the final 4 bits in this row that is 1000. or X7 8 in the .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.