The function f(x) is selective for words related to sports, specifically basketball and football. It returns high values for words like "dribble", "pilot", "NFL", and "basketball", and lower values for words like "humidity", "mountains", "planets", and "Reddit".