# Using Probability in Big Data! #computerscience #algorithms #coding

## Метаданные

- **Канал:** b001
- **YouTube:** https://www.youtube.com/watch?v=47PCjlbxk74

## Содержание

### [0:00](https://www.youtube.com/watch?v=47PCjlbxk74) Segment 1 (00:00 - 01:00)

so you've launched a website and you want to keep track of the number of unique visitors the naive approach would be to just save unique visitor data in memory somewhere as they join the website and at any given moment you can just count the number of visitors you've saved in memory this works okay but you quickly become memory constrained using this approach instead for a problem like this you could use the power of probability instead of recording each unique visitor's data let's only record half of them then at any given moment you can count the unique visitor data in memory and just divide by their probability of being there this gives us an approximation of the number of unique visitors we've seen so far okay but wouldn't this approach become memory constrained too well once our memory becomes full all we have to do is go through deleting items in our memory with a 1 half probability the remaining items effectively now have a 25% chance of being there so we can adjust our probability for future items to 25% as well and it's as if we started with a 25% probability to begin with this step can be repeated each time the memory becomes full

---
*Источник: https://ekstraktznaniy.ru/video/31470*