← RoseCode

ROSECODE 451

Value of dot product

liuguangxi · Probability ·

There are two random vectors a=[a1,a2] and b=[b1,b2]. Let s be the dot product of these two vectors, that is s=ab=a1b1+a2b2.

Assume a1, a2, b1, b2 are mutually independent random variables of the uniform distribution on the interval [0, 2]. Find the probability of value s less than 5 and the expected value of s. Give your answer rounded to 8 digits after the decimal point.

Answer format: [probability],[expected value]
(Sample input: 0.12345678,1.23456789)


Thanks to baihacker for the idea.