In aqueous medium, the basic strength of amines is determined by the availability of the lone pair of electrons on nitrogen for protonation. The more alkyl groups attached to the nitrogen atom, the higher the electron density on nitrogen, and thus the stronger the base.
The order of basicity is as follows:
1. \( \text{CH}_3\text{NH}_2 \) (methylamine) has the highest basicity due to the electron-donating methyl group.
2. \( \text{(CH}_3\text{)}_2\text{NH} \) (dimethylamine) has a slightly higher basicity than \( \text{(CH}_3\text{)}_3\text{N} \) (trimethylamine) because the two methyl groups donate electrons to the nitrogen more than the three groups in trimethylamine.
3. \( \text{(CH}_3\text{)}_3\text{N} \) (trimethylamine) has the lowest basicity among the amines due to steric hindrance and the electron-donating effect being spread over three methyl groups.
4. \( \text{NH}_3 \) (ammonia) has the lowest basicity among the options as there are no alkyl groups to donate electron density.
Thus, the correct order is:
\[
\text{CH}_3\text{NH}_2>\text{(CH}_3\text{)}_2\text{NH}>\text{(CH}_3\text{)}_3\text{N}>\text{NH}_3
\]