The optimal molar ratio of aniline to nitric acid for the preparation of p-nitroaniline through nitration is 1:1. This is because the nitration reaction involves the substitution of one hydrogen atom on the aromatic ring of aniline with a nitro group -NO2 from nitric acid.Altering the molar ratio of aniline to nitric acid can affect the yield and selectivity of the product in the following ways:1. If the molar ratio of aniline is increased relative to nitric acid, the reaction may not go to completion, leading to a lower yield of p-nitroaniline. This is because there may not be enough nitric acid to react with all the aniline molecules.2. If the molar ratio of nitric acid is increased relative to aniline, the reaction may lead to over-nitration, where more than one nitro group is added to the aniline molecule. This can result in the formation of undesired by-products, such as dinitroaniline or trinitroaniline, which can decrease the selectivity and yield of p-nitroaniline.To achieve the optimal yield and selectivity of p-nitroaniline, it is crucial to maintain a 1:1 molar ratio of aniline to nitric acid and to carefully control the reaction conditions, such as temperature and reaction time.