Akshay invited his girlfriend to a movie. She said, "I am currently writing the Python code for an interesting Probability and Statistics problem. You have to help me in solving the problem, so that he can go for the movie with his girlfriend. The problem is: - Calculate the expectation of random variable Y = 2X3, where X is another random variable which counts the number of heads in tossing 'N' coins.
Consider the result for:
Input N: 6
Input N: 7
Input N: 8
Input N: 9
Note: Here we are following the frequentist approach. Therefore, I have to compute the expected values using the probabilities obtained in the previous part (Y=2X3).
Test Case
Input:6
Output - 81.0