The IEEE 802.11 is the most widely used standard in WLAN currently. It can support not only a WLAN with an access point but also an ad hoc wireless network. The key for being able to support various wireless networks is the Distribution Coordination Function (DCF) which is one of channel access methods in the IEEE 802.11 Medium Access Control (MAC) protocol. The DCF is a random access method where each station has the right to initiate a transmission without any central coordination. Hence, this method is useable not only in infrastructure network configurations but also in distributed and self-organized wireless networks. However, this random access method unavoidably introduces the hidden station problem that multiple stations simultaneously transmit packets to a common destination resulting in packet collision at the destination. This problem results from that DCF does not support the destination coordinating the traffic inside its transmission range. The hidden station problem is unique to wireless networks and significantly degrades the performance of wireless networks, but this problem has been ignored in previous studies. We propose our research work that model and analyze the performance of wireless networks including the hidden station effect in access-point and ad hoc type wireless networks. In access-point based wireless networks, we present a modified two-dimensional Markov chain model that characterizes the network performance in the presence of hidden stations. This model generalizes the existing work on IEEE 802.11 DCF performance modeling, and it is validated by comparison with ns-2 simulation. Second, in wireless ad hoc networks, the hidden station effect is different from that in an access-point based wireless network. Furthermore, this effect largely depends on the sender-receiver distance and physical carrier-sensing range. We devise a spatiotemporal analytical model that estimates the number of hidden stations based on the sender-receiver distance and physical carrier-sensing range. In addition, we also use our two-dimensional Markov chain model to evaluate the network performance under the hidden station effect in wireless ad hoc network. This result is in agreement with the result obtained by ns-2 simulation.