Assignment #71. Here are some funcs that define random variables and their expectation. Your job is to write ISETL funcs to add and multiply random variables. Then prove that Exp( X .Plus Y) = Exp(X) + Exp(Y) Explain how this is related to the way we began this course. Find some conditions that make Exp( X .Times Y ) = Exp(X) * Exp(Y). IsRanVar := func(X,space); $ requires: you fill this in $ effects : returns true if X is a random variable on space and $ false otherwise return is_set(space) and forall x in space| is_number(X(x)); end; MakeExpOp := func(pr opt space); $ requires: pr is a density $ effects : returns the expectation operator of pr local Exp; if space = OM then space := domain(pr); end; Exp := func(X); $ requires: X is a random variable on space return %+[ X(s)*pr(s): s in space]; end; return Exp; end;2. Write the funcs indicated below. Check the correctness of your answerswith the use of the Num____ funcs of Assignment #5 and/or any other method.Try to make your code direct and efficient. Do not use the RandTup,..,etcfuncs; we will discuss why not in class.AllTups := func(k,S);$ requires: k is a positive integer; S is a set$ effects : returns the set of tuples with k elements from SAllSets := func(k,S);$ requires: k is a positive integer; S is a set$ effects : returns the set of sets with k elements from SAllPerms := func(k,S);$ requires: k is a positive integer; S is a set$ effects : returns the set of perms with k elements from SAllBags := func(k,S);$ requires: k is a positive integer; S is a set$ effects : returns the set of bags with k elements from S