Problem Statement - A random variable X is N(25, 4). Find the indicated percentile for X:
a. The 10th percentile
b. The 90th percentile
c. The 80th percentile
d. The 50th percentile
Attempt 1
My code:
import numpy as np
import math
import scipy.stats
mu=25
sigma=4
a=mu-(1.282*4)
b=mu+(1.282*4)
... like that. I got the values from the Zscore table given in https://sphweb.bumc.bu.edu/otlt/mph-modules/bs/bs704_probability/bs704_probability10.html
Attempt 2
X=np.random.normal(25,4,10000) # sample size not mentioned in
problem. I just assumed it
a_9 = np.percentile(X,10)
b_9 = np.percentile(X,90)
c_9 = np.percentile(X,80)
d_9 = np.percentile(X,50)
But the answers are incorrect as per the hidden test cases of the practice platform. Can anyone please tell me the right way to compute the answers? Is there any scipy.stats function for this?