don't forget the large ongoing cost for public transportation in terms of both labor costs and maintenance cost for the rolling equipment.
railroads are very expensive to build, but (on a per-ton-mile basis) very cheap to operate.
but if you don't have a lot of cargo/people to transport the ongoing savings won't catch up with the initial infrastructure costs.
bus transportation is cheaper in that it can use the same road infrastructure as cars do, but you have to pay the driver and vehicle maintenance even if you don't have any riders. Bus service is also significantly slower than personal car transportation.
I lived in the greater Los Angeles area for a little over 6 years without having a car. During this time I lived pretty close to bus routes (within two blocks of both north/south and east/west routes). It can be done, but it's very inconvenient.