Endosperm is formed during the double fertilization. It is triploid because it is formed when one of the two sperm that is haploid enters inside the embryo sac & fuses with two polar nuclei (each polar nuclei is haploid). So the endosperm formed is triploid.