  The glass transition temperature and its connection to statistical properties
of confined and free-standing polymer films of varying thickness containing
unentangled to highly entangled bead-spring chains are studied by molecular
dynamics simulations. For confined films, perfect scaling of the
thickness-dependent end-to-end distance and radius of gyrations normalized to
their bulk values in the directions parallel and perpendicular to the surfaces
is obtained. Particularly, the reduced end-to-end distance in the perpendicular
direction is very well described by the extended Silberberg model. For bulk
polymer melts, the relation between chain length and $T_g$ follows the
Fox-Flory equation while $T_g$ for a given film thickness is almost independent
of chain length. For films, $T_g$ decreases and is well described by Keddie's
formula, where the reduction is more pronounced for free-standing films. For
the present model, $T_g$ begins to deviate from bulk $T_g$ at the
characteristic film thickness, where the average bond orientation becomes
anisotropic and the entanglement density decreases.
