Your service is quoted as a line rate (i.e 1.5 Mbps or 512 Kbps). This refers to the allowed bandwidth of your connection, or your communications rate. A speed test functions by tracking the amount of time it takes to send and receive a specific amount of data over your connection. This is the data transfer speed.
The data transfer rate is lower than the communications line rate because the data has to be packaged into "frames" and "cells" before it can be sent. There is also routing information attached to it. These are all considered overhead.
In terms of your Internet connection you can expect about 15% overhead. That means a 1.5Mbps connection will return a speed test result closer to 1.25 Mbps, and a 512 Kbps connection will return a speed test result close to 435 Kbps. This doesn't mean your connection is slow, it just means the speed test doesn't have any way to calculate the overhead. If you would like more information about overhead please see An Explanation of DSL overhead.