Before you start, decide on the location
If the joists are perpendicular to the line of the new wall, you can install it almost anywhere, preferably against a stud in the existing wall (the one into which the new wall will be anchored).
If the ceiling joists are parallel to the line of the new wall, its location will be determined by the joist near the intended location.
In most cases, it's not necessary to anchor the new wall on the floor joists. However, if you are able to do so, the wall will be even more solid.