Several years ago, scientists could already introduced noble gas atoms (He, Ne, Ar, Kr, and Xe) into C60 and higher fullerenes. For the specific cases of He and Ne, the calculations suggested that both atoms are slightly bound inside C60 through simultaneous van der Waals interactions with all 60 carbons. The cavity in dodecahedrane is much smaller than that in C60, but the experimental study found that by bombarding dodecahedrane with fast, neutral helium atoms, He@C20H20 is formed. The structures of C20F20 and C20H20 are similar. Are noble gas atoms also stable in the C20F20? and, are there charges transferring between noble gas atoms and the carbon cage? In this paper, the generalized gradient approximation based on density functional theory is used to analyze the geometric and electronic structures of the endohedral fullerene X@C20F20 (X=He, Ne, Ar, Kr). The geometric optimization shows that the noble gas atoms X are all stable in the center of C20F20 cage. The C-C bond lengths of the X@C20F20 increase with the atomic number X increasing, while the C-F bond length is hardly changed. The inclusion energies of the X@C20F20 (X=He, Ne, Ar, Kr) are 1.359, 3.853, 11.276 and 15.783 eV respectively. These are all positive, which shows that the X@C20F20 have good thermodynamic stabilities, and the thermodynamic stabilities of the X@C20F20 are enhanced with the increase of X atomic number. The energy gaps of the X@C20F20 (X=He, Ne, Ar, Kr) are 5.179, 4.882, 5.874 and 6.205 eV respectively, which are greater than that of C20F20. It indicates that the X@C20F20 have better dynamic stabilities than C20F20. In addition, the vibration frequencies of the X@C20F20 (X=He, Ne, Ar, Kr) are all positive. These indicate that the stability of C20F20 is significantly improved when the X atom is introduced into the cage, and is gradually increasing with the increase of X atomic number. The electronic structures demonstrate that the X atom has no contribution to the occupied molecular orbitals near the Fermi level of X@C20F20, and the contribution of the X atom to the unoccupied molecular orbitals is relatively large. The calculation also shows that the atoms of He and Kr obtain 0.126 and 0.271 electrons from the carbons of the C20F20 cage, while Ar and Ne transfer 0.060 and 0.012 electrons to the carbons of the cage repectively. Thus there are electrons transferring between the X atoms and the carbons of the cage, indicating that the formed C-X bonds of the X@C20F20 are ionic bonds.