Post content lost due to vandalism by author
You are running on a 3.3V regulator but your code is written for a 5V analog reference. Change the 5.0 to 3.3.
Technically you should use 1024.0 instead of 1023.0.
Is the voltage at the voltage divider referenced to a GND that is different from the Attiny's GND ?
AFAIK an Attiny can measure differential voltages that are not referenced to its own GND. See this YouTube video.
Note that the Atmega 328 cannot do differential voltages.
...R
So you figured out that the physical pin numbers (7) are different from the digital logical pin numbers (2) and the analog logical pin numbers (1). Be warned that the mapping from physical to logical can be different for different third-party ATtiny cores. That means if you are looking at an example sketch and circuit diagram it may not work for you if they used a different core.