# Statistical Model for Mobile User Positioning Based on Social Information
## 3 Methodology
### Spatial Distribution  
Once the input data have been processed, a map is constructed with the location of the connections. Unfortunately, traces are rarely geolocated, so they have to be located by the E-CID method. This leads to large positioning errors in rings far from the serving cell. To circumvent this problem, the spatial distribution of users within a ring can be inferred from the distribution of geotagged messages obtained from social networks since the transmission of short messages is not conditional on a good radio link [30].  
The geolocation process starts with creating a grid with the same dimensions as the land use map, \(M_{lu}(x,y)\). Hereafter, the \((x,y)\) indices refer to the horizontal and vertical indices of the grid. A user context matrix of the same size, \(M_{context}(x,y)\), is obtained from the land uses, indicating whether each tile is indoor or outdoor (i.e., \(M_{context}(x,y){\in}\{indoor,outdoor\}\)). With this map, together with the ring area where each connection occurs (i.e., \((x,y)\in r\)), connections are distributed in their context within that ring, based on the probability that each connection occurred in an indoor/outdoor context. In combination with this, the underlying spatial distribution of publications, \(M^{\prime}_{p}(x,y)\), is used as an estimate of the population distribution in the scenario, and can be applied to weight which areas of the ring are more likely to embrace a connection (i.e., areas with higher population).  
Thus, the data described above is used to compute the probability of a connection occurring in a tile \((x,y)\) labeled as context \(ct\) (i.e., \(ct{\in}\{indoor,outdoor\}\)) in the ring \(r\) as  
\[P(r,x,y)=\frac{1+M^{\prime}_{p}(x,y)}{N_{ct}(r)+\sum_{(x,y)\in r}M^{\prime}_{ p}(x,y)}\quad\forall(x,y)\in r\,, \tag{2}\]  
where \(N_{ct}(r)\) is the number of tiles labeled as context \(ct\) (i.e., indoor or outdoor) in the ring \(r\), and \(M^{\prime}_{p}(x,y)\) is the underlying spatial distribution of publications. Note that the same grid index \((x,y)\) can be served by rings of different cells and, thus, have different values of \(P(r,x,y)\), associated with more than one ring. Further analysis of (2) shows that, in rings where the number of geotagged posts is 0 (as it could be in unpopulated areas), the connections recorded in the traces are evenly distributed over the ring context \(ct\) area (i.e., \(P(r,x,y)=1/N_{ct}(r)\)). In contrast, in rings with a large number of geotagged publications, connections are distributed following the distribution of posts in the ring (i.e., \(P(r,x,y)\approx(M^{\prime}_{p}(x,y))/sum_{(x,y)\in r}M^{\prime}_{p}(x,y)\)).  
Once the probabilities of the ring connections in each tile have been calculated, these probabilities are projected on the map. To do so, they are distributed over the inner/outer tiles within the ring according to the probabilities in (2) and then aggregated among the rings serving the same tiles as  
\[M_{UE}(x,y)=\sum_{r/(x,y)\in r}\sum_{k\in r}P_{ct}(k)P(r,x,y)\quad(x,y)\in ct, \tag{3}\]  
where \(M_{UE}\) is the statistical distribution map of connections in the scenario, and \(P_{ct}(k)\) is the probability of connection \(k\) to have occurred in context \(ct\).