[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 1.33 MB, 324x400, 1600254083239.webm [View same] [iqdb] [saucenao] [google]
12138898 No.12138898 [Reply] [Original]

How do you get random values?

>> No.12138901

Flip a coin.

>> No.12138902

>>12138898
automate it

>> No.12138948

>>12138898
The short, correct answer is that you cannot. Random sampling algorithms are just quasi-random, but they work sufficiently well, especially for applications in mathematics and statistics. Even if they depend on some non-random seeding parameters, such algorithms will never satisfy the fundamental property of random variables, that is, to be specified at best by a probability distribution. There are many books on the subject, but you really don't want to get too much into that unless you actually are planning to specialize in this subset of computer science (which is weird). My tip is to just learn what seeding is and how to sample from pre-built algos in common languages like python, R, Matlab: I am talking about piss easy business.

>> No.12138959

>>12138948
But some MCUs have "true" random generators based on hardware white noise. What can be more true?

>> No.12138964

>>12138898
Close your eyes and point your finger at something without looking. Open your eyes and pick the thing your finger is pointing at.

>> No.12138984

>>12138959
I am not aware of those, but I doubt that such algorithms will satisfy all the conditions for random number generation, which are very strict and require a lot of testing. It's sufficient for quasirandom algorithms to be 'good enough', in the sense that spotting deterministic sequences is so time consuming and irrelevant that they may as well be random for the purpose of a simple application, like stochastic simulations. It all depends on how much OP wants to go down the rabbit hole. If his field is app math or engineeering, they won't have to even scratch the surface.

>> No.12139015

>>12138898
The unironic answer is get the most accurate possible measurement of something and use the least significant digits.

>> No.12139046

>>12138984
There are many implementations such as thermal noise, so a simple resistor or any other element generates plenty of random thermal noise that can be amplified as voltage and digitized via ADC. The only problem with these generators are they need to be robust enough against various attacks such as decreasing the temperature of the system, etc. And they are also prone to silent failures, i.e. the randomness can decrease due to various complicated factors that are hard to diagnose. But thats if you roll your own. Chips like STM32 are considered a good source of RNG that can be used for crypto applications. They have some analog circuitry that provides a physical entropy source. They have multiple ring oscillators with outputs are XORed together. They deliberately introduce a clock drift between them. Then they have some sort of analog and digital filters to randomize it even more. In applications where performance is an issue and not enough entropy is generated per unit of time they instead use RNG as a seed to a pseudo random function but thats good enough.

>> No.12139070

>>12139046
That's fascinating. I am looking right now at quantum number generators. Indeed physical processes that are in theory described completely by probability distributions do exist. Whitening adjustments in the measurement would ensure random number generation. However yes, there are allegedly decay problems, and also sampling problems which impose physical limits on these generators. It would be a daunting task to actually construct hardware that will generate a true random number with no problems and immaculate testing, which would probably take millennia. If OP wants to Monte Carlo something, scipy really is enough in my opinion.

>> No.12139072

>>12138948
Retard
>what is quantum mechanics

>> No.12139347

>>12138898
random.org

>> No.12139604

>>12138898
You can pay me for rolling dice. After payment is confirmed I will send you the numbers encrypted with a public key that you will provide. 1 KB limit.

>> No.12139757 [DELETED] 

>>12138898
I use pseudo-random generators like complimentary multiply with carry, xorshift, twister, etc, seeded by the time.

>> No.12139933

>>12138898
You take in random numbers of before generations, statistically count possible ways of their cross-deduction in certain order, save amount of their truthfullness, start with same crossdeduction methods, with different slice in those generated numbers, save amount of what those numbers are probable to certain outcome, count probability for every value in at set, select numbers with biggest probabilities of outcome.

That's so randomy random it makes you think. It always tends to go towards simillary looking numbers and their nodes in base 10 arabic system in first derivative of their points, and pick numbers that are next in the row, repeat.

Will this system ever collapse towards having unequal probability or be different kind of noise?

I think it doesn't. It would be paper but I hate tex.

>> No.12139938

>>12138898
There is no such thing as random, you just have to pretend its random enough

>> No.12140377

>>12139072
still not fundamentally random

>> No.12141150

>>12140377
oh? show your work pls.

>> No.12141443

>>12139347
>random.org
This.
>> offers true random numbers to anyone on the Internet. The randomness comes from atmospheric noise, which for many purposes is better than the pseudo-random number algorithms typically used in computer programs.

>> No.12141447

>>12138898
use a random number generator

>> No.12141448

>>12138898
pi if it doesn't matter

>> No.12141450

>>12138898
roll some dice
problem solved

>> No.12141463
File: 192 KB, 625x399, A Million Random Digits.jpg [View same] [iqdb] [saucenao] [google]
12141463

>>12138898

>> No.12142639

>>12141443
>for many purposes
lol always fine print.
so for which "purposes" is it NOT better?

>> No.12143655

>>12141150
there's still a real electron that travels between the seperated parts it's not just a average we only perceive it as a average that average still needs to follow that real electron in some way
if you found some way to detect that real electron you could determine it's outcome (I know you can't do this but the problem is it's mathematically possible just maybe not physically possible)
true randomness is impossible because it would violate causality with any random selection or other process there's always a underlining cause that dictates what that number will be

>> No.12143691
File: 195 KB, 1199x1551, Bell_Prob.png [View same] [iqdb] [saucenao] [google]
12143691

>>12143655

Quantum mechanics is wrong anyway.

>> No.12143697

>>12138898
Sample values from a very very very big integer, practically speaking
Also this >>12138948

>> No.12143767

>>12142639
It's badly worded. I suspect what they mean is "pRNG is fine for most purposes, except for things like cryptography, where you need true random." Atmospheric random noise won't work if it can't generate a true random bit stream fast enough for your application.

>> No.12143774

>>12143691
Brainlet detected.

>> No.12143780

>>12143655
Causality and determinism are not the same thing

>> No.12143790

>>12143774
>Brainlet detected

Point out an error. The results of bell type experiments can be explained by deterministic classical physics.

>> No.12143798

>>12138898
I read a thesis once that suggest using ocean waves or waterfall imact as basis, forgot how though

>> No.12143811

>>12143790
Not that anon, but how do you explain the contradictory correlations of the spin of entangled particles classically?

>> No.12143816

>>12138898
Make there be no upper bound.

>> No.12143821
File: 268 KB, 1700x2200, digits.jpg [View same] [iqdb] [saucenao] [google]
12143821

By book

>> No.12144110
File: 89 KB, 679x522, 1598921003662.jpg [View same] [iqdb] [saucenao] [google]
12144110

>>12138898
Become an atheist

>> No.12144161

>>12138898
Take a small kids swimming pool. And fill it with plastic balls. With numbers. And a random assortment of math signs +/×/÷/=/(sqrt) . Then put a pitcher or two on the ground. Stand between the pitchers and the pool with you back towards the pitchers. Take a shovel and start lobbing plastic valls behind you until you are satisfied... wether it's one shovel or the pool is void of plastic balls. And then what ever lands in the pitchers. You decide how to arrange the maths signs and the numbers. Wether you want to say +is always first or just the order in which you pool out the balls. Decides how the order of operations works. Either way. I doubt you will come up with the same values each time. If it starts coming up to the same values everytime. That will baffle me. Unless you are saying you get the value Zero often because no numbers land in the pitchers. The only other condition that might make it more "random" is adding plastic valls if various sizes. Like ping pong balls. And put balls. Or plastic whiffle balls. This is probably as close as you can get to "random" values.

>> No.12144224
File: 64 KB, 500x296, QRNG_beam_splitter.jpg [View same] [iqdb] [saucenao] [google]
12144224

>>12138898
>How do you get random values?
Quantum Random Number Generator

>> No.12144358

>>12144161
He's talking about true random numbers, who's path cannot be determined through physics.

>> No.12144363

>>12144358
Ahh. My bad.

>> No.12145042

>>12143780
no but to determine something with 100% accuracy you just need to know all the variables and causes in that system so causality still plays a big role in it

>> No.12145667

>>12145042
No I mean there are systems that are causal but not deterministic.
State A can evolve into state B, C, or D. It can NOT evolve into state E or F or any other state. However, which state it evolves into out of B, C, or D is not deterministically defined - it's completely, truly, random, with no underlying mechanism.
This is causality (state A causes state B, C, or D) but not deterministic (there is no deterministic process that causes one of the three states over the other. It is completely random and non deterministic, there is no secret underlying determinism that we are ignorant of. It simply goes to one of those three states randomly).
Determinism is a stricter form of causality. The universe that we live in is causal but not deterministic.

>> No.12145670

>>12138898
random value generator

>> No.12145674

>>12145670
>random value generator
How does it generate random values?

>> No.12145689

>>12138898
Make a very poor quantum computer and use the output as a number

>> No.12145711

True random does not exist

>> No.12145802

>>12138898
Think one or think a string of numbers.

>> No.12145863

>>12144161
>all balls have 0 on them

what now?

>> No.12145864

>>12145674
randomly

>> No.12145869

>>12138898
Measure temperature down to like 18 decimals, then take out a couple of numbers from the middle. Thats the easiest method.

>> No.12145960

>>12145667
>No I mean there are systems that are causal but not deterministic.
Brainlet here, can u give me an example pls

>> No.12146000

>>12138898
Religion

>> No.12146028

>>12145802
You share your deep taughts like that? Aren't you afraid of getting decoded?

>> No.12146039

>>12140377
You not too bright, are you?

>> No.12146120

>>12146039
Do you deny the fact stuff happens while you're not looking just so you can deny somebody's banging your wife?

>> No.12146159

>>12138898
Give pregnant mother brain derived neurotropic factor antagonist and then ask autistic kid for number.

>> No.12146165

>>12146159
Is that what's in the vaccines?