We know that,
Mean of the data (¯x)=∑5i=1fixi∑5i=1fi=20.2 [given]
⇒f1x1+f2x2+f3x3+f4x4+f5x5f1+f2+f3+f4+f5=20.2
⇒(6)(10)+(8)(15)+(p)(20)+(10)(25)+(6)(30)6+8+p+10+6=20.2
⇒60+120+20p+250+18030+p=20.2
⇒20p+610=606+20.2p
⇒610−606=20.2p−20p
⇒2p10=4
∴p=10×2=20
Hence, the value of p is 20.